Reputation: 1039
Eclipse - Neon Maven Java archetype - 4 projects
Hi, I generated an maven archetype with 4 projects ?
============================================================
- framework (packaging ejb)
- bulk (kind of packaging : pom) it has 3 modules.
- bulk_ear
- bulk_ejb
- bulk_web
- bulke_ear (packaging ear)
- bulk_ejb (packaging ejb) - jpa...
- bulk_web (packaging war)
===========================================================
I would like to add the framework.jar as dependency to be used on the bulk_web and bulk_ejb projects
Would you please help me to do that. because I tried but with no success
My tries :
But when I Maven install, the framework.jar does not packaged to ear.
<dependency>
<groupId>br.com.xxx</groupId>
<artifactId>framework</artifactId>
<version>1.0.0-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
Upvotes: 0
Views: 40
Reputation: 2075
Your goal "provided" means that the jar is provided by you manually or by the including framwork. Also if you want to package your artifacts with other libs you should have a look at the maven assembly plugin. How to include package.jar with maven-assembly-plugin
Upvotes: 1
Reputation: 1413
Try to change maven scope
to compile
:
Compile means that you need the JAR for compiling and running the app. For a web application, as an example, the JAR will be placed in the WEB-INF/lib directory.
Provided means that you need the JAR for compiling, but at run time there is already a JAR provided by the environment so you don't need it packaged with your app. For a web app, this means that the JAR file will not be placed into the WEB-INF/lib directory.
Upvotes: 0