You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by jiangshachina <ji...@gmail.com> on 2006/11/22 06:17:45 UTC

set -source 1.5?

Hi guys,
My project uses JDK1.5.0, and its new features(e.g. Annotation).
I have set following scripts in pom.xml
<plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
                <source>1.5</source>
                <target>1.5</target>
        </configuration>
</plugin> 
but when I run "mvn compile", Maven reposted
-resouce 1.4 doesn't support Annotation
What's wrong with the matter?
Thanks in advance!

a cup of Java, cheers!
Sha Jiang
-- 
View this message in context: http://www.nabble.com/set--source-1.5--tf2683585s177.html#a7485367
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: set -source 1.5?

Posted by Paolo Bacci <pa...@longadata.com>.
I had problem like this one last week and in my case was that my javac was
pointing to 1.5, while my java was pointing to 1.4
Maybe you're having the same problem.
Try checking if javac and java are pointing to 1.5.
It may be 1.4 as default.

Paolo


On 11/22/06, Eric Redmond <er...@gmail.com> wrote:
>
> Are you using a compiler other than Sun or IBM? If so, you may have to add
> this configuration (or whatever arg is speciific to your compiler):
>
>           <compilerArguments>
>             <resouce>1.4</resouce>
>           </compilerArguments>
>
> Eric
>
> On 11/ 21/06, jiangshachina <ji...@gmail.com> wrote:
> >
> >
> > Hi guys,
> > My project uses JDK1.5.0, and its new features(e.g. Annotation).
> > I have set following scripts in pom.xml
> > <plugin>
> >         <groupId>org.apache.maven.plugins</groupId>
> >         <artifactId>maven-compiler-plugin</artifactId>
> >         <configuration>
> >                 <source>1.5</source>
> >                 <target>1.5</target>
> >         </configuration>
> > </plugin>
> > but when I run "mvn compile", Maven reposted
> > -resouce 1.4 doesn't support Annotation
> > What's wrong with the matter?
> > Thanks in advance!
> >
> > a cup of Java, cheers!
> > Sha Jiang
> > --
> > View this message in context: http://www.nabble.com/set--
> > source-1.5--tf2683585s177.html#a7485367
> > 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
> >
> >
>
>
> --
> Eric Redmond
> http://codehaus.org/~eredmond
>
>

Re: set -source 1.5?

Posted by Eric Redmond <er...@gmail.com>.
Are you using a compiler other than Sun or IBM? If so, you may have to add
this configuration (or whatever arg is speciific to your compiler):

          <compilerArguments>
            <resouce>1.4</resouce>
          </compilerArguments>

Eric

On 11/ 21/06, jiangshachina <ji...@gmail.com> wrote:
>
>
> Hi guys,
> My project uses JDK1.5.0, and its new features(e.g. Annotation).
> I have set following scripts in pom.xml
> <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-compiler-plugin</artifactId>
>         <configuration>
>                 <source>1.5</source>
>                 <target>1.5</target>
>         </configuration>
> </plugin>
> but when I run "mvn compile", Maven reposted
> -resouce 1.4 doesn't support Annotation
> What's wrong with the matter?
> Thanks in advance!
>
> a cup of Java, cheers!
> Sha Jiang
> --
> View this message in context: http://www.nabble.com/set--
> source-1.5--tf2683585s177.html#a7485367
> 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
>
>


-- 
Eric Redmond
http://codehaus.org/~eredmond