You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by William Hoover <wh...@nemours.org> on 2007/12/09 02:13:27 UTC

JDK 1.5 java.lang.Enum Buid Failure using Maven 2.0.8

I am using JDK 1.5 / Maven 2.0.8 and am attempting mvn clean install on a simple project that contains the following snippet:

...

public final Class<? extends Enum<? extends IDTOPhase>> getDTOPhaseLifeCycleStrategy(){
	return someEnumClass;
}

...

for(java.lang.Enum<? extends IDTOPhase> phase : getDTOPhaseLifeCycleStrategy().getEnumConstants()){
	...
}

...

The problem is that this compiles w/o a problem using ANT (or Eclipse build), but fails using Maven. I get the error:

... incompatible types
found : java.lang.Enum<? extends IDTOPhase>
required : java.lang.Enum<? extends IDTOPhase>

I even set the maven-compiler-plugin to ensure compilation in 1.5

<plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-compiler-plugin</artifactId>
	<version>2.0.2</version>
	<configuration>
		<source>1.5</source>
		<target>1.5</target>
	</configuration>
</plugin>

Any clue??? Thanks!

Re: JDK 1.5 java.lang.Enum Buid Failure using Maven 2.0.8

Posted by Kallin Nagelberg <ka...@gmail.com>.
To verify this you should try switching Eclipse to use your installed JDK
compiler instead of the built in one.

William also mentioned that ANT was producing successful builds as well, so
unless ANT also uses it's own compiler it might be another issue..

On Dec 11, 2007 11:29 AM, Wayne Fay <wa...@gmail.com> wrote:

> I played with your sample a bit and wrote a lengthy response in JIRA.
>
> I am reasonably convinced this is simply an example where Eclipse's
> JDT compiler is doing "something extra" that allows your code to work,
> but it really doesn't. You can't always trust Eclipse, as it does not
> dispatch to your system's JDK for compiling like Maven does (as far as
> I understand what is happening under the hood in Eclipse and Maven).
>
> Wayne
>
> On 12/11/07, William Hoover <wh...@nemours.org> wrote:
> > Done: http://jira.codehaus.org/browse/PLX-358 complete w/sample project.
> >
> > -----Original Message-----
> > From: Wayne Fay [mailto:waynefay@gmail.com]
> > Sent: Monday, December 10, 2007 4:49 PM
> > To: Maven Users List
> > Subject: Re: JDK 1.5 java.lang.Enum Buid Failure using Maven 2.0.8
> >
> >
> > Zip up a small sample project, create a JIRA issue, and attach it.
> > Then someone can look at your issue more closely.
> >
> > Wayne
> >
> > On 12/10/07, William Hoover <wh...@nemours.org> wrote:
> > > No takers?
> > >
> > > -----Original Message-----
> > > From: William Hoover [mailto:whoover@nemours.org]
> > > Sent: Saturday, December 08, 2007 8:13 PM
> > > To: users@maven.apache.org
> > > Subject: JDK 1.5 java.lang.Enum Buid Failure using Maven 2.0.8
> > >
> > >
> > > I am using JDK 1.5 / Maven 2.0.8 and am attempting mvn clean install
> on a simple project that contains the following snippet:
> > >
> > > ...
> > >
> > > public final Class<? extends Enum<? extends IDTOPhase>>
> getDTOPhaseLifeCycleStrategy(){
> > >        return someEnumClass;
> > > }
> > >
> > > ...
> > >
> > > for(java.lang.Enum<? extends IDTOPhase> phase :
> getDTOPhaseLifeCycleStrategy().getEnumConstants()){
> > >        ...
> > > }
> > >
> > > ...
> > >
> > > The problem is that this compiles w/o a problem using ANT (or Eclipse
> build), but fails using Maven. I get the error:
> > >
> > > ... incompatible types
> > > found : java.lang.Enum<? extends IDTOPhase>
> > > required : java.lang.Enum<? extends IDTOPhase>
> > >
> > > I even set the maven-compiler-plugin to ensure compilation in 1.5
> > >
> > > <plugin>
> > >        <groupId>org.apache.maven.plugins</groupId>
> > >        <artifactId>maven-compiler-plugin</artifactId>
> > >        <version>2.0.2</version>
> > >        <configuration>
> > >                <source>1.5</source>
> > >                <target>1.5</target>
> > >        </configuration>
> > > </plugin>
> > >
> > > Any clue??? Thanks!
> > >
> > >
> > > ---------------------------------------------------------------------
> > > 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
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: JDK 1.5 java.lang.Enum Buid Failure using Maven 2.0.8

Posted by Wayne Fay <wa...@gmail.com>.
I played with your sample a bit and wrote a lengthy response in JIRA.

I am reasonably convinced this is simply an example where Eclipse's
JDT compiler is doing "something extra" that allows your code to work,
but it really doesn't. You can't always trust Eclipse, as it does not
dispatch to your system's JDK for compiling like Maven does (as far as
I understand what is happening under the hood in Eclipse and Maven).

Wayne

