If your default JDK is version 6 and that is the version you want to
compile with, then you don't need to fork the compiler. Remove fork,
executable and compilerVersion from the configuration.
Instead you need to tell maven which version your *source* and *target*
should be. You can read about how you can change this here:
http://maven.apache.org/plugins/maven-compiler-plugin/examples/set-compiler-source-and-target.html
Kyle.Bober wrote:
I have been using Maven for quite sometime and this is the first JDK6 project
POM I have created. I am running into a compilation issue using the
compiler:compile goal... This is what I get
annotations are not supported in -source 1.3
(use -source 5 or higher to enable annotations)
@WebService
I have my JAVA_HOME env variable set to point to JDK6 and I can compile the
java file fine using javac command but when I try using mvn compile I
receive the above error... I feel like a goof not being able to figure this
one out. Is there a way to set in the Maven POM file the JDK version to
compile against???
Here is my current POM.xml
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>com.heartlab.ws</groupId>
<artifactId>WebSendServices</artifactId>
<packaging>war</packaging>
<version>0.0.1</version>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<verbose>true</verbose>
<fork>true</fork>
<executable>${JAVA_HOME}/bin/javac</executable>
<compilerVersion>6</compilerVersion>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<!--
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.1</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.9</version>
</dependency>
-->
</dependencies>
</project>
Using the ${JAVA_HOME}/bin/javac for my executable I receive the following
error as well!!!
Failure executing javac, but could not parse the error:
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
Thanks for anyone's help in advance...
-Kyle
--
Dennis Lundberg
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]