-
Bug
-
Resolution: Won't Do
-
Major
-
3.3.0.CR1
-
-
Medium
I created a project using the org.openarchetypes:multi-javaee6-archetype:0.0.1-SNAPSHOT from http://open-archetypes.github.com/maven-repo/snapshots/archetype-catalog.xml (Maven > Archetypes > Add Remote Catalog)
This creates a multi module project, containing a parent pom, an ear, war, ejb and utility projects. This openshift profile was added to the pom project :
<profiles> <profile> <!-- When built in OpenShift the openshift profile will be used when invoking mvn. --> <!-- Use this profile for any OpenShift specific customization your app will need. --> <!-- By default that is to put the resulting archive into the deployments folder. --> <!-- http://maven.apache.org/guides/mini/guide-building-for-different-environments.html --> <id>openshift</id> <build> <finalName>hello</finalName> <plugins> <plugin> <artifactId>maven-war-plugin</artifactId> <version>2.1.1</version> <configuration> <outputDirectory>deployments</outputDirectory> <warName>ROOT</warName> </configuration> </plugin> </plugins> </build> </profile>
Actually, it should :
- check the packaging type of all the generated projects
- if some EARs are found, then add the following to the parent pom (pay attention to the <pluginManagement> section) :
<profile> <id>openshift</id> <build> <pluginManagement> <plugins> <plugin> <artifactId>maven-ear-plugin</artifactId> <version>2.7</version> <configuration> <outputDirectory>deployments</outputDirectory> </configuration> </plugin> </plugins> </pluginManagement> </build> </profile>
- if there are no EARs but some WARs are found (count them), then add the following to the parent pom (pay attention to the <pluginManagement> section) :
<profiles> <profile> <id>openshift</id> <build> <pluginManagement> <plugins> <plugin> <artifactId>maven-war-plugin</artifactId> <version>2.2</version> <configuration> <outputDirectory>deployments</outputDirectory> <!-- Add warName ROOT ONLY if there's ONE War, otherwise, skip it --> <warName>ROOT</warName> </configuration> </plugin> </plugins> </pluginManagement> </build> </profile>
The finalName is irrelevant to openshift, only the warName counts.
- blocks
-
JBDS-2564 JBDS70_1214: [Commit] (?) (P?) Fix OpenShift support for multi-module maven projects
- Open
- duplicates
-
JBIDE-12252 Multi-module project throws ClassNotFoundException when deployed on OpenShift's EAP
- Closed
- is related to
-
JBIDE-12218 Git-versioned projects not building when deployed on OpenShift
- Closed
-
JBIDE-12252 Multi-module project throws ClassNotFoundException when deployed on OpenShift's EAP
- Closed
-
JBIDE-12459 Application wizard: git repository for imported project is not detected correctly if it is in some parent folder
- Closed
- relates to
-
JBIDE-12252 Multi-module project throws ClassNotFoundException when deployed on OpenShift's EAP
- Closed