On 12/11/07, William Hoover <wh...@nemours.org> wrote:
> Done: http://jira.codehaus.org/browse/PLX-358 complete w/sample project.
>
> -----Original Message-----
> From: Wayne Fay [mailto:waynefay@gmail.com]
> Sent: Monday, December 10, 2007 4:49 PM
> To: Maven Users List
> Subject: Re: JDK 1.5 java.lang.Enum Buid Failure using Maven 2.0.8
>
>
> Zip up a small sample project, create a JIRA issue, and attach it.
> Then someone can look at your issue more closely.
>
> Wayne
>
> On 12/10/07, William Hoover <wh...@nemours.org> wrote:
> > No takers?
> >
> > -----Original Message-----
> > From: William Hoover [mailto:whoover@nemours.org]
> > Sent: Saturday, December 08, 2007 8:13 PM
> > To: users@maven.apache.org
> > Subject: JDK 1.5 java.lang.Enum Buid Failure using Maven 2.0.8
> >
> >
> > I am using JDK 1.5 / Maven 2.0.8 and am attempting mvn clean install on a simple project that contains the following snippet:
> >
> > ...
> >
> > public final Class<? extends Enum<? extends IDTOPhase>> getDTOPhaseLifeCycleStrategy(){
> >        return someEnumClass;
> > }
> >
> > ...
> >
> > for(java.lang.Enum<? extends IDTOPhase> phase : getDTOPhaseLifeCycleStrategy().getEnumConstants()){
> >        ...
> > }
> >
> > ...
> >
> > The problem is that this compiles w/o a problem using ANT (or Eclipse build), but fails using Maven. I get the error:
> >
> > ... incompatible types
> > found : java.lang.Enum<? extends IDTOPhase>
> > required : java.lang.Enum<? extends IDTOPhase>
> >
> > I even set the maven-compiler-plugin to ensure compilation in 1.5
> >
> > <plugin>
> >        <groupId>org.apache.maven.plugins</groupId>
> >        <artifactId>maven-compiler-plugin</artifactId>
> >        <version>2.0.2</version>
> >        <configuration>
> >                <source>1.5</source>
> >                <target>1.5</target>
> >        </configuration>
> > </plugin>
> >
> > Any clue??? Thanks!
> >
> >
> > ---------------------------------------------------------------------
> > 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
>
>

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


RES: JDK 1.5 java.lang.Enum Buid Failure using Maven 2.0.8

Posted by Arthur Rodrigues Stilben <ar...@extendnet.com.br>.
I would like to know how can I do to use two kinds of packages in the same file. For example, I have an app.class and I want to create an app.jar and an app.war file. How can I do that?

Arthur Rodrigues Stilben
________________________________________
De: Wayne Fay [waynefay@gmail.com]
Enviado: segunda-feira, 10 de dezembro de 2007 19:48
Para: Maven Users List
Assunto: Re: JDK 1.5 java.lang.Enum Buid Failure using Maven 2.0.8

Zip up a small sample project, create a JIRA issue, and attach it.
Then someone can look at your issue more closely.

Wayne

On 12/10/07, William Hoover <wh...@nemours.org> wrote:
> No takers?
>
> -----Original Message-----
> From: William Hoover [mailto:whoover@nemours.org]
> Sent: Saturday, December 08, 2007 8:13 PM
> To: users@maven.apache.org
> Subject: JDK 1.5 java.lang.Enum Buid Failure using Maven 2.0.8
>
>
> I am using JDK 1.5 / Maven 2.0.8 and am attempting mvn clean install on a simple project that contains the following snippet:
>
> ...
>
> public final Class<? extends Enum<? extends IDTOPhase>> getDTOPhaseLifeCycleStrategy(){
>        return someEnumClass;
> }
>
> ...
>
> for(java.lang.Enum<? extends IDTOPhase> phase : getDTOPhaseLifeCycleStrategy().getEnumConstants()){
>        ...
> }
>
> ...
>
> The problem is that this compiles w/o a problem using ANT (or Eclipse build), but fails using Maven. I get the error:
>
> ... incompatible types
> found : java.lang.Enum<? extends IDTOPhase>
> required : java.lang.Enum<? extends IDTOPhase>
>
> I even set the maven-compiler-plugin to ensure compilation in 1.5
>
> <plugin>
>        <groupId>org.apache.maven.plugins</groupId>
>        <artifactId>maven-compiler-plugin</artifactId>
>        <version>2.0.2</version>
>        <configuration>
>                <source>1.5</source>
>                <target>1.5</target>
>        </configuration>
> </plugin>
>
> Any clue??? Thanks!
>
>
> ---------------------------------------------------------------------
> 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: JDK 1.5 java.lang.Enum Buid Failure using Maven 2.0.8

Posted by William Hoover <wh...@nemours.org>.
Done: http://jira.codehaus.org/browse/PLX-358 complete w/sample project.

-----Original Message-----
From: Wayne Fay [mailto:waynefay@gmail.com]
Sent: Monday, December 10, 2007 4:49 PM
To: Maven Users List
Subject: Re: JDK 1.5 java.lang.Enum Buid Failure using Maven 2.0.8


Zip up a small sample project, create a JIRA issue, and attach it.
Then someone can look at your issue more closely.

Wayne

On 12/10/07, William Hoover <wh...@nemours.org> wrote:
> No takers?
>
> -----Original Message-----
> From: William Hoover [mailto:whoover@nemours.org]
> Sent: Saturday, December 08, 2007 8:13 PM
> To: users@maven.apache.org
> Subject: JDK 1.5 java.lang.Enum Buid Failure using Maven 2.0.8
>
>
> I am using JDK 1.5 / Maven 2.0.8 and am attempting mvn clean install on a simple project that contains the following snippet:
>
> ...
>
> public final Class<? extends Enum<? extends IDTOPhase>> getDTOPhaseLifeCycleStrategy(){
>        return someEnumClass;
> }
>
> ...
>
> for(java.lang.Enum<? extends IDTOPhase> phase : getDTOPhaseLifeCycleStrategy().getEnumConstants()){
>        ...
> }
>
> ...
>
> The problem is that this compiles w/o a problem using ANT (or Eclipse build), but fails using Maven. I get the error:
>
> ... incompatible types
> found : java.lang.Enum<? extends IDTOPhase>
> required : java.lang.Enum<? extends IDTOPhase>
>
> I even set the maven-compiler-plugin to ensure compilation in 1.5
>
> <plugin>
>        <groupId>org.apache.maven.plugins</groupId>
>        <artifactId>maven-compiler-plugin</artifactId>
>        <version>2.0.2</version>
>        <configuration>
>                <source>1.5</source>
>                <target>1.5</target>
>        </configuration>
> </plugin>
>
> Any clue??? Thanks!
>
>
> ---------------------------------------------------------------------
> 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: JDK 1.5 java.lang.Enum Buid Failure using Maven 2.0.8

Posted by Wayne Fay <wa...@gmail.com>.
Zip up a small sample project, create a JIRA issue, and attach it.
Then someone can look at your issue more closely.

Wayne

On 12/10/07, William Hoover <wh...@nemours.org> wrote:
> No takers?
>
> -----Original Message-----
> From: William Hoover [mailto:whoover@nemours.org]
> Sent: Saturday, December 08, 2007 8:13 PM
> To: users@maven.apache.org
> Subject: JDK 1.5 java.lang.Enum Buid Failure using Maven 2.0.8
>
>
> I am using JDK 1.5 / Maven 2.0.8 and am attempting mvn clean install on a simple project that contains the following snippet:
>
> ...
>
> public final Class<? extends Enum<? extends IDTOPhase>> getDTOPhaseLifeCycleStrategy(){
>        return someEnumClass;
> }
>
> ...
>
> for(java.lang.Enum<? extends IDTOPhase> phase : getDTOPhaseLifeCycleStrategy().getEnumConstants()){
>        ...
> }
>
> ...
>
> The problem is that this compiles w/o a problem using ANT (or Eclipse build), but fails using Maven. I get the error:
>
> ... incompatible types
> found : java.lang.Enum<? extends IDTOPhase>
> required : java.lang.Enum<? extends IDTOPhase>
>
> I even set the maven-compiler-plugin to ensure compilation in 1.5
>
> <plugin>
>        <groupId>org.apache.maven.plugins</groupId>
>        <artifactId>maven-compiler-plugin</artifactId>
>        <version>2.0.2</version>
>        <configuration>
>                <source>1.5</source>
>                <target>1.5</target>
>        </configuration>
> </plugin>
>
> Any clue??? Thanks!
>
>
> ---------------------------------------------------------------------
> 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: JDK 1.5 java.lang.Enum Buid Failure using Maven 2.0.8

Posted by William Hoover <wh...@nemours.org>.
No takers?

-----Original Message-----
From: William Hoover [mailto:whoover@nemours.org]
Sent: Saturday, December 08, 2007 8:13 PM
To: users@maven.apache.org
Subject: JDK 1.5 java.lang.Enum Buid Failure using Maven 2.0.8


I am using JDK 1.5 / Maven 2.0.8 and am attempting mvn clean install on a simple project that contains the following snippet:

...

public final Class<? extends Enum<? extends IDTOPhase>> getDTOPhaseLifeCycleStrategy(){
	return someEnumClass;
}

...

for(java.lang.Enum<? extends IDTOPhase> phase : getDTOPhaseLifeCycleStrategy().getEnumConstants()){
	...
}

...

The problem is that this compiles w/o a problem using ANT (or Eclipse build), but fails using Maven. I get the error:

... incompatible types
found : java.lang.Enum<? extends IDTOPhase>
required : java.lang.Enum<? extends IDTOPhase>

I even set the maven-compiler-plugin to ensure compilation in 1.5

<plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-compiler-plugin</artifactId>
	<version>2.0.2</version>
	<configuration>
		<source>1.5</source>
		<target>1.5</target>
	</configuration>
</plugin>

Any clue??? Thanks!


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