我是maven的新手,现在尝试了2天以上来解决我的问题。但在经历了两个令人沮丧的日子之后,我不知道问题可以在哪里找到。我希望,有人可以提供帮助。
首先是项目的结构:
CentwertProject
--- CentwertApp
--- CentwertCore
问题是,依赖性适用于开发。 CentwertCore中包含的所有类都在CentwertApp项目中得到认可。 但是当我尝试在Eclipse中进行调试时,会抛出以下错误:
Servlet.service() for servlet [CentwertAppServlet] in context with path [/CentwertApp] threw exception [com.vaadin.server.ServiceException: java.lang.NoClassDefFoundError: de/qufis/CentwertCore/navigation/model/QFNavigator] with root cause
java.lang.ClassNotFoundException: de.qufis.CentwertCore.navigation.model.QFNavigator
QFNavigator是第一个从CentwertApp调用的类,位于CentwertCore。遗憾的是,我无法告诉maven或eclipse,可以找到CentwertCore类。
CentwertProject的pom-File
<modelVersion>4.0.0</modelVersion>
<groupId>de.qufis</groupId>
<artifactId>centwertProject</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>
<name>centwert-Projekt</name>
<properties>
<vaadin.version>7.5.9</vaadin.version>
<vaadin.plugin.version>${vaadin.version}</vaadin.plugin.version>
<jetty.plugin.version>9.2.3.v20140905</jetty.plugin.version>
<project.source.version>1.8</project.source.version>
<project.target.version>1.8</project.target.version>
<project.encoding>UTF-8</project.encoding>
</properties>
<modules>
<module>CentwertCore</module>
<module>centwertApp</module>
</modules>
CentwertApp pom-file的相关部分:
<modelVersion>4.0.0</modelVersion>
<artifactId>CentwertApp</artifactId>
<packaging>war</packaging>
<name>CentwertApp</name>
<parent>
<groupId>de.qufis</groupId>
<artifactId>centwertProject</artifactId>
<version>1.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<dependencies>
<dependency>
<groupId>de.qufis</groupId>
<artifactId>CentwertCore</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
</dependencies>
CentwertCore pom-file的相关部分:
<modelVersion>4.0.0</modelVersion>
<artifactId>CentwertCore</artifactId>
<packaging>jar</packaging>
<name>CentwertCore</name>
<version>0.0.1-SNAPSHOT</version>
<parent>
<groupId>de.qufis</groupId>
<artifactId>centwertProject</artifactId>
<version>1.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
由于
哈德