Maven jar deployment on JBoss ClassNotFoundException
couim Apr 18, 2017 8:39 AMI've a jar archive generated by maven which has the following architecture (files list inside the jar) :
META-INF/ META-INF/MANIFEST.MF com/ com/facility/ com/facility/jaxws/ com/middleware/ com/middleware/as/ com/middleware/as/jaxws/ META-INF/maven/ META-INF/maven/MonWebServiceFacility/ META-INF/maven/MonWebServiceFacility/MonWebServiceFacility/ com/facility/Facility.class com/facility/jaxws/ClientProtocolExceptionBean.class com/facility/jaxws/IOExceptionBean.class com/facility/jaxws/Options.class com/facility/jaxws/OptionsResponse.class com/middleware/as/jaxws/FindFacility.class com/middleware/as/jaxws/FindFacilityResponse.class META-INF/maven/MonWebServiceFacility/MonWebServiceFacility/pom.properties META-INF/maven/MonWebServiceFacility/MonWebServiceFacility/pom.xml
When I want to deploy this jar with Wildfly 8.2.1, I get the following error :
ClassNotFoundException: org.apache.http.HttpEntity
Here's my pom.xml
:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>MonWebServiceFacility</groupId> <artifactId>MonWebServiceFacility</artifactId> <version>0.0.1-SNAPSHOT</version> <build> <sourceDirectory>src</sourceDirectory> <plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> <version>3.5.1</version> <configuration> <source>1.7</source> <target>1.7</target> </configuration> </plugin> </plugins> </build> <properties> <cxf.version>3.1.7</cxf.version> </properties> <dependencies> <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-frontend-jaxws</artifactId> <version>${cxf.version}</version> </dependency> <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-rs-security-cors</artifactId> <version>${cxf.version}</version> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>2.5</version> </dependency> <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient</artifactId> <version>4.5.2</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> <version>4.3.7.RELEASE</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-web</artifactId> <version>4.3.7.RELEASE</version> </dependency> </dependencies> </project>
I guess my Jboss is not able to load dependencies referenced in my pom.xml
file. Any ideas to solve the problem ? I would like to deploy this web service with libraries specified in that pom.xml file to be ensure that I run my program with correct versions of libraries.