You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by thomas2004 <th...@yahoo.de> on 2008/09/24 11:45:22 UTC

A question about error message "annotations are not supported in -source 1.3"

Hi all,

I use Eclipse and the maven2 plugins to build project in Eclipse. I get an
error as I run "mvn install":

[code]
...
D:\Temp\myproject\src\main\java\com\mycompany\Person.java:[41,1] annotations
are not supported in -source 1.3
(try -source 1.5 to enable annotations)
@XmlAccessorType(XmlAccessType.FIELD)
...
[/code]

And the class Person.java looks as follow:
[code]
...
@XmlAccessorType(XmlAccessType.FIELD)  // here is the line 41
@XmlType(name = "Person", propOrder = {
    "name"
})
...
public class Person {

    @XmlElement(required = true)
    protected String name;
...
}

[/code]

My "pom.xml" looks as follow:
[code]
...
	<build>
		<plugins>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<source>1.5</source>
					<target>1.5</target>
				</configuration>
			</plugin>
		</plugins>
	</build>
...
[/code]

Someone can help?
-- 
View this message in context: http://www.nabble.com/A-question-about-error-message-%22annotations-are-not-supported-in--source-1.3%22-tp19645391p19645391.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: A question about error message "annotations are not supported in -source 1.3"

Posted by Nick Stolwijk <ni...@gmail.com>.
Can you run mvn -X install and look for the compile goal. There you
see the arguments to the java compiler. Is the source parameter used?

Hth,

Nick Stolwijk
~Java Developer~

Iprofs BV.
Claus Sluterweg 125
2012 WS Haarlem
www.iprofs.nl



On Wed, Sep 24, 2008 at 11:45 AM, thomas2004 <th...@yahoo.de> wrote:
>
> Hi all,
>
> I use Eclipse and the maven2 plugins to build project in Eclipse. I get an
> error as I run "mvn install":
>
> [code]
> ...
> D:\Temp\myproject\src\main\java\com\mycompany\Person.java:[41,1] annotations
> are not supported in -source 1.3
> (try -source 1.5 to enable annotations)
> @XmlAccessorType(XmlAccessType.FIELD)
> ...
> [/code]
>
> And the class Person.java looks as follow:
> [code]
> ...
> @XmlAccessorType(XmlAccessType.FIELD)  // here is the line 41
> @XmlType(name = "Person", propOrder = {
>    "name"
> })
> ...
> public class Person {
>
>    @XmlElement(required = true)
>    protected String name;
> ...
> }
>
> [/code]
>
> My "pom.xml" looks as follow:
> [code]
> ...
>        <build>
>                <plugins>
>                        <plugin>
>                                <artifactId>maven-compiler-plugin</artifactId>
>                                <configuration>
>                                        <source>1.5</source>
>                                        <target>1.5</target>
>                                </configuration>
>                        </plugin>
>                </plugins>
>        </build>
> ...
> [/code]
>
> Someone can help?
> --
> View this message in context: http://www.nabble.com/A-question-about-error-message-%22annotations-are-not-supported-in--source-1.3%22-tp19645391p19645391.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
>
>

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