[error] failed execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project spring-intergation: compilation failure: compilation failure: [error] \spring-intergation\src\main\java\uk\co\dd\spring\domain\user.java:[3,24] package javax.persistence not exist [error] \spring-intergation\src\main\java\uk\co\dd\spring\domain\user.java:[4,24] package javax.persistence not exist [error] \spring-intergation\src\main\java\uk\co\dd\spring\domain\user.java:[5,24] package javax.persistence not exist [error] \spring-intergation\src\main\java\uk\co\dd\spring\domain\user.java:[6,24] package javax.persistence not exist [error] \spring-intergation\src\main\java\uk\co\dd\spring\domain\user.java:[7,24] package javax.persistence not exist [error] \spring-intergation\src\main\java\uk\co\dd\spring\domain\user.java:[9,1] cannot find symbol
but have added libraries in eclipse right clicking project , adding external jars.
when try run mvn compile these errors lot of other jars missing.
<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"> <build> <plugins> <plugin> <groupid>org.codehaus.mojo</groupid> <artifactid>exec-maven-plugin</artifactid> <executions> <execution> <goals> <goal>java</goal> </goals> </execution> </executions> <configuration> <mainclass>uk.co.dd.spring.app</mainclass> </configuration> </plugin> </plugins> </build> <modelversion>4.0.0</modelversion> <groupid>uk.co.dd.spring</groupid> <artifactid>spring-intergation</artifactid> <packaging>jar</packaging> <version>1.0-snapshot</version> <name>spring-intergation</name> <url>http://maven.apache.org</url> <dependencies> <dependency> <groupid>org.springframework</groupid> <artifactid>spring</artifactid> <version>2.5.5</version> </dependency> <dependency> <groupid>junit</groupid> <artifactid>junit</artifactid> <version>3.8.1</version> <scope>test</scope> </dependency> </dependencies> </project>
should pom.xml
add dependency
<dependency> <groupid>javax.persistence</groupid> <artifactid>persistence-api</artifactid> <version>1.0</version> </dependency>
Comments
Post a Comment