eclipse - Maven project doesn't see /target/classes nor /target/monitoring/WEB-INF/classes as classpath root -
i have maven project spring+jsf2+hibernate should deployed tomcat 7.
after building , deploying following exception:
grave: unable load annotated class: target.classes.com.barcelo.monapp.web.controller.monitoringbean, reason: java.lang.noclassdeffounderror: target/classes/com/barcelo/monapp/web/controller/monitoringbean (wrong name: com/barcelo/monapp/web/controller/monitoringbean) grave: unable load annotated class: target.monitoring.web-inf.classes.com.barcelo.monapp.web.controller.monitoringbean, reason: java.lang.noclassdeffounderror: target/monitoring/web-inf/classes/com/barcelo/monapp/web/controller/monitoringbean (wrong name: com/barcelo/monapp/web/controller/monitoringbean)
the /target/classes
, /target/monitoring/web-inf/classes
doesn't belong there.
here's 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"> <parent> <groupid>com.barcelo.monapp</groupid> <artifactid>monapp-parent</artifactid> <version>1.0-snapshot</version> <relativepath>../monapp-parent/pom.xml</relativepath> </parent> <modelversion>4.0.0</modelversion> <artifactid>monapp-web</artifactid> <packaging>war</packaging> <name>monapp-web</name> <url>http://maven.apache.org</url> <dependencies> <!-- monitoring client --> <dependency> <groupid>com.barcelo.monapp</groupid> <artifactid>monapp-client</artifactid> <version>1.0-snapshot</version> <exclusions> <exclusion> <groupid>org.slf4j</groupid> <artifactid>slf4j-api</artifactid> </exclusion> </exclusions> </dependency> <!-- monitoring service --> <dependency> <groupid>com.barcelo.monapp</groupid> <artifactid>monapp-service</artifactid> <version>1.0-snapshot</version> <exclusions> <exclusion> <groupid>org.slf4j</groupid> <artifactid>slf4j-api</artifactid> </exclusion> </exclusions> </dependency> <!-- monitoring data --> <dependency> <groupid>com.barcelo.monapp</groupid> <artifactid>monapp-data</artifactid> <version>1.0-snapshot</version> <exclusions> <exclusion> <groupid>org.slf4j</groupid> <artifactid>slf4j-api</artifactid> </exclusion> </exclusions> </dependency> <dependency> <groupid>org.springframework</groupid> <artifactid>spring-web</artifactid> <version>3.1.3.release</version> </dependency> <!-- jsf --> <dependency> <groupid>com.sun.faces</groupid> <artifactid>jsf-api</artifactid> <version>2.1.3</version> </dependency> <dependency> <groupid>com.sun.faces</groupid> <artifactid>jsf-impl</artifactid> <version>2.1.3</version> </dependency> <dependency> <groupid>javax.servlet</groupid> <artifactid>jstl</artifactid> <version>1.2</version> </dependency> <dependency> <groupid>javax.servlet</groupid> <artifactid>servlet-api</artifactid> <version>2.5</version> </dependency> <dependency> <groupid>javax.servlet.jsp</groupid> <artifactid>jsp-api</artifactid> <version>2.1</version> </dependency> <!-- el --> <dependency> <groupid>org.glassfish.web</groupid> <artifactid>el-impl</artifactid> <version>2.2</version> </dependency> </dependencies> <build> <finalname>monitoring</finalname> <plugins> <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-compiler-plugin</artifactid> <version>2.3.1</version> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin> </plugins> </build> </project>
how caused , how can solve it?