You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Brett Porter <br...@gmail.com> on 2005/05/01 03:18:53 UTC
Re: maven 2 alpha 1 and generics (java 5)
What you need is in your project.xml:
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>1.0-alpha-1</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
</plugins>
- Brett
On 5/1/05, c_inconnu3 <c_...@yahoo.fr> wrote:
> Hi,
>
> I am trying the new maven 2 alpha 1 (long life to Maven !) with Java 5
> and windows XP. But when i run "m2 compile" with a source file
> containing generics, I get the following error :
>
> [INFO]
> ----------------------------------------------------------------------------
> [INFO] Building null
> [INFO]
> ----------------------------------------------------------------------------
> [INFO] [clean:clean]
> [INFO] Deleting directory D:\projets\age\target
> [INFO] [resources:resources]
> [INFO] [compiler:compile]
> Compiling 6 source files to D:\projets\age\target\classes
> [INFO]
> ----------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO]
> ----------------------------------------------------------------------------
> [INFO] Reason: Compilation failure
> [INFO]
> ----------------------------------------------------------------------------
> [INFO]
> D:\projets\age\src\main\java\com\astralblade\age\options\ProfileSerializer.java:[29,7]
> Identifier expected.
>
> [INFO]
> ----------------------------------------------------------------------------
> [INFO] Total time: 1 seconds
> [INFO] Finished at: Sat Apr 30 16:55:35 CEST 2005
> [INFO] Final Memory: 1M/2M
> [INFO]
> ----------------------------------------------------------------------------
>
> The offending line is :
> Set<String> availableProfileNames() throws ProfileException;
>
> Maybe that happens because maven uses a jdk 1.4 although i put in
> C:\Documents and Settings\DD\.m2\settings.xml :
>
> <settings>
> <jdks>
> <jdk>
> <active>true</active>
> <javaHome>c:/programmation/jdk1.5.0_02</javaHome>
> <version>1.5</version>
> </jdk>
> </jdks>
> <profiles>
> <profile>
> <active>true</active>
> <localRepository>d:/temp/maven2/repository</localRepository>
> </profile>
> </profiles>
> </settings>
>
> Thanks
>
> DD
>
> ---------------------------------------------------------------------
> 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
Re: maven 2 alpha 1 and generics (java 5)
Posted by Brett Porter <br...@gmail.com>.
Correct. I didn't think this affected all platforms.
You can use the version "1.0-alpha-2-SNAPSHOT" for
maven-compiler-plugin as a workaround.
Cheers,
Brett
On 5/3/05, c_inconnu3 <c_...@yahoo.fr> wrote:
> NB (for people with the same problem):
>
> Thank you for your answer but i could not manage to get it work So i
> searched the web and found a case on jira for maven2 (*MNG-278
> <http://jira.codehaus.org/browse/MNG-278>*).
> It is a fix for alpha2 ; i am currently using alpha1.
>
> Thanks
>
> David
>
> Brett Porter a écrit :
>
> >What you need is in your project.xml:
> >
> ><plugins>
> > <plugin>
> > <artifactId>maven-compiler-plugin</artifactId>
> > <version>1.0-alpha-1</version>
> > <configuration>
> > <source>1.5</source>
> > <target>1.5</target>
> > </configuration>
> > </plugin>
> ></plugins>
> >
> >- Brett
> >
> >On 5/1/05, c_inconnu3 <c_...@yahoo.fr> wrote:
> >
> >
> >>Hi,
> >>
> >>I am trying the new maven 2 alpha 1 (long life to Maven !) with Java 5
> >>and windows XP. But when i run "m2 compile" with a source file
> >>containing generics, I get the following error :
> >>
> >>[INFO]
> >>----------------------------------------------------------------------------
> >>[INFO] Building null
> >>[INFO]
> >>----------------------------------------------------------------------------
> >>[INFO] [clean:clean]
> >>[INFO] Deleting directory D:\projets\age\target
> >>[INFO] [resources:resources]
> >>[INFO] [compiler:compile]
> >>Compiling 6 source files to D:\projets\age\target\classes
> >>[INFO]
> >>----------------------------------------------------------------------------
> >>[INFO] BUILD FAILURE
> >>[INFO]
> >>----------------------------------------------------------------------------
> >>[INFO] Reason: Compilation failure
> >>[INFO]
> >>----------------------------------------------------------------------------
> >>[INFO]
> >>D:\projets\age\src\main\java\com\ab\age\options\ProfileSerializer.java:[29,7]
> >>Identifier expected.
> >>
> >>[INFO]
> >>----------------------------------------------------------------------------
> >>[INFO] Total time: 1 seconds
> >>[INFO] Finished at: Sat Apr 30 16:55:35 CEST 2005
> >>[INFO] Final Memory: 1M/2M
> >>[INFO]
> >>----------------------------------------------------------------------------
> >>
> >>The offending line is :
> >>Set<String> availableProfileNames() throws ProfileException;
> >>
> >>Maybe that happens because maven uses a jdk 1.4 although i put in
> >>C:\Documents and Settings\DD\.m2\settings.xml :
> >>
> >><settings>
> >> <jdks>
> >> <jdk>
> >> <active>true</active>
> >> <javaHome>c:/programmation/jdk1.5.0_02</javaHome>
> >> <version>1.5</version>
> >> </jdk>
> >> </jdks>
> >> <profiles>
> >> <profile>
> >> <active>true</active>
> >> <localRepository>d:/temp/maven2/repository</localRepository>
> >> </profile>
> >> </profiles>
> >></settings>
> >>
> >>Thanks
> >>
> >>DD
> >>
> >>---------------------------------------------------------------------
> >>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
> >
> >
> >
> >
> >
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: maven 2 alpha 1 and generics (java 5)
Posted by c_inconnu3 <c_...@yahoo.fr>.
NB (for people with the same problem):
Thank you for your answer but i could not manage to get it work So i
searched the web and found a case on jira for maven2 (*MNG-278
<http://jira.codehaus.org/browse/MNG-278>*).
It is a fix for alpha2 ; i am currently using alpha1.
Thanks
David
Brett Porter a écrit :
>What you need is in your project.xml:
>
><plugins>
> <plugin>
> <artifactId>maven-compiler-plugin</artifactId>
> <version>1.0-alpha-1</version>
> <configuration>
> <source>1.5</source>
> <target>1.5</target>
> </configuration>
> </plugin>
></plugins>
>
>- Brett
>
>On 5/1/05, c_inconnu3 <c_...@yahoo.fr> wrote:
>
>
>>Hi,
>>
>>I am trying the new maven 2 alpha 1 (long life to Maven !) with Java 5
>>and windows XP. But when i run "m2 compile" with a source file
>>containing generics, I get the following error :
>>
>>[INFO]
>>----------------------------------------------------------------------------
>>[INFO] Building null
>>[INFO]
>>----------------------------------------------------------------------------
>>[INFO] [clean:clean]
>>[INFO] Deleting directory D:\projets\age\target
>>[INFO] [resources:resources]
>>[INFO] [compiler:compile]
>>Compiling 6 source files to D:\projets\age\target\classes
>>[INFO]
>>----------------------------------------------------------------------------
>>[INFO] BUILD FAILURE
>>[INFO]
>>----------------------------------------------------------------------------
>>[INFO] Reason: Compilation failure
>>[INFO]
>>----------------------------------------------------------------------------
>>[INFO]
>>D:\projets\age\src\main\java\com\ab\age\options\ProfileSerializer.java:[29,7]
>>Identifier expected.
>>
>>[INFO]
>>----------------------------------------------------------------------------
>>[INFO] Total time: 1 seconds
>>[INFO] Finished at: Sat Apr 30 16:55:35 CEST 2005
>>[INFO] Final Memory: 1M/2M
>>[INFO]
>>----------------------------------------------------------------------------
>>
>>The offending line is :
>>Set<String> availableProfileNames() throws ProfileException;
>>
>>Maybe that happens because maven uses a jdk 1.4 although i put in
>>C:\Documents and Settings\DD\.m2\settings.xml :
>>
>><settings>
>> <jdks>
>> <jdk>
>> <active>true</active>
>> <javaHome>c:/programmation/jdk1.5.0_02</javaHome>
>> <version>1.5</version>
>> </jdk>
>> </jdks>
>> <profiles>
>> <profile>
>> <active>true</active>
>> <localRepository>d:/temp/maven2/repository</localRepository>
>> </profile>
>> </profiles>
>></settings>
>>
>>Thanks
>>
>>DD
>>
>>---------------------------------------------------------------------
>>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
>
>
>
>
>