This content has been marked as final.
Show 1 reply
-
1. Re: Wildfly migration inter jar files dependencies issue
asimoes Aug 11, 2014 11:26 AM (in response to asimoes)1 of 1 people found this helpfulWell, i manage to find the answer for my question.
To anyone who has an ejb project that has a dependency that for any reason you do not what to place on global dependencies (modules), but in deploy folder, you can use this:
On the ejb project that need the dependency, you need to declare it (has we do on jboss 5), now the trick is add the following line to the ejb plugin on build
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-ejb-plugin</artifactId> <configuration> <archive> <manifestEntries> <Dependencies>deployment.A.jar</Dependencies> </manifestEntries> </archive> </configuration> </plugin>
where A.jar is or "missing" dependency.
Note: maven-ejb-plugin version is defined on my parent pom as
<build> <pluginManagement> <plugins> <plugin> <!-- must include ejb-plugin to change the EJB version from 2.1 to 3.1 --> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-ejb-plugin</artifactId> <version>${ejb.plugin.version}</version> <configuration> <ejbVersion>3.1</ejbVersion> <generateClient>false</generateClient> <addClasspath>true</addClasspath> <archive> <addMavenDescriptor>true</addMavenDescriptor> </archive> </configuration> </plugin> </plugins> </pluginManagement> </build>
I am not sure that this is "best practices", so if you see any problem here, please report.