java - Include Maven Project into NON-MAVEN Dynamic Web Application -
i've included maven based project application, added deployment assembly shows .jar file gets copied web-inf/lib/importedproject.jar
.
problem occurs when imported lib wants reference lib using which, apparently, not included inside importedproject.jar
.
example:
importedproject pom.xml
has:
<dependency> <groupid>org.slf4j</groupid> <artifactid>slf4j-api</artifactid> <version>1.7.12</version> </dependency>
when add importedproject.jar non-maven project , run it, exception:
threw exception [servlet execution threw exception] root cause java.lang.classnotfoundexception: org.slf4j.loggerfactory
my question is: how add both maven project and dependencies?
maven dependency plugin helps required project library it's dependencies.
so, if add pom based project on non-pom based project, execute mvn dependency:copy-dependencies
command , have dependencies on target/dependencies
folder. copy jar dependencies , paste web-inf/lib
directory.
Comments
Post a Comment