Im trying to make a simple java EE6 application. But i get a error while compiling. Can anyone help me. The error looks like this.
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project primetest: Compilation failure: Compilation failure:
[ERROR] \Java_Projecten\primetest\src\main\java\com\examples\greeting\AutoCompleteBean.java:[6,30] package javax.enterprise.inject does not exist
[ERROR] \Java_Projecten\primetest\src\main\java\com\examples\greeting\AutoCompleteBean.java:[8,1] cannot find symbol
[ERROR] symbol: class Model
[ERROR] @Model
[ERROR] \Java_Projecten\primetest\src\main\java\com\examples\greeting\DateBean.java:[5,30] package javax.enterprise.inject does not exist
[ERROR] \Java_Projecten\primetest\src\main\java\com\examples\greeting\DateBean.java:[7,1] cannot find symbol
[ERROR] symbol: class Model
[ERROR] @Model
[ERROR] \Java_Projecten\primetest\src\main\java\com\examples\greeting\GreetingBean.java:[3,30] package javax.enterprise.inject does not exist
[ERROR] \Java_Projecten\primetest\src\main\java\com\examples\greeting\GreetingBean.java:[5,1] cannot find symbol
[ERROR] symbol: class Model
[ERROR] @Model
I allready used the two methods beneath in mine project POM ->
Looks like you are missing the dependencies on these classes in your pom file. You have to add the required jar files for a project in the dependencies section of the pom.
This is similar to setting the classpath variable when you compile the code with a javac command. (Please check the maven docs for a better explanation of this. )
0x2B | ~0x2B
SCJD, SCJP 1.5, SCJP 1.4, SCBCD 1.3, SCWCD 1.4, SCJA, IBM Test 150, 142, 700, 701, Oracle Test 1Z0-51