Я пытаюсь построить многомодульный проект, используя maven. Ниже приведены модули
1) базовый 2) общий 3) клиент 4) сервис
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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.se</groupId>
<artifactId>base</artifactId>
<packaging>pom</packaging>
<version>0.1-SNAPSHOT</version>
<name>base Maven Webapp</name>
<url>http://maven.apache.org</url>
<modules>
<module>common</module>
<module>client</module>
<module>service</module>
</modules>
<dependencies>
...
</dependencies>
<build>
<finalName>base</finalName>
<plugins>
....
</plugins>
</build>
</project>
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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.vdcommon</groupId>
<artifactId>common</artifactId>
<packaging>jar</packaging>
<version>0.1-SNAPSHOT</version>
<name>VDCommon Maven Webapp</name>
<url>http://maven.apache.org</url>
<parent>
<groupId>com.se</groupId>
<artifactId>base</artifactId>
<version>0.1-SNAPSHOT</version>
</parent>
<dependencies>
...
</dependencies>
<build>
<finalName>common</finalName>
<plugins>
...
</plugins>
</build>
</project>
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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.se</groupId>
<artifactId>base</artifactId>
<version>0.1-SNAPSHOT</version>
</parent>
<groupId>com.vdclient</groupId>
<artifactId>client</artifactId>
<packaging>jar</packaging>
<version>0.1-SNAPSHOT</version>
<name>VDClient Maven Webapp</name>
<url>http://maven.apache.org</url>
<properties>
....
</properties>
<dependencies>
<dependency>
<groupId>com.vdcommon</groupId>
<artifactId>common</artifactId>
<version>0.1-SNAPSHOT</version>
</dependency>
....
</dependencies>
<build>
<finalName>client</finalName>
<plugins>
<plugin>
....
</plugin>
</plugins>
</build>
</project>
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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.se</groupId>
<artifactId>base</artifactId>
<version>0.1-SNAPSHOT</version>
</parent>
<groupId>com.vdservice</groupId>
<artifactId>service</artifactId>
<packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>vdservcie Maven Webapp</name>
<url>http://maven.apache.org</url>
<properties>
....
</properties>
<dependencies>
....
<dependency>
<groupId>com.vdclient</groupId>
<artifactId>client</artifactId>
<version>0.1-SNAPSHOT</version>
</dependency>
....
</dependencies>
<build>
<finalName>service</finalName>
<plugins>
....
</plugins>
</build>
</project>
'service' module - это файл военных действий для развертывания и тестирования. Я могу выполнить maven установку для всех модулей успешно, и я могу видеть jar-файлы клиентских и общих модулей в дереве зависимостей.
[INFO] +- com.vdclient:client:jar:0.1-SNAPSHOT:compile
[INFO] | \- com.vdcommon:common:jar:0.1-SNAPSHOT:compile
Но когда я пытаюсь развернуть service war file
в Сервер tomcat Я получаю ClassNotFoundException
для класса, который присутствует в клиентском модуле
Caused by: java.lang.TypeNotPresentException: Type logical.lookuplogicalds_ws.PartyLookupDS not present
at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:117)
at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:125)
at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49)
at sun.reflect.generics.visitor.Reifier.reifyTypeArguments(Reifier.java:68)
at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:138)
at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49)
at sun.reflect.generics.repository.ConstructorRepository.getParameterTypes(ConstructorRepository.java:94)
at java.lang.reflect.Executable.getGenericParameterTypes(Executable.java:283)
at java.lang.reflect.Method.getGenericParameterTypes(Method.java:283)
at java.beans.FeatureDescriptor.getParameterTypes(FeatureDescriptor.java:387)
at java.beans.MethodDescriptor.setMethod(MethodDescriptor.java:116)
at java.beans.MethodDescriptor.<init>(MethodDescriptor.java:72)
at java.beans.MethodDescriptor.<init>(MethodDescriptor.java:56)
at java.beans.Introspector.getTargetMethodInfo(Introspector.java:1205)
at java.beans.Introspector.getBeanInfo(Introspector.java:426)
at java.beans.Introspector.getBeanInfo(Introspector.java:173)
at org.springframework.beans.CachedIntrospectionResults.<init>(CachedIntrospectionResults.java:277)
at org.springframework.beans.CachedIntrospectionResults.forClass(CachedIntrospectionResults.java:186)
at org.springframework.beans.BeanWrapperImpl.getCachedIntrospectionResults(BeanWrapperImpl.java:321)
at org.springframework.beans.BeanWrapperImpl.getPropertyDescriptors(BeanWrapperImpl.java:328)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.filterPropertyDescriptorsForDependencyCheck(AbstractAutowireCapableBeanFactory.java:1305)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.filterPropertyDescriptorsForDependencyCheck(AbstractAutowireCapableBeanFactory.java:1285)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1143)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
... 33 more
Caused by: java.lang.ClassNotFoundException: logical.lookuplogicalds_ws.PartyLookupDS
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1352)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1180)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:114)
... 56 more
Может кто-нибудь, пожалуйста, помогите мне решить эту проблему?