It's a strange error but possibly you have a direct dependency to jpa from your classes in the war and you haven't declared it (but rather relied on a transitive dependency to jpa for compilation, but now when that has been removed compilation fails).
Always declare your (direct) dependencies. /Anders On Tue, Dec 14, 2010 at 16:27, El Arbi ABOUSSOROR < [email protected]> wrote: > Hi > > > > I have a multi modules project with a jar module and war one. > > Actually I don't want to deploy 2 of my jar module dependencies to the war, > so I put a scope "provided" in the jar module pom. But when I run mvn > install I get the following error : > > > > [INFO] > ------------------------------------------------------------------------ > > [INFO] Building Unnamed - plpm:plpm.example-web:war:0.0.1-SNAPSHOT > 0.0.1-SNAPSHOT > > [INFO] > ------------------------------------------------------------------------ > > [INFO] > > [INFO] --- maven-resources-plugin:2.4.1:resources (default-resources) @ > plpm.example-web --- > > [WARNING] Using platform encoding (Cp1252 actually) to copy filtered > resources, i.e. build is platform dependent! > > [INFO] Copying 1 resource > > [INFO] > > [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ > plpm.example-web --- > > [WARNING] File encoding has not been set, using platform encoding Cp1252, > i.e. build is platform dependent! > > [INFO] Compiling 8 source files to > D:\tamed\produit\workspace\plpm.example\plpm.example-web\target\classes > > [INFO] ------------------------------------------------------------- > > [ERROR] COMPILATION ERROR : > > [INFO] ------------------------------------------------------------- > > [ERROR] Failure executing javac, but could not parse the error: > > An exception has occurred in the compiler (1.6.0_23). Please file a bug at > the Java Developer Connection (http://java.sun.com/webapps/bugreport) > after > checking the Bug Parade for duplicates. Include your program and the > following diagnostic in your report. Thank you. > > com.sun.tools.javac.code.Symbol$CompletionFailure: class file for > javax.persistence.GenerationType not found > > > > [INFO] 1 error > > [INFO] ------------------------------------------------------------- > > [INFO] > ------------------------------------------------------------------------ > > [INFO] Reactor Summary: > > [INFO] > > [INFO] Unnamed - plpm:plpm.example:pom:0.0.1-SNAPSHOT .... SUCCESS [0.203s] > > [INFO] Unnamed - plpm:plpm.example-model:jar:0.0.1-SNAPSHOT SUCCESS > [0.876s] > > [INFO] Unnamed - plpm:plpm.example-domain:jar:0.0.1-SNAPSHOT SUCCESS > [1.562s] > > [INFO] Unnamed - plpm:plpm.example-web:war:0.0.1-SNAPSHOT FAILURE [0.516s] > > [INFO] Unnamed - plpm:plpm.example-generator:jar:0.0.1-SNAPSHOT SKIPPED > > [INFO] > ------------------------------------------------------------------------ > > [INFO] BUILD FAILURE > > [INFO] > ------------------------------------------------------------------------ > > [INFO] Total time: 3.235s > > [INFO] Finished at: Tue Dec 14 16:25:43 CET 2010 > > [INFO] Final Memory: 10M/24M > > [INFO] > ------------------------------------------------------------------------ > > [ERROR] Failed to execute goal > org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile > (default-compile) on project plpm.example-web: Compilation failure > > Failure executing javac, but could not parse the error: > > An exception has occurred in the compiler (1.6.0_23). Please file a bug at > the Java Developer Connection (http://java.sun.com/webapps/bugreport) > after > checking the Bug Parade for duplicates. Include your program and the > following diagnostic in your report. Thank you. > > com.sun.tools.javac.code.Symbol$CompletionFailure: class file for > javax.persistence.GenerationType not found > > -> [Help 1] > > [ERROR] > > [ERROR] To see the full stack trace of the errors, re-run Maven with the -e > switch. > > [ERROR] Re-run Maven using the -X switch to enable full debug logging. > > [ERROR] > > [ERROR] For more information about the errors and possible solutions, > please > read the following articles: > > [ERROR] [Help 1] > http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException > > [ERROR] > > [ERROR] After correcting the problems, you can resume the build with the > command > > [ERROR] mvn <goals> -rf :plpm.example-web > > > > > > > > > > > > > >
