Hi . I'm getting this Error "annotations are not supported in -source 1.3" 
while trying to compile a Java EE project which has a simple entity that
uses JPA , from the root file je(which has the pom.xml) . I'm using MAven
2.2.1 . Its obvious that Maven not detecting the JAVA 6. In many forums 
that I went through that addressed this issue, the problem seemed to have
been solved by adding: 
                 <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration> 
My pom.xml has this included already, but I'm still getting that error. 

   : 

 


This is the ScreenShot of my command screen:
http://maven.40175.n5.nabble.com/file/n3343153/mvn.jpg 

This is my pom.xml:

<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/xsd/maven-4.0.0.xsd";>
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.beginningee6.book</groupId>
    <artifactId>chapters</artifactId>
    <version>2.0</version>
    <packaging>pom</packaging>
    <name>Chapters Parent</name>
    <description>Root pom.xml for all the chapters' code</description>

    <modules>
        <module>chapter02</module>
     </modules>

    <properties>
        <derby-version>10.6.2.1</derby-version>
        <eclipselink-version>2.1.2</eclipselink-version>
        <javax.persistence-version>2.0.0</javax.persistence-version>
        <glassfish-version>3.0.1-b20</glassfish-version>
        <grizzly-version>1.8.6.3</grizzly-version>
        <jaxb-version>2.1.10</jaxb-version>
        <jaxws-version>2.2</jaxws-version>
        <jaxrs-version>1.1.1</jaxrs-version>
        <jersey-version>1.2</jersey-version>
        <jsf-version>2.0</jsf-version>
        <junit-version>4.8.2</junit-version>
        <plugin-jar-version>2.3.1</plugin-jar-version>
        <plugin-war-version>2.1.1</plugin-war-version>
        <plugin-maven-processor>1.3.5</plugin-maven-processor>
        <plugin-maven-compiler>2.3.2</plugin-maven-compiler>
        <plugin-maven-jaxws>1.10</plugin-maven-jaxws>
        <xmlunit-version>1.2</xmlunit-version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
       
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    </properties>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit-version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <repositories>
        <!--<repository>-->
        <!--<id>maven-repository.dev.java.net</id>-->
        <!--<name>Java.net Repository for Maven 1</name>-->
        <!--<url>http://download.java.net/maven/1</url>-->
        <!--<layout>legacy</layout>-->
        <!--</repository>-->
        <repository>
            <id>maven2-repository.dev.java.net</id>
            <name>Java.net Repository for Maven 2</name>
            <url>http://download.java.net/maven/2</url>
            <layout>default</layout>
        </repository>

        <repository>
            <id>glassfish-maven-repository.dev.java.net</id>
            <name>GlassFish Maven Repository</name>
            <url>http://download.java.net/maven/glassfish</url>
        </repository>

        <repository>
            <id>EclipseLink Repo</id>
            <name>Eclipse maven repository
http://eclipse.ialto.org/rt/eclipselink/maven.repo/</name>
           
<url>http://mirror.csclub.uwaterloo.ca/eclipse/rt/eclipselink/maven.repo/</url>
        </repository>

        <repository>
            <id>EclipseLink Ialto Repo</id>
            <name>Eclipse maven
http://eclipse.ialto.com/rt/eclipselink/maven.repo/</name>
           
<url>http://www.eclipse.org/downloads/download.php?r=1&amp;nf=1&amp;file=/rt/eclipselink/maven.repo</url>
        </repository>

        <!--<repository>-->
        <!--<id>Apache Repo</id>-->
        <!--<name>Apache repository for Derby</name>-->
       
<!--<url>http://people.apache.org/repo/m1-ibiblio-rsync-repository</url>-->
        <!--<layout>legacy</layout>-->
        <!--</repository>-->
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>maven2-repository.dev.java.net</id>
            <url>http://download.java.net/maven/2</url>
        </pluginRepository>
        <pluginRepository>
            <id>maven-annotation-plugin</id>
           
<url>http://maven-annotation-plugin.googlecode.com/svn/trunk/mavenrepo</url>
        </pluginRepository>
    </pluginRepositories>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${plugin-maven-compiler}</version>
                <inherited>true</inherited>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>      

-- 
View this message in context: 
http://maven.40175.n5.nabble.com/Error-while-compiling-annotations-are-not-supported-in-source-1-3-tp3343153p3343153.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to