I want to create ear application with one ejb project and dependencies (without war file). Is it possible to specify build configuration in one pom.xml to avoid unnecessary multiplication of application modules (I have about 8 projects witch will be packaged this way and if I would do this "standard" way I would have to create 8*3=24 modules/poms). I don't want to put all my applications into one ear, because I need to could undeploy/redeploy them separately.
Right now I have two solutions:
-
Create ear in standard way with module structure:
project ejb src pom.xml ear pom.xml pom.xmlBut as I mentioned it's creating multiplication of modules.
-
Create jar with dependencies using maven-shade-plugin
<build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>2.1</version> <executions> <execution> <phase>package</phase> <goals><goal>shade</goal></goals> <configuration> <finalName>project</finalName> </configuration> </execution> </executions> </plugin> </plugins>But with this solution I get jar instead of ear and my dependencies are mixed with my code.
Is there any other way to create deployable application with only ejb and dependencies with maven using single pom.xml?
Aucun commentaire:
Enregistrer un commentaire