You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by ankured182 <an...@yahoo.com> on 2011/01/16 07:11:14 UTC

Error while compiling : annotations are not supported in -source 1.3

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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Error while compiling : annotations are not supported in -source 1.3

Posted by Anders Hammar <an...@hammar.net>.
Possibly you need to move the compiler plugin configuration to
pluginManagement. Just take what you have (do remove the inherited element
though), but put it in pluginManagement.

/Anders

On Sun, Jan 16, 2011 at 07:11, ankured182 <an...@yahoo.com> wrote:

>
> 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&nf=1&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: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Error while compiling : annotations are not supported in -source 1.3

Posted by ankured182 <an...@yahoo.com>.
I am now running Maven 3 ..... and the  mvn compile  is successful . 
Hence It's got something to do with my lack of provisioning for Maven 2

However I am still getting another error  when I tried  to run the main
class  with Derby(with your suggestion on persistence taken into account) . 

I am making a new Post on that regard, as Its a different command.
-- 
View this message in context: http://maven.40175.n5.nabble.com/Error-while-compiling-annotations-are-not-supported-in-source-1-3-tp3343153p3364438.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Error while compiling : annotations are not supported in -source 1.3

Posted by ankured182 <an...@yahoo.com>.

Wayne Fay wrote:
> 
>> I have uploaded my project file here in Rapishare
>> http://rapidshare.com/files/443396415/je.zip . If possible , pls Run it
>> from
>> your Computer  . May be the error detection will be easier then.
> 
> I downloaded your project and ran it. The only failure I encountered
> was related to a missing dependency that was causing all of your
> javax.persistence references to fail.
> 
> I added the following to the chapter02/pom.xml file:
> <dependency>
>     <groupId>javax.persistence</groupId>
>     <artifactId>persistence-api</artifactId>
>     <version>1.0</version>
> </dependency>
> 
> and poof, everything worked just fine. I don't know what is causing
> your problems with the compiler etc, but try adding this dependency
> and see if things work a little better for you.
> 
> Wayne
> 

Wow .Thats so great of u to do that much..Far too kind!! ,ay I know which
Version of Maven r u using ? 
U know what Wayne . When I removed Maven 2 and used maven 3 .. I met with
the same error of missing dependency.

Now This is what I'm gonna do : Remove Maven 2 completely and run it with
maven 3 and of course apply the change that u suggest. Thanks a lot   
-- 
View this message in context: http://maven.40175.n5.nabble.com/Error-while-compiling-annotations-are-not-supported-in-source-1-3-tp3343153p3349080.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Error while compiling : annotations are not supported in -source 1.3

Posted by Wayne Fay <wa...@gmail.com>.
> I have uploaded my project file here in Rapishare
> http://rapidshare.com/files/443396415/je.zip . If possible , pls Run it from
> your Computer  . May be the error detection will be easier then.

I downloaded your project and ran it. The only failure I encountered
was related to a missing dependency that was causing all of your
javax.persistence references to fail.

I added the following to the chapter02/pom.xml file:
<dependency>
    <groupId>javax.persistence</groupId>
    <artifactId>persistence-api</artifactId>
    <version>1.0</version>
</dependency>

and poof, everything worked just fine. I don't know what is causing
your problems with the compiler etc, but try adding this dependency
and see if things work a little better for you.

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Error while compiling : annotations are not supported in -source 1.3

Posted by ankured182 <an...@yahoo.com>.

Wayne Fay wrote:
> 
>> 1. I made some changes in the pom.xml (indicated in Bold).
> 
> This list strips HTML and RTF so no one can see your "bold" text.
> 
>> 2. I ran mvn help:effective-pom  and this is what I got
> 
> OK... but what happens (now) when you run "mvn compile"? I assume you
> are running all of this from the command line, and not from Eclipse
> etc, right?
> 

Yes .I ran it  from the command line .. not IDE.
I 'm still getting the same old error  when I run mvn compile .



http://maven.40175.n5.nabble.com/file/n3347809/compile.jpg 

I have uploaded my project file here in Rapishare 
http://rapidshare.com/files/443396415/je.zip
http://rapidshare.com/files/443396415/je.zip . If possible , pls Run it from
your Computer  . May be the error detection will be easier then. 

I'm seeing stars . I've been in this stage since 2 months now!!! So pls
help.

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

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Error while compiling : annotations are not supported in -source 1.3

Posted by Wayne Fay <wa...@gmail.com>.
> 1. I made some changes in the pom.xml (indicated in Bold).

This list strips HTML and RTF so no one can see your "bold" text.

> 2. I ran mvn help:effective-pom  and this is what I got

OK... but what happens (now) when you run "mvn compile"? I assume you
are running all of this from the command line, and not from Eclipse
etc, right?

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Error while compiling : annotations are not supported in -source 1.3

Posted by ankured182 <an...@yahoo.com>.
>From what I could comprehend so far :

1. I made some changes in the pom.xml (indicated in Bold).

 
<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>
<pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
        </plugins>
</pluginManagement>
    </build>

</project>
   -------------------------------End Of
pom.xml------------------------------------------------------------


2. I ran mvn help:effective-pom  and this is what I got 

c:\je>mvn help:effective-pom
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO]   chapter02
[INFO]   Chapters Parent
[INFO] Searching repository for plugin with prefix: 'help'.
[INFO]
------------------------------------------------------------------------
[INFO] Building Chapters Parent
[INFO]    task-segment: [help:effective-pom] (aggregator-style)
[INFO]
------------------------------------------------------------------------
[INFO] [help:effective-pom {execution: default-cli}]
[INFO]
Effective POMs, after inheritance, interpolation, and profiles are applied:

<?xml version="1.0" encoding="UTF-8"?>
<!-- ======================================================================
-->
<!--                                                                       
-->
<!-- Generated by Maven Help Plugin on 2011-01-17T05:55:03                 
-->
<!-- See: http://maven.apache.org/plugins/maven-help-plugin/               
-->
<!--                                                                       
-->
<!-- ======================================================================
-->

<!-- ======================================================================
-->
<!--                                                                       
-->
<!-- Effective POM for project 'org.beginningee6.book:chapters:pom:2.0'    
-->
<!--                                                                       
-->
<!-- ======================================================================
-->

<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 h
ttp://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>
  <build>
    <sourceDirectory>c:\je\src\main\java</sourceDirectory>
    <scriptSourceDirectory>src/main/scripts</scriptSourceDirectory>
    <testSourceDirectory>c:\je\src\test\java</testSourceDirectory>
    <outputDirectory>c:\je\target\classes</outputDirectory>
    <testOutputDirectory>c:\je\target\test-classes</testOutputDirectory>
    <resources>
      <resource>
        <mergeId>resource-2</mergeId>
        <directory>c:\je\src\main\resources</directory>
      </resource>
    </resources>
    <testResources>
      <testResource>
        <mergeId>resource-3</mergeId>
        <directory>c:\je\src\test\resources</directory>
      </testResource>
    </testResources>
    <directory>c:\je\target</directory>
    <finalName>chapters-2.0</finalName>
    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-antrun-plugin</artifactId>
          <version>1.3</version>
        </plugin>
        <plugin>
          <artifactId>maven-assembly-plugin</artifactId>
          <version>2.2-beta-2</version>
        </plugin>
        <plugin>
          <artifactId>maven-clean-plugin</artifactId>
          <version>2.2</version>
        </plugin>
        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>2.3.2</version>
          <configuration>
            <source>1.6</source>
            <target>1.6</target>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>2.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>2.4</version>
        </plugin>
        <plugin>
          <artifactId>maven-ear-plugin</artifactId>
          <version>2.3.1</version>
        </plugin>
        <plugin>
          <artifactId>maven-ejb-plugin</artifactId>
          <version>2.1</version>
        </plugin>
        <plugin>
          <artifactId>maven-install-plugin</artifactId>
          <version>2.2</version>
        </plugin>
        <plugin>
          <artifactId>maven-jar-plugin</artifactId>
          <version>2.2</version>
        </plugin>
        <plugin>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>2.5</version>
        </plugin>
        <plugin>
          <artifactId>maven-plugin-plugin</artifactId>
          <version>2.4.3</version>
        </plugin>
        <plugin>
          <artifactId>maven-rar-plugin</artifactId>
          <version>2.2</version>
        </plugin>
        <plugin>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.0-beta-8</version>
        </plugin>
        <plugin>
          <artifactId>maven-resources-plugin</artifactId>
          <version>2.3</version>
        </plugin>
        <plugin>
          <artifactId>maven-site-plugin</artifactId>
          <version>2.0-beta-7</version>
        </plugin>
        <plugin>
          <artifactId>maven-source-plugin</artifactId>
          <version>2.0.4</version>
        </plugin>
        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.4.3</version>
        </plugin>
        <plugin>
          <artifactId>maven-war-plugin</artifactId>
          <version>2.1-alpha-2</version>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <artifactId>maven-help-plugin</artifactId>
        <version>2.1.1</version>
      </plugin>
    </plugins>
  </build>
  <modules>
    <module>chapter02</module>
  </modules>
  <repositories>
    <repository>
      <id>maven2-repository.dev.java.net</id>
      <name>Java.net Repository for Maven 2</name>
      <url>http://download.java.net/maven/2</url>
    </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/mav
en.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/</n
ame>
     
<url>http://www.eclipse.org/downloads/download.php?r=1&amp;nf=1&amp;file=/
rt/eclipselink/maven.repo</url>
    </repository>
    <repository>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>central</id>
      <name>Maven Repository Switchboard</name>
      <url>http://repo1.maven.org/maven2</url>
    </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</ur
l>
    </pluginRepository>
    <pluginRepository>
      <releases>
        <updatePolicy>never</updatePolicy>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>central</id>
      <name>Maven Plugin Repository</name>
      <url>http://repo1.maven.org/maven2</url>
    </pluginRepository>
  </pluginRepositories>
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.8.2</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <reporting>
    <outputDirectory>c:\je\target/site</outputDirectory>
  </reporting>
  <properties>
    <derby-version>10.6.2.1</derby-version>
    <eclipselink-version>2.1.2</eclipselink-version>
    <glassfish-version>3.0.1-b20</glassfish-version>
    <grizzly-version>1.8.6.3</grizzly-version>
    <javax.persistence-version>2.0.0</javax.persistence-version>
    <jaxb-version>2.1.10</jaxb-version>
    <jaxrs-version>1.1.1</jaxrs-version>
    <jaxws-version>2.2</jaxws-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-maven-jaxws>1.10</plugin-maven-jaxws>
    <plugin-maven-processor>1.3.5</plugin-maven-processor>
    <plugin-war-version>2.1.1</plugin-war-version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
   
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <xmlunit-version>1.2</xmlunit-version>
  </properties>
</project>

[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Mon Jan 17 17:55:03 ALMT 2011
[INFO] Final Memory: 5M/15M
[INFO]
------------------------------------------------------------------------
c:\je>

---------------------------------END OF Command
Screen---------------------------------------------------------------


Just For your information : I'm trying this Code for Chapter 2 -from  a book
Beginning Java EE 6(apress)  By Antonio Goncalves from 
http://kenai.com/projects/beginningee6/sources/src/show/book/trunk
http://kenai.com/projects/beginningee6/sources/src/show/book/trunk 


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

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Error while compiling : annotations are not supported in -source 1.3

Posted by Wayne Fay <wa...@gmail.com>.
> I'm not running it in any IDE . straight from the command shell.
> No other Java versions running I guess, other than 1.6.0_22. and its Maven
> 2.2.1.

Check what "mvn help:effective-pom" says when you run that from your
project directory. Perhaps there is another compiler configuration
that is being applied and you just don't even realize it?

Also, why do you have the plugin-maven-compiler as a property instead
of simply putting it directly in the <plugin/> node? It seems like a
bit of unnecessary indirection. I'd say the same thing about your
other plugin versions that are listed as properties. You should use
pluginManagement for this purpose.

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Error while compiling : annotations are not supported in -source 1.3

Posted by ankured182 <an...@yahoo.com>.
Ron Thanks for the reply.
I'm not running it in any IDE . straight from the command shell.
No other Java versions running I guess, other than 1.6.0_22. and its Maven
2.2.1.
http://maven.40175.n5.nabble.com/file/n3343936/maven2.jpg 
-- 
View this message in context: http://maven.40175.n5.nabble.com/Error-while-compiling-annotations-are-not-supported-in-source-1-3-tp3343153p3343936.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Error while compiling : annotations are not supported in -source 1.3

Posted by Ron Wheeler <rw...@artifact-software.com>.
What does your Java home point to?
Do you have Java 1.3 installed somewhere?
Are you running Maven in an IDE?
If you type "mvn -version" what prints out.

Ron

On 16/01/2011 1:11 AM, ankured182 wrote:
> 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>	
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org