I am new to maven. I have created a maven project , in this i have two session beans
and i have added all dependencies in pom.xml
. I want to conver this project to EAR
so that I can deploy it on jboss EAP 6.0
.
I have used <plugin> <artifactId>maven-ejb-plugin</artifactId> <version>2.3</version> <configuration> <ejbVersion>3.1</ejbVersion> </configuration> </plugin>
but it doen't provide the runtime dependencies.
How do i convert maven project to EAR file. How do get all dependencies including project dependencies at runtime.
I would suggest using maven-ear-plugin. The pom.xml would have the following item inside <build><plugins>..</plugins>..</build>
listing: (taken from the documentation)
<build>
<plugins>
<plugin>
<artifactId>maven-ear-plugin</artifactId>
<version>2.8</version>
<configuration>
<!-- configuration elements go here -->
</configuration>
</plugin>
</plugins>
</build>
Please also refer to the documentation here: http://maven.apache.org/plugins/maven-ear-plugin/usage.html .
Maven handles all the dependencies that you list in the <dependencies>...</dependencies>
section that follows the above block. For example:
<dependencies>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
</dependencies>
You can get the dependency details, like the above for log4j, from various maven repositories online. ( http://search.maven.org/ , http://mvnrepository.com/ etc.)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.