Skip to content

Commit

Permalink
Additional packaging type changes
Browse files Browse the repository at this point in the history
  • Loading branch information
cherylking committed Jun 23, 2023
1 parent 5b6adea commit 137f248
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -340,8 +340,14 @@ private void addLibrary(Element parent, LooseApplication looseApp, String dir, A
Element archive = looseApp.addArchive(parent, dir + artifactFileName);
looseApp.addOutputDir(archive, new File(dependProject.getBuild().getOutputDirectory()), "/");

//Check if reactor project generates an ejb or jar
String archivePlugin = dependProject.getPackaging().equalsIgnoreCase("ejb") ? "maven-ejb-plugin" : "maven-jar-plugin";
//Check if reactor project generates an ejb, bundle or jar
String archivePlugin = "maven-jar-plugin";
String packaging = dependProject.getPackaging();
if (packaging.equalsIgnoreCase("ejb")) {
archivePlugin = "maven-ejb-plugin";
} else if (packaging.equalsIgnoreCase("bundle")) {
archivePlugin = "maven-bundle-plugin";
}

File manifestFile = MavenProjectUtil.getManifestFile(dependProject, archivePlugin);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ public static String getAppNameClassifier(MavenProject proj) {
pluginName = "maven-war-plugin";
} else if (proj.getPackaging().equals("ear")) {
pluginName = "maven-ear-plugin";
} else if (proj.getPackaging().equals("bundle")) {
pluginName = "maven-bundle-plugin";
} else {
return null;
}
Expand Down

0 comments on commit 137f248

Please sign in to comment.