maven-ear-example | Build Tool library
kandi X-RAY | maven-ear-example Summary
kandi X-RAY | maven-ear-example Summary
maven-ear-example
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- List all members
- Is IAM IAM
maven-ear-example Key Features
maven-ear-example Examples and Code Snippets
Community Discussions
Trending Discussions on maven-ear-example
QUESTION
I'm trying to deploy an EAR to Wildfly 10 via Eclipse Neon with the latest JBoss Tools. This is my first attempt with EARs, so I documented myself and this is the structure I came up with:
Maven modules:
api
(typejar
, no deps): contains the interfacesMyService
andPerson
.ejb
(typeejb
, depends onapi
): contains a@Stateless
implementation ofMyService
and an@Entity
implementation ofPerson
.war
(typewar
, depends onapi
): contains a JAX-RS resource which usesMyService
.ear
(typeear
, depends onejb
andwar
): the EAR module.
(See here for the full source: https://github.com/heruan/maven-ear-example)
The problem is when I deploy this to Wildfly, I get:
...ANSWER
Answered 2017-Aug-03 at 10:28I found out what the problem was: duplicate .class
files. Seems like the Maven EAR plugin isn't clever enough to avoid duplicate dependencies, so you need to explicitly set them as provided
.
For example, the solution in the example project is to set the api
module as provided
in the war
's pom.xml
:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install maven-ear-example
You can use maven-ear-example like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the maven-ear-example component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page