@Test public void isPreReleaseWhenBaseVersionEndWithSnapshot() throws Exception { when(component.attributes()).thenReturn(attributes); when(attributes.child(Maven2Format.NAME)).thenReturn(childAttributes); when(childAttributes.get("baseVersion")).thenReturn("1.0.0-SNAPSHOT"); assertThat(underTest.isPrerelease(component, emptySet()), is(true)); }
@Override protected boolean isPrerelease(final Component component, final Iterable<Asset> assets) { String baseVersion = (String) component.attributes().child(Maven2Format.NAME).get(P_BASE_VERSION); if(baseVersion == null) { return false; } return baseVersion.endsWith(SNAPSHOT_VERSION_SUFFIX); }
Maven2ComponentMetadataProducer extends DefaultComponentMetadataProducer { @Override protected boolean isPrerelease(final Component component, final Iterable<Asset> assets) { String baseVersion = (String) component.attributes().child(Maven2Format.NAME).get(P_BASE_VERSION); if(baseVersion == null) { return false; } return baseVersion.endsWith(SNAPSHOT_VERSION_SUFFIX); } }
Maven2ComponentMetadataProducer extends DefaultComponentMetadataProducer { @Override protected boolean isPrerelease(final Component component, final Iterable<Asset> assets) { String baseVersion = (String) component.attributes().child(Maven2Format.NAME).get(P_BASE_VERSION); if(baseVersion == null) { return false; } return baseVersion.endsWith(SNAPSHOT_VERSION_SUFFIX); } @Inject  Maven2ComponentMetadataProducer(final Set<ComponentMetadataProducerExtension> extensions); }
Maven2ComponentMetadataProducer extends DefaultComponentMetadataProducer { @Override protected boolean isPrerelease(final Component component, final Iterable<Asset> assets) { String baseVersion = (String) component.attributes().child(Maven2Format.NAME).get(P_BASE_VERSION); if(baseVersion == null) { return false; } return baseVersion.endsWith(SNAPSHOT_VERSION_SUFFIX); } @Inject  Maven2ComponentMetadataProducer(final Set<ComponentMetadataProducerExtension> extensions);  }
Maven2ComponentMetadataProducer extends DefaultComponentMetadataProducer { @Override protected boolean isPrerelease(final Component component, final Iterable<Asset> assets) { String baseVersion = (String) component.attributes().child(Maven2Format.NAME).get(P_BASE_VERSION); if(baseVersion == null) { return false; } return baseVersion.endsWith(SNAPSHOT_VERSION_SUFFIX); } @Inject  Maven2ComponentMetadataProducer(final Set<ComponentMetadataProducerExtension> extensions);   }