Reputation: 105
When I execute any goal from compile onwards, it fails to compile my ui sub pom project. Just keeping the source/dir naming very bland, sorry. But the formatting is pretty much like this:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project ui: Compilation failure: Compilation failure:
[ERROR] could not parse error message: [parsing started C:\Path\Of\My\Project\src\main\java\com\ui\javaFile.java]
[ERROR] [parsing completed 16ms]
This same error with parsing gets done for all my java source files. Later on in the spam of ERRORs it says things like:
[ERROR] C:\Path\Of\My\Project\ui\src\main\java\com\ui\javaFile.java:[13,20] package javax.servlet does not exist
Does this mean it's failing to compile because I lack some needed dependencies?
My JAVA_HOME under Environment Variables is set to C:\Program Files\Java\jdk1.6.0_43 and my Path has %JAVA_HOME%\bin stuck to it. Also my parent pom has:
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler.plugins</artifactId>
<version>2.0.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
</pluginManagement>
And just for safety, it's in the normal plugins element too. I know for a fact my sub pom for the ui project references the parent pom correctly.
Not sure what else to think of :(
Go easy on me guys! I'm quite the Maven rookie. Having to convert an Ant build.xml project to Maven. Would love some advice :)
Upvotes: 1
Views: 7532
Reputation: 269
Maven signals, that there is no servlet-api
dependency in your pom.xml.
I would suggest you to include the following dependency to your pom.xml
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
</dependency>
Upvotes: 1