@Test public void toBundleDescriptorTest() { artifactCoordinates.setClassifier(MULE_APP_CLASSIFIER); artifactCoordinates.setVersion(VERSION); BundleDescriptor actualBundleDescriptor = ArtifactUtils.toBundleDescriptor(artifactCoordinates); assertThat("The group id is not the expected", actualBundleDescriptor.getGroupId(), equalTo(GROUP_ID)); assertThat("The artifact id is not the expected", actualBundleDescriptor.getArtifactId(), equalTo(ARTIFACT_ID)); assertThat("The version is not the expected", actualBundleDescriptor.getVersion(), equalTo(VERSION)); assertThat("The base version is not the expected", actualBundleDescriptor.getBaseVersion(), equalTo(VERSION)); assertThat("The classifier is not the expected", actualBundleDescriptor.getClassifier(), equalTo(Optional.of(MULE_APP_CLASSIFIER))); assertThat("The type is not the expected", actualBundleDescriptor.getType(), equalTo(DEFAULT_ARTIFACT_DESCRIPTOR_TYPE)); }
public static BundleDescriptor toBundleDescriptor(ArtifactCoordinates artifactCoordinates) { return new BundleDescriptor.Builder() .setGroupId(artifactCoordinates.getGroupId()) .setArtifactId(artifactCoordinates.getArtifactId()) .setVersion(artifactCoordinates.getVersion()) .setBaseVersion(artifactCoordinates.getVersion()) .setClassifier(artifactCoordinates.getClassifier()) .setType(artifactCoordinates.getType()).build(); }
ArtifactUtils { public static BundleDescriptor toBundleDescriptor(ArtifactCoordinates artifactCoordinates) { return new BundleDescriptor.Builder() .setGroupId(artifactCoordinates.getGroupId()) .setArtifactId(artifactCoordinates.getArtifactId()) .setVersion(artifactCoordinates.getVersion()) .setBaseVersion(artifactCoordinates.getVersion()) .setClassifier(artifactCoordinates.getClassifier()) .setType(artifactCoordinates.getType()).build(); } }
ArtifactUtils { public static BundleDescriptor toBundleDescriptor(ArtifactCoordinates artifactCoordinates) { return new BundleDescriptor.Builder() .setGroupId(artifactCoordinates.getGroupId()) .setArtifactId(artifactCoordinates.getArtifactId()) .setVersion(artifactCoordinates.getVersion()) .setBaseVersion(artifactCoordinates.getVersion()) .setClassifier(artifactCoordinates.getClassifier()) .setType(artifactCoordinates.getType()).build(); }  }
ArtifactUtils { public static BundleDescriptor toBundleDescriptor(ArtifactCoordinates artifactCoordinates) { return new BundleDescriptor.Builder() .setGroupId(artifactCoordinates.getGroupId()) .setArtifactId(artifactCoordinates.getArtifactId()) .setVersion(artifactCoordinates.getVersion()) .setBaseVersion(artifactCoordinates.getVersion()) .setClassifier(artifactCoordinates.getClassifier()) .setType(artifactCoordinates.getType()).build(); }  static ArtifactCoordinates toArtifactCoordinates(BundleDescriptor bundleDescriptor); static Artifact toArtifact(BundleDependency bundleDependency); static List<Artifact> toArtifacts(Collection<BundleDependency> dependencies); static boolean isValidMulePlugin(Artifact artifact); static BundleDescriptor toBundleDescriptor(ArtifactCoordinates artifactCoordinates); static BundleDescriptor toBundleDescriptor(Dependency dependency); static List<Artifact> toApplicationModelArtifacts(List<BundleDependency> appDependencies); static List<Artifact> updatePackagesResources(List<Artifact> artifacts); static Artifact updatePackagesResources(Artifact artifact); static List<Artifact> updateArtifactsSharedState(List<BundleDependency> appDependencies, List<Artifact> artifacts,
                                                          Model pomModel); static void updateScopeIfDomain(Artifact artifact); static ArtifactCoordinates getApplicationArtifactCoordinates(Model pomModel, ApplicationGAVModel appGAVModel); static BundleDescriptor getPomProjectBundleDescriptor(ApplicationGAVModel appGAVModel); static BundleDescriptor getBundleDescriptor(ApplicationGAVModel appGAVModel); }
ArtifactUtils { public static BundleDescriptor toBundleDescriptor(ArtifactCoordinates artifactCoordinates) { return new BundleDescriptor.Builder() .setGroupId(artifactCoordinates.getGroupId()) .setArtifactId(artifactCoordinates.getArtifactId()) .setVersion(artifactCoordinates.getVersion()) .setBaseVersion(artifactCoordinates.getVersion()) .setClassifier(artifactCoordinates.getClassifier()) .setType(artifactCoordinates.getType()).build(); }  static ArtifactCoordinates toArtifactCoordinates(BundleDescriptor bundleDescriptor); static Artifact toArtifact(BundleDependency bundleDependency); static List<Artifact> toArtifacts(Collection<BundleDependency> dependencies); static boolean isValidMulePlugin(Artifact artifact); static BundleDescriptor toBundleDescriptor(ArtifactCoordinates artifactCoordinates); static BundleDescriptor toBundleDescriptor(Dependency dependency); static List<Artifact> toApplicationModelArtifacts(List<BundleDependency> appDependencies); static List<Artifact> updatePackagesResources(List<Artifact> artifacts); static Artifact updatePackagesResources(Artifact artifact); static List<Artifact> updateArtifactsSharedState(List<BundleDependency> appDependencies, List<Artifact> artifacts,
                                                          Model pomModel); static void updateScopeIfDomain(Artifact artifact); static ArtifactCoordinates getApplicationArtifactCoordinates(Model pomModel, ApplicationGAVModel appGAVModel); static BundleDescriptor getPomProjectBundleDescriptor(ApplicationGAVModel appGAVModel); static BundleDescriptor getBundleDescriptor(ApplicationGAVModel appGAVModel);  }