Problems building maven-plugin in Eclipse

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

Problems building maven-plugin in Eclipse

Christoph Kutzinski
Hi,

I had several problems with building Jenkins/maven-plugin in the past,
but the errors I'm getting now are especial nasty:
Eclipse e.g. complains that it cannot find hudson.model.Queue.Item (in
MavenModuleSet) and several other compile errors.
I checked the the Jenkins core jar is intact (building with mvn works)
and no amount of refreshing in Eclipse and the usual other tricks to get
it working again got me anywhere.

Did anyone have similar problems and maybe a solution?
Eclipse Kepler 4.3.1, M2e 1.4.0

-
Kutzi

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Problems building maven-plugin in Eclipse

Baptiste MATHUS-3
Hi, First thing I would ask is: does it build on the CLI outside Eclipse? That'll be a first step to see if this is likely a Maven issue or more an Eclipse or even a jenkins code one.
My 2 cents


2013/11/15 Christoph Kutzinski <[hidden email]>
Hi,

I had several problems with building Jenkins/maven-plugin in the past, but the errors I'm getting now are especial nasty:
Eclipse e.g. complains that it cannot find hudson.model.Queue.Item (in MavenModuleSet) and several other compile errors.
I checked the the Jenkins core jar is intact (building with mvn works) and no amount of refreshing in Eclipse and the usual other tricks to get it working again got me anywhere.

Did anyone have similar problems and maybe a solution?
Eclipse Kepler 4.3.1, M2e 1.4.0

-
Kutzi

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.



--
Baptiste <Batmat> MATHUS - http://batmat.net
Sauvez un arbre,
Mangez un castor !

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Problems building maven-plugin in Eclipse

Marcelo Rebasti
Kutzi, in the category "Maven Problems" of the view "Markers" inside eclipse, you see any error?


On Fri, Nov 15, 2013 at 5:55 PM, Baptiste Mathus <[hidden email]> wrote:
Hi, First thing I would ask is: does it build on the CLI outside Eclipse? That'll be a first step to see if this is likely a Maven issue or more an Eclipse or even a jenkins code one.
My 2 cents


2013/11/15 Christoph Kutzinski <[hidden email]>
Hi,

I had several problems with building Jenkins/maven-plugin in the past, but the errors I'm getting now are especial nasty:
Eclipse e.g. complains that it cannot find hudson.model.Queue.Item (in MavenModuleSet) and several other compile errors.
I checked the the Jenkins core jar is intact (building with mvn works) and no amount of refreshing in Eclipse and the usual other tricks to get it working again got me anywhere.

Did anyone have similar problems and maybe a solution?
Eclipse Kepler 4.3.1, M2e 1.4.0

-
Kutzi

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.



--
Baptiste <Batmat> MATHUS - http://batmat.net
Sauvez un arbre,
Mangez un castor !

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Problems building maven-plugin in Eclipse

Christoph Kutzinski
In reply to this post by Baptiste MATHUS-3
Yes, it works on the CLI

Am 15.11.2013 21:55, schrieb Baptiste Mathus:
Hi, First thing I would ask is: does it build on the CLI outside Eclipse? That'll be a first step to see if this is likely a Maven issue or more an Eclipse or even a jenkins code one.
My 2 cents


2013/11/15 Christoph Kutzinski <[hidden email]>
Hi,

I had several problems with building Jenkins/maven-plugin in the past, but the errors I'm getting now are especial nasty:
Eclipse e.g. complains that it cannot find hudson.model.Queue.Item (in MavenModuleSet) and several other compile errors.
I checked the the Jenkins core jar is intact (building with mvn works) and no amount of refreshing in Eclipse and the usual other tricks to get it working again got me anywhere.

Did anyone have similar problems and maybe a solution?
Eclipse Kepler 4.3.1, M2e 1.4.0

-
Kutzi

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.



--
Baptiste <Batmat> MATHUS - http://batmat.net
Sauvez un arbre,
Mangez un castor !
--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Problems building maven-plugin in Eclipse

Christoph Kutzinski
In reply to this post by Marcelo Rebasti
No Maven Problems, only Java problems:


Description    Resource    Path    Location    Type
Cannot make a static reference to the non-static method save() from the type AbstractProject<MavenModuleSet,MavenModuleSetBuild>    MavenModuleSet.java    /maven-plugin/src/main/java/hudson/maven    line 1320    Java Problem
AbstractProjectDescriptor cannot be resolved to a type    MavenModuleSet.java    /maven-plugin/src/main/java/hudson/maven    line 1259    Java Problem
Cannot make a static reference to the non-static method save() from the type AbstractProject<MavenModuleSet,MavenModuleSetBuild>    MavenModuleSet.java    /maven-plugin/src/main/java/hudson/maven    line 1278    Java Problem
The method alignToBaseDirectory(File) of type new ExpressionEvaluator(){} must override a superclass method    MojoInfoBuilder.java    /maven-plugin/src/test/java/hudson/maven    line 81    Java Problem
Cannot make a static reference to the non-static method save() from the type AbstractProject<MavenModuleSet,MavenModuleSetBuild>    MavenModuleSet.java    /maven-plugin/src/main/java/hudson/maven    line 1290    Java Problem
Bound mismatch: The generic method getDescriptorByType(Class<T>) of type Jenkins is not applicable for the arguments (Class<MavenModuleSet.DescriptorImpl>). The inferred type MavenModuleSet.DescriptorImpl is not a valid substitute for the bounded parameter <T extends Descriptor>    MavenOptsTest.java    /maven-plugin/src/test/java/hudson/maven    line 20    Java Problem
The method annotate(ConsoleNote) of type SurefireArchiverUnitTest.NullBuildListener must override a superclass method    SurefireArchiverUnitTest.java    /maven-plugin/src/test/java/hudson/maven/reporters    line 303    Java Problem
The method apply(String) of type new Function<String,File>(){} must override a superclass method    TestMojo.java    /maven-plugin/src/main/java/hudson/maven/reporters    line 165    Java Problem
Queue.Item cannot be resolved to a type    MavenModuleSet.java    /maven-plugin/src/main/java/hudson/maven    line 1104    Java Problem
Queue.Item cannot be resolved to a type    MavenModuleSet.java    /maven-plugin/src/main/java/hudson/maven    line 1108    Java Problem
Queue.Item cannot be resolved to a type    MavenModuleSet.java    /maven-plugin/src/main/java/hudson/maven    line 1097    Java Problem
Cannot cast from Descriptor to MavenModuleSet.DescriptorImpl    MavenModuleSet.java    /maven-plugin/src/main/java/hudson/maven    line 1219    Java Problem
The method apply(File) of type new Predicate<File>(){} must override a superclass method    SurefireArchiver.java    /maven-plugin/src/main/java/hudson/maven/reporters    line 140    Java Problem
AbstractProjectDescriptor cannot be resolved to a type    MavenModuleSet.java    /maven-plugin/src/main/java/hudson/maven    line 1230    Java Problem
The method apply(File) of type new Predicate<File>(){} must override a superclass method    SurefireArchiver.java    /maven-plugin/src/main/java/hudson/maven/reporters    line 268    Java Problem
Queue.Item cannot be resolved to a type    MavenModuleSet.java    /maven-plugin/src/main/java/hudson/maven    line 1109    Java Problem
Queue.Item cannot be resolved to a type    MavenModuleSet.java    /maven-plugin/src/main/java/hudson/maven    line 1109    Java Problem
The method apply(String) of type new Function<String,File>(){} must override a superclass method    SurefireArchiver.java    /maven-plugin/src/main/java/hudson/maven/reporters    line 282    Java Problem
Queue.Item cannot be resolved to a type    MavenModuleSet.java    /maven-plugin/src/main/java/hudson/maven    line 1110    Java Problem

...


Am 15.11.2013 22:15, schrieb Marcelo:
Kutzi, in the category "Maven Problems" of the view "Markers" inside eclipse, you see any error?


On Fri, Nov 15, 2013 at 5:55 PM, Baptiste Mathus <[hidden email]> wrote:
Hi, First thing I would ask is: does it build on the CLI outside Eclipse? That'll be a first step to see if this is likely a Maven issue or more an Eclipse or even a jenkins code one.
My 2 cents


2013/11/15 Christoph Kutzinski <[hidden email]>
Hi,

I had several problems with building Jenkins/maven-plugin in the past, but the errors I'm getting now are especial nasty:
Eclipse e.g. complains that it cannot find hudson.model.Queue.Item (in MavenModuleSet) and several other compile errors.
I checked the the Jenkins core jar is intact (building with mvn works) and no amount of refreshing in Eclipse and the usual other tricks to get it working again got me anywhere.

Did anyone have similar problems and maybe a solution?
Eclipse Kepler 4.3.1, M2e 1.4.0

-
Kutzi

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.



--
Baptiste <Batmat> MATHUS - http://batmat.net
Sauvez un arbre,
Mangez un castor !
--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Problems building maven-plugin in Eclipse

vlatombe
Hi,

I have exactly the same issue. Compiling in command line works, however in Eclipse, some inner classes cannot be resolved (despite being able to browse them in the classpath of the eclipse project).

Eclipse is unable to resolve these 3 classes :
- hudson.model.AbstractProject.AbstractProjectDescriptor
- hudson.model.Queue.Task
- hudson.model.Queue.Item

I'm trying to isolate the problem, so far I found it depends on the core version, and the problem appeared between 1.517 and 1.524.

Vincent

Vincent


2013/11/16 Christoph Kutzinski <[hidden email]>
No Maven Problems, only Java problems:


Description    Resource    Path    Location    Type
Cannot make a static reference to the non-static method save() from the type AbstractProject<MavenModuleSet,MavenModuleSetBuild>    MavenModuleSet.java    /maven-plugin/src/main/java/hudson/maven    line 1320    Java Problem
AbstractProjectDescriptor cannot be resolved to a type    MavenModuleSet.java    /maven-plugin/src/main/java/hudson/maven    line 1259    Java Problem
Cannot make a static reference to the non-static method save() from the type AbstractProject<MavenModuleSet,MavenModuleSetBuild>    MavenModuleSet.java    /maven-plugin/src/main/java/hudson/maven    line 1278    Java Problem
The method alignToBaseDirectory(File) of type new ExpressionEvaluator(){} must override a superclass method    MojoInfoBuilder.java    /maven-plugin/src/test/java/hudson/maven    line 81    Java Problem
Cannot make a static reference to the non-static method save() from the type AbstractProject<MavenModuleSet,MavenModuleSetBuild>    MavenModuleSet.java    /maven-plugin/src/main/java/hudson/maven    line 1290    Java Problem
Bound mismatch: The generic method getDescriptorByType(Class<T>) of type Jenkins is not applicable for the arguments (Class<MavenModuleSet.DescriptorImpl>). The inferred type MavenModuleSet.DescriptorImpl is not a valid substitute for the bounded parameter <T extends Descriptor>    MavenOptsTest.java    /maven-plugin/src/test/java/hudson/maven    line 20    Java Problem
The method annotate(ConsoleNote) of type SurefireArchiverUnitTest.NullBuildListener must override a superclass method    SurefireArchiverUnitTest.java    /maven-plugin/src/test/java/hudson/maven/reporters    line 303    Java Problem
The method apply(String) of type new Function<String,File>(){} must override a superclass method    TestMojo.java    /maven-plugin/src/main/java/hudson/maven/reporters    line 165    Java Problem
Queue.Item cannot be resolved to a type    MavenModuleSet.java    /maven-plugin/src/main/java/hudson/maven    line 1104    Java Problem
Queue.Item cannot be resolved to a type    MavenModuleSet.java    /maven-plugin/src/main/java/hudson/maven    line 1108    Java Problem
Queue.Item cannot be resolved to a type    MavenModuleSet.java    /maven-plugin/src/main/java/hudson/maven    line 1097    Java Problem
Cannot cast from Descriptor to MavenModuleSet.DescriptorImpl    MavenModuleSet.java    /maven-plugin/src/main/java/hudson/maven    line 1219    Java Problem
The method apply(File) of type new Predicate<File>(){} must override a superclass method    SurefireArchiver.java    /maven-plugin/src/main/java/hudson/maven/reporters    line 140    Java Problem
AbstractProjectDescriptor cannot be resolved to a type    MavenModuleSet.java    /maven-plugin/src/main/java/hudson/maven    line 1230    Java Problem
The method apply(File) of type new Predicate<File>(){} must override a superclass method    SurefireArchiver.java    /maven-plugin/src/main/java/hudson/maven/reporters    line 268    Java Problem
Queue.Item cannot be resolved to a type    MavenModuleSet.java    /maven-plugin/src/main/java/hudson/maven    line 1109    Java Problem
Queue.Item cannot be resolved to a type    MavenModuleSet.java    /maven-plugin/src/main/java/hudson/maven    line 1109    Java Problem
The method apply(String) of type new Function<String,File>(){} must override a superclass method    SurefireArchiver.java    /maven-plugin/src/main/java/hudson/maven/reporters    line 282    Java Problem
Queue.Item cannot be resolved to a type    MavenModuleSet.java    /maven-plugin/src/main/java/hudson/maven    line 1110    Java Problem

...


Am 15.11.2013 22:15, schrieb Marcelo:
Kutzi, in the category "Maven Problems" of the view "Markers" inside eclipse, you see any error?


On Fri, Nov 15, 2013 at 5:55 PM, Baptiste Mathus <[hidden email]> wrote:
Hi, First thing I would ask is: does it build on the CLI outside Eclipse? That'll be a first step to see if this is likely a Maven issue or more an Eclipse or even a jenkins code one.
My 2 cents


2013/11/15 Christoph Kutzinski <[hidden email]>
Hi,

I had several problems with building Jenkins/maven-plugin in the past, but the errors I'm getting now are especial nasty:
Eclipse e.g. complains that it cannot find hudson.model.Queue.Item (in MavenModuleSet) and several other compile errors.
I checked the the Jenkins core jar is intact (building with mvn works) and no amount of refreshing in Eclipse and the usual other tricks to get it working again got me anywhere.

Did anyone have similar problems and maybe a solution?
Eclipse Kepler 4.3.1, M2e 1.4.0

-
Kutzi

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.



--
Baptiste <Batmat> MATHUS - http://batmat.net
Sauvez un arbre,
Mangez un castor !
--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Problems building maven-plugin in Eclipse

vlatombe
Problem appeared in core 1.520. Looking at the changes that happened for this release,
I see an update of com.infradna.tool:bridge-method-annotation from 1.4 to 1.8

Maybe this is generating some bytecode that is not understood correctly by the JDT, so it fails to index the corresponding class.

Vincent


2013/11/16 Vincent Latombe <[hidden email]>
Hi,

I have exactly the same issue. Compiling in command line works, however in Eclipse, some inner classes cannot be resolved (despite being able to browse them in the classpath of the eclipse project).

Eclipse is unable to resolve these 3 classes :
- hudson.model.AbstractProject.AbstractProjectDescriptor
- hudson.model.Queue.Task
- hudson.model.Queue.Item

I'm trying to isolate the problem, so far I found it depends on the core version, and the problem appeared between 1.517 and 1.524.

Vincent

Vincent


2013/11/16 Christoph Kutzinski <[hidden email]>
No Maven Problems, only Java problems:


Description    Resource    Path    Location    Type
Cannot make a static reference to the non-static method save() from the type AbstractProject<MavenModuleSet,MavenModuleSetBuild>    MavenModuleSet.java    /maven-plugin/src/main/java/hudson/maven    line 1320    Java Problem
AbstractProjectDescriptor cannot be resolved to a type    MavenModuleSet.java    /maven-plugin/src/main/java/hudson/maven    line 1259    Java Problem
Cannot make a static reference to the non-static method save() from the type AbstractProject<MavenModuleSet,MavenModuleSetBuild>    MavenModuleSet.java    /maven-plugin/src/main/java/hudson/maven    line 1278    Java Problem
The method alignToBaseDirectory(File) of type new ExpressionEvaluator(){} must override a superclass method    MojoInfoBuilder.java    /maven-plugin/src/test/java/hudson/maven    line 81    Java Problem
Cannot make a static reference to the non-static method save() from the type AbstractProject<MavenModuleSet,MavenModuleSetBuild>    MavenModuleSet.java    /maven-plugin/src/main/java/hudson/maven    line 1290    Java Problem
Bound mismatch: The generic method getDescriptorByType(Class<T>) of type Jenkins is not applicable for the arguments (Class<MavenModuleSet.DescriptorImpl>). The inferred type MavenModuleSet.DescriptorImpl is not a valid substitute for the bounded parameter <T extends Descriptor>    MavenOptsTest.java    /maven-plugin/src/test/java/hudson/maven    line 20    Java Problem
The method annotate(ConsoleNote) of type SurefireArchiverUnitTest.NullBuildListener must override a superclass method    SurefireArchiverUnitTest.java    /maven-plugin/src/test/java/hudson/maven/reporters    line 303    Java Problem
The method apply(String) of type new Function<String,File>(){} must override a superclass method    TestMojo.java    /maven-plugin/src/main/java/hudson/maven/reporters    line 165    Java Problem
Queue.Item cannot be resolved to a type    MavenModuleSet.java    /maven-plugin/src/main/java/hudson/maven    line 1104    Java Problem
Queue.Item cannot be resolved to a type    MavenModuleSet.java    /maven-plugin/src/main/java/hudson/maven    line 1108    Java Problem
Queue.Item cannot be resolved to a type    MavenModuleSet.java    /maven-plugin/src/main/java/hudson/maven    line 1097    Java Problem
Cannot cast from Descriptor to MavenModuleSet.DescriptorImpl    MavenModuleSet.java    /maven-plugin/src/main/java/hudson/maven    line 1219    Java Problem
The method apply(File) of type new Predicate<File>(){} must override a superclass method    SurefireArchiver.java    /maven-plugin/src/main/java/hudson/maven/reporters    line 140    Java Problem
AbstractProjectDescriptor cannot be resolved to a type    MavenModuleSet.java    /maven-plugin/src/main/java/hudson/maven    line 1230    Java Problem
The method apply(File) of type new Predicate<File>(){} must override a superclass method    SurefireArchiver.java    /maven-plugin/src/main/java/hudson/maven/reporters    line 268    Java Problem
Queue.Item cannot be resolved to a type    MavenModuleSet.java    /maven-plugin/src/main/java/hudson/maven    line 1109    Java Problem
Queue.Item cannot be resolved to a type    MavenModuleSet.java    /maven-plugin/src/main/java/hudson/maven    line 1109    Java Problem
The method apply(String) of type new Function<String,File>(){} must override a superclass method    SurefireArchiver.java    /maven-plugin/src/main/java/hudson/maven/reporters    line 282    Java Problem
Queue.Item cannot be resolved to a type    MavenModuleSet.java    /maven-plugin/src/main/java/hudson/maven    line 1110    Java Problem

...


Am 15.11.2013 22:15, schrieb Marcelo:
Kutzi, in the category "Maven Problems" of the view "Markers" inside eclipse, you see any error?


On Fri, Nov 15, 2013 at 5:55 PM, Baptiste Mathus <[hidden email]> wrote:
Hi, First thing I would ask is: does it build on the CLI outside Eclipse? That'll be a first step to see if this is likely a Maven issue or more an Eclipse or even a jenkins code one.
My 2 cents


2013/11/15 Christoph Kutzinski <[hidden email]>
Hi,

I had several problems with building Jenkins/maven-plugin in the past, but the errors I'm getting now are especial nasty:
Eclipse e.g. complains that it cannot find hudson.model.Queue.Item (in MavenModuleSet) and several other compile errors.
I checked the the Jenkins core jar is intact (building with mvn works) and no amount of refreshing in Eclipse and the usual other tricks to get it working again got me anywhere.

Did anyone have similar problems and maybe a solution?
Eclipse Kepler 4.3.1, M2e 1.4.0

-
Kutzi

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.



--
Baptiste <Batmat> MATHUS - http://batmat.net
Sauvez un arbre,
Mangez un castor !
--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.


--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Problems building maven-plugin in Eclipse

Christoph Kutzinski
Makes sense.
Maybe we're missing this bug fix which comes with
bridge-method-annotation 1.9

https://github.com/infradna/bridge-method-injector/commit/ea528faf1f92724cc5db036116bae80a234de20d

Am 16.11.2013 10:09, schrieb Vincent Latombe:

> Problem appeared in core 1.520. Looking at the changes that happened for
> this release,
> I see an update of com.infradna.tool:bridge-method-annotation from 1.4
> to 1.8
>
> Maybe this is generating some bytecode that is not understood correctly
> by the JDT, so it fails to index the corresponding class.
>
> Vincent
>
>
> 2013/11/16 Vincent Latombe <[hidden email]
> <mailto:[hidden email]>>
>
>     Hi,
>
>     I have exactly the same issue. Compiling in command line works,
>     however in Eclipse, some inner classes cannot be resolved (despite
>     being able to browse them in the classpath of the eclipse project).
>
>     Eclipse is unable to resolve these 3 classes :
>     - hudson.model.AbstractProject.AbstractProjectDescriptor
>     - hudson.model.Queue.Task
>     - hudson.model.Queue.Item
>
>     I'm trying to isolate the problem, so far I found it depends on the
>     core version, and the problem appeared between 1.517 and 1.524.
>
>     Vincent
>
>     Vincent
>
>
>     2013/11/16 Christoph Kutzinski <[hidden email] <mailto:[hidden email]>>
>
>         No Maven Problems, only Java problems:
>
>
>         Description    Resource    Path    Location    Type
>         Cannot make a static reference to the non-static method save()
>         from the type
>         AbstractProject<MavenModuleSet,MavenModuleSetBuild>
>         MavenModuleSet.java    /maven-plugin/src/main/java/hudson/maven
>         line 1320    Java Problem
>         AbstractProjectDescriptor cannot be resolved to a type
>         MavenModuleSet.java    /maven-plugin/src/main/java/hudson/maven
>         line 1259    Java Problem
>         Cannot make a static reference to the non-static method save()
>         from the type
>         AbstractProject<MavenModuleSet,MavenModuleSetBuild>
>         MavenModuleSet.java    /maven-plugin/src/main/java/hudson/maven
>         line 1278    Java Problem
>         The method alignToBaseDirectory(File) of type new
>         ExpressionEvaluator(){} must override a superclass method
>         MojoInfoBuilder.java /maven-plugin/src/test/java/hudson/maven
>         line 81    Java Problem
>         Cannot make a static reference to the non-static method save()
>         from the type
>         AbstractProject<MavenModuleSet,MavenModuleSetBuild>
>         MavenModuleSet.java    /maven-plugin/src/main/java/hudson/maven
>         line 1290    Java Problem
>         Bound mismatch: The generic method getDescriptorByType(Class<T>)
>         of type Jenkins is not applicable for the arguments
>         (Class<MavenModuleSet.DescriptorImpl>). The inferred type
>         MavenModuleSet.DescriptorImpl is not a valid substitute for the
>         bounded parameter <T extends Descriptor> MavenOptsTest.java
>         /maven-plugin/src/test/java/hudson/maven line 20    Java Problem
>         The method annotate(ConsoleNote) of type
>         SurefireArchiverUnitTest.NullBuildListener must override a
>         superclass method    SurefireArchiverUnitTest.java
>         /maven-plugin/src/test/java/hudson/maven/reporters    line 303
>         Java Problem
>         The method apply(String) of type new Function<String,File>(){}
>         must override a superclass method    TestMojo.java
>         /maven-plugin/src/main/java/hudson/maven/reporters    line 165
>         Java Problem
>         Queue.Item cannot be resolved to a type    MavenModuleSet.java
>         /maven-plugin/src/main/java/hudson/maven    line 1104    Java
>         Problem
>         Queue.Item cannot be resolved to a type    MavenModuleSet.java
>         /maven-plugin/src/main/java/hudson/maven    line 1108    Java
>         Problem
>         Queue.Item cannot be resolved to a type    MavenModuleSet.java
>         /maven-plugin/src/main/java/hudson/maven    line 1097    Java
>         Problem
>         Cannot cast from Descriptor to MavenModuleSet.DescriptorImpl
>         MavenModuleSet.java    /maven-plugin/src/main/java/hudson/maven
>         line 1219    Java Problem
>         The method apply(File) of type new Predicate<File>(){} must
>         override a superclass method    SurefireArchiver.java
>         /maven-plugin/src/main/java/hudson/maven/reporters    line 140
>         Java Problem
>         AbstractProjectDescriptor cannot be resolved to a type
>         MavenModuleSet.java    /maven-plugin/src/main/java/hudson/maven
>         line 1230    Java Problem
>         The method apply(File) of type new Predicate<File>(){} must
>         override a superclass method    SurefireArchiver.java
>         /maven-plugin/src/main/java/hudson/maven/reporters    line 268
>         Java Problem
>         Queue.Item cannot be resolved to a type    MavenModuleSet.java
>         /maven-plugin/src/main/java/hudson/maven    line 1109    Java
>         Problem
>         Queue.Item cannot be resolved to a type    MavenModuleSet.java
>         /maven-plugin/src/main/java/hudson/maven    line 1109    Java
>         Problem
>         The method apply(String) of type new Function<String,File>(){}
>         must override a superclass method    SurefireArchiver.java
>         /maven-plugin/src/main/java/hudson/maven/reporters    line 282
>         Java Problem
>         Queue.Item cannot be resolved to a type    MavenModuleSet.java
>         /maven-plugin/src/main/java/hudson/maven    line 1110    Java
>         Problem
>
>         ...
>
>
>         Am 15.11.2013 22:15, schrieb Marcelo:
>>         Kutzi, in the category "Maven Problems" of the view "Markers"
>>         inside eclipse, you see any error?
>>
>>
>>         On Fri, Nov 15, 2013 at 5:55 PM, Baptiste Mathus
>>         <[hidden email] <mailto:[hidden email]>> wrote:
>>
>>             Hi, First thing I would ask is: does it build on the CLI
>>             outside Eclipse? That'll be a first step to see if this is
>>             likely a Maven issue or more an Eclipse or even a jenkins
>>             code one.
>>             My 2 cents
>>
>>
>>             2013/11/15 Christoph Kutzinski <[hidden email]
>>             <mailto:[hidden email]>>
>>
>>                 Hi,
>>
>>                 I had several problems with building
>>                 Jenkins/maven-plugin in the past, but the errors I'm
>>                 getting now are especial nasty:
>>                 Eclipse e.g. complains that it cannot find
>>                 hudson.model.Queue.Item (in MavenModuleSet) and
>>                 several other compile errors.
>>                 I checked the the Jenkins core jar is intact (building
>>                 with mvn works) and no amount of refreshing in Eclipse
>>                 and the usual other tricks to get it working again got
>>                 me anywhere.
>>
>>                 Did anyone have similar problems and maybe a solution?
>>                 Eclipse Kepler 4.3.1, M2e 1.4.0
>>
>>                 -
>>                 Kutzi
>>
>>                 --
>>                 You received this message because you are subscribed
>>                 to the Google Groups "Jenkins Developers" group.
>>                 To unsubscribe from this group and stop receiving
>>                 emails from it, send an email to
>>                 [hidden email]
>>                 <mailto:jenkinsci-dev%[hidden email]>.
>>                 For more options, visit
>>                 https://groups.google.com/groups/opt_out.
>>
>>
>>
>>
>>             --
>>             Baptiste <Batmat> MATHUS - http://batmat.net
>>             Sauvez un arbre,
>>             Mangez un castor !
>>             --
>>             You received this message because you are subscribed to
>>             the Google Groups "Jenkins Developers" group.
>>             To unsubscribe from this group and stop receiving emails
>>             from it, send an email to
>>             [hidden email]
>>             <mailto:jenkinsci-dev%[hidden email]>.
>>             For more options, visit
>>             https://groups.google.com/groups/opt_out.
>>
>>
>>         --
>>         You received this message because you are subscribed to the
>>         Google Groups "Jenkins Developers" group.
>>         To unsubscribe from this group and stop receiving emails from
>>         it, send an email to
>>         [hidden email]
>>         <mailto:[hidden email]>.
>>         For more options, visit https://groups.google.com/groups/opt_out.
>
>         --
>         You received this message because you are subscribed to the
>         Google Groups "Jenkins Developers" group.
>         To unsubscribe from this group and stop receiving emails from
>         it, send an email to [hidden email]
>         <mailto:jenkinsci-dev%[hidden email]>.
>         For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [hidden email].
> For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Problems building maven-plugin in Eclipse

vlatombe
I could confirm it is definitely the bridge method injector which is causing the issue.

In Queue.Item, there is the following getter annotated

@WithBridgeMethods(Future.class)
public QueueTaskFuture<Executable> getFuture() { return future; }

Removing the annotation then recompiling core fixes the issue for this class.

Also, depending on a jenkins-core that is in the workspace workarounds the issue (because then the bridge method injector isn't called by JDT)

Given the fix you mentioned in 1.9, I doubt it will change anything.

Vincent


2013/11/16 Christoph Kutzinski <[hidden email]>
Makes sense.
Maybe we're missing this bug fix which comes with bridge-method-annotation 1.9

https://github.com/infradna/bridge-method-injector/commit/ea528faf1f92724cc5db036116bae80a234de20d

Am 16.11.2013 10:09, schrieb Vincent Latombe:
Problem appeared in core 1.520. Looking at the changes that happened for
this release,
I see an update of com.infradna.tool:bridge-method-annotation from 1.4
to 1.8

Maybe this is generating some bytecode that is not understood correctly
by the JDT, so it fails to index the corresponding class.

Vincent


2013/11/16 Vincent Latombe <[hidden email]
<mailto:[hidden email]>>


    Hi,

    I have exactly the same issue. Compiling in command line works,
    however in Eclipse, some inner classes cannot be resolved (despite
    being able to browse them in the classpath of the eclipse project).

    Eclipse is unable to resolve these 3 classes :
    - hudson.model.AbstractProject.AbstractProjectDescriptor
    - hudson.model.Queue.Task
    - hudson.model.Queue.Item

    I'm trying to isolate the problem, so far I found it depends on the
    core version, and the problem appeared between 1.517 and 1.524.

    Vincent

    Vincent


    2013/11/16 Christoph Kutzinski <[hidden email] <mailto:[hidden email]>>


        No Maven Problems, only Java problems:


        Description    Resource    Path    Location    Type
        Cannot make a static reference to the non-static method save()
        from the type
        AbstractProject<MavenModuleSet,MavenModuleSetBuild>
        MavenModuleSet.java    /maven-plugin/src/main/java/hudson/maven
        line 1320    Java Problem
        AbstractProjectDescriptor cannot be resolved to a type
        MavenModuleSet.java    /maven-plugin/src/main/java/hudson/maven
        line 1259    Java Problem
        Cannot make a static reference to the non-static method save()
        from the type
        AbstractProject<MavenModuleSet,MavenModuleSetBuild>
        MavenModuleSet.java    /maven-plugin/src/main/java/hudson/maven
        line 1278    Java Problem
        The method alignToBaseDirectory(File) of type new
        ExpressionEvaluator(){} must override a superclass method
        MojoInfoBuilder.java /maven-plugin/src/test/java/hudson/maven
        line 81    Java Problem
        Cannot make a static reference to the non-static method save()
        from the type
        AbstractProject<MavenModuleSet,MavenModuleSetBuild>
        MavenModuleSet.java    /maven-plugin/src/main/java/hudson/maven
        line 1290    Java Problem
        Bound mismatch: The generic method getDescriptorByType(Class<T>)
        of type Jenkins is not applicable for the arguments
        (Class<MavenModuleSet.DescriptorImpl>). The inferred type
        MavenModuleSet.DescriptorImpl is not a valid substitute for the
        bounded parameter <T extends Descriptor> MavenOptsTest.java
        /maven-plugin/src/test/java/hudson/maven line 20    Java Problem
        The method annotate(ConsoleNote) of type
        SurefireArchiverUnitTest.NullBuildListener must override a
        superclass method    SurefireArchiverUnitTest.java
        /maven-plugin/src/test/java/hudson/maven/reporters    line 303
        Java Problem
        The method apply(String) of type new Function<String,File>(){}
        must override a superclass method    TestMojo.java
        /maven-plugin/src/main/java/hudson/maven/reporters    line 165
        Java Problem
        Queue.Item cannot be resolved to a type    MavenModuleSet.java
        /maven-plugin/src/main/java/hudson/maven    line 1104    Java
        Problem
        Queue.Item cannot be resolved to a type    MavenModuleSet.java
        /maven-plugin/src/main/java/hudson/maven    line 1108    Java
        Problem
        Queue.Item cannot be resolved to a type    MavenModuleSet.java
        /maven-plugin/src/main/java/hudson/maven    line 1097    Java
        Problem
        Cannot cast from Descriptor to MavenModuleSet.DescriptorImpl
        MavenModuleSet.java    /maven-plugin/src/main/java/hudson/maven
        line 1219    Java Problem
        The method apply(File) of type new Predicate<File>(){} must
        override a superclass method    SurefireArchiver.java
        /maven-plugin/src/main/java/hudson/maven/reporters    line 140
        Java Problem
        AbstractProjectDescriptor cannot be resolved to a type
        MavenModuleSet.java    /maven-plugin/src/main/java/hudson/maven
        line 1230    Java Problem
        The method apply(File) of type new Predicate<File>(){} must
        override a superclass method    SurefireArchiver.java
        /maven-plugin/src/main/java/hudson/maven/reporters    line 268
        Java Problem
        Queue.Item cannot be resolved to a type    MavenModuleSet.java
        /maven-plugin/src/main/java/hudson/maven    line 1109    Java
        Problem
        Queue.Item cannot be resolved to a type    MavenModuleSet.java
        /maven-plugin/src/main/java/hudson/maven    line 1109    Java
        Problem
        The method apply(String) of type new Function<String,File>(){}
        must override a superclass method    SurefireArchiver.java
        /maven-plugin/src/main/java/hudson/maven/reporters    line 282
        Java Problem
        Queue.Item cannot be resolved to a type    MavenModuleSet.java
        /maven-plugin/src/main/java/hudson/maven    line 1110    Java
        Problem

        ...


        Am 15.11.2013 22:15, schrieb Marcelo:
        Kutzi, in the category "Maven Problems" of the view "Markers"
        inside eclipse, you see any error?


        On Fri, Nov 15, 2013 at 5:55 PM, Baptiste Mathus
        <[hidden email] <mailto:[hidden email]>> wrote:

            Hi, First thing I would ask is: does it build on the CLI
            outside Eclipse? That'll be a first step to see if this is
            likely a Maven issue or more an Eclipse or even a jenkins
            code one.
            My 2 cents


            2013/11/15 Christoph Kutzinski <[hidden email]
            <mailto:[hidden email]>>


                Hi,

                I had several problems with building
                Jenkins/maven-plugin in the past, but the errors I'm
                getting now are especial nasty:
                Eclipse e.g. complains that it cannot find
                hudson.model.Queue.Item (in MavenModuleSet) and
                several other compile errors.
                I checked the the Jenkins core jar is intact (building
                with mvn works) and no amount of refreshing in Eclipse
                and the usual other tricks to get it working again got
                me anywhere.

                Did anyone have similar problems and maybe a solution?
                Eclipse Kepler 4.3.1, M2e 1.4.0

                -
                Kutzi

                --
                You received this message because you are subscribed
                to the Google Groups "Jenkins Developers" group.
                To unsubscribe from this group and stop receiving
                emails from it, send an email to
                [hidden email]
                <mailto:[hidden email]>.

                For more options, visit
                https://groups.google.com/groups/opt_out.




            --
            Baptiste <Batmat> MATHUS - http://batmat.net
            Sauvez un arbre,
            Mangez un castor !
            --
            You received this message because you are subscribed to
            the Google Groups "Jenkins Developers" group.
            To unsubscribe from this group and stop receiving emails
            from it, send an email to
            [hidden email]
            <mailto:[hidden email]>.

            For more options, visit
            https://groups.google.com/groups/opt_out.


        --
        You received this message because you are subscribed to the
        Google Groups "Jenkins Developers" group.
        To unsubscribe from this group and stop receiving emails from
        it, send an email to
        [hidden email]
        <mailto:[hidden email]>.

        For more options, visit https://groups.google.com/groups/opt_out.

        --
        You received this message because you are subscribed to the
        Google Groups "Jenkins Developers" group.
        To unsubscribe from this group and stop receiving emails from
        it, send an email to [hidden email]
        <mailto:[hidden email]>.

        For more options, visit https://groups.google.com/groups/opt_out.



--
You received this message because you are subscribed to the Google
Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Problems building maven-plugin in Eclipse

Ace Han
Hi, All

The same issue in eclipse is driving me nuts while I was trying to upgrade my plugin code dependencies to latest LTS.

Removing the annotation @WithBridgeMethods just works like a charm, thanks

However, I would like to share a little more about how to recompile the jenkins-core-xxx.jar.
  1. download the source.zip from https://github.com/jenkinsci/jenkins(I mean the root of the project, not just core folder since Jenkins CLI module is required for Jenkins core from the this recompilation build ), pick up any commit, branch as you like
  2. unzip this source.zip to folder jenkins-xxx, (wherever as you like)
  3. replace @WithBridgeMethods\(.*\) with // patching for debug  to jenkins-xxx/core/src/**/*.java
  4. run mvn package -Dmaven.test.skip=true (you should get your maven working)
  5. we should only care about the jenkins-core-xxx.jar is finally recompiled though some error may occur on other modules
  6. done
Help this could help.

Best Regard,
Ace Han

On Saturday, November 16, 2013 8:48:27 PM UTC+8, Vincent Latombe wrote:
I could confirm it is definitely the bridge method injector which is causing the issue.

In Queue.Item, there is the following getter annotated

@WithBridgeMethods(Future.class)
public QueueTaskFuture<Executable> getFuture() { return future; }

Removing the annotation then recompiling core fixes the issue for this class.

Also, depending on a jenkins-core that is in the workspace workarounds the issue (because then the bridge method injector isn't called by JDT)

Given the fix you mentioned in 1.9, I doubt it will change anything.

Vincent


2013/11/16 Christoph Kutzinski <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="t1UgWvIv2_8J" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">ku...@...>
Makes sense.
Maybe we're missing this bug fix which comes with bridge-method-annotation 1.9

<a href="https://github.com/infradna/bridge-method-injector/commit/ea528faf1f92724cc5db036116bae80a234de20d" target="_blank" onmousedown="this.href='https://www.google.com/url?q\75https%3A%2F%2Fgithub.com%2Finfradna%2Fbridge-method-injector%2Fcommit%2Fea528faf1f92724cc5db036116bae80a234de20d\46sa\75D\46sntz\0751\46usg\75AFQjCNHDYh3P-sddlCgxHcJW3cZpqm83HA';return true;" onclick="this.href='https://www.google.com/url?q\75https%3A%2F%2Fgithub.com%2Finfradna%2Fbridge-method-injector%2Fcommit%2Fea528faf1f92724cc5db036116bae80a234de20d\46sa\75D\46sntz\0751\46usg\75AFQjCNHDYh3P-sddlCgxHcJW3cZpqm83HA';return true;">https://github.com/infradna/bridge-method-injector/commit/ea528faf1f92724cc5db036116bae80a234de20d

Am 16.11.2013 10:09, schrieb Vincent Latombe:
Problem appeared in core 1.520. Looking at the changes that happened for
this release,
I see an update of com.infradna.tool:bridge-method-annotation from 1.4
to 1.8

Maybe this is generating some bytecode that is not understood correctly
by the JDT, so it fails to index the corresponding class.

Vincent


2013/11/16 Vincent Latombe <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="t1UgWvIv2_8J" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">vincent...@...
<mailto:<a href="javascript:" target="_blank" gdf-obfuscated-mailto="t1UgWvIv2_8J" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">vincent...@gmail.com>>


    Hi,

    I have exactly the same issue. Compiling in command line works,
    however in Eclipse, some inner classes cannot be resolved (despite
    being able to browse them in the classpath of the eclipse project).

    Eclipse is unable to resolve these 3 classes :
    - hudson.model.AbstractProject.AbstractProjectDescriptor
    - hudson.model.Queue.Task
    - hudson.model.Queue.Item

    I'm trying to isolate the problem, so far I found it depends on the
    core version, and the problem appeared between 1.517 and 1.524.

    Vincent

    Vincent


    2013/11/16 Christoph Kutzinski <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="t1UgWvIv2_8J" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">ku...@... <mailto:<a href="javascript:" target="_blank" gdf-obfuscated-mailto="t1UgWvIv2_8J" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">ku...@...>>


        No Maven Problems, only Java problems:


        Description    Resource    Path    Location    Type
        Cannot make a static reference to the non-static method save()
        from the type
        AbstractProject<MavenModuleSet,MavenModuleSetBuild>
        MavenModuleSet.java    /maven-plugin/src/main/java/hudson/maven
        line 1320    Java Problem
        AbstractProjectDescriptor cannot be resolved to a type
        MavenModuleSet.java    /maven-plugin/src/main/java/hudson/maven
        line 1259    Java Problem
        Cannot make a static reference to the non-static method save()
        from the type
        AbstractProject<MavenModuleSet,MavenModuleSetBuild>
        MavenModuleSet.java    /maven-plugin/src/main/java/hudson/maven
        line 1278    Java Problem
        The method alignToBaseDirectory(File) of type new
        ExpressionEvaluator(){} must override a superclass method
        MojoInfoBuilder.java /maven-plugin/src/test/java/hudson/maven
        line 81    Java Problem
        Cannot make a static reference to the non-static method save()
        from the type
        AbstractProject<MavenModuleSet,MavenModuleSetBuild>
        MavenModuleSet.java    /maven-plugin/src/main/java/hudson/maven
        line 1290    Java Problem
        Bound mismatch: The generic method getDescriptorByType(Class<T>)
        of type Jenkins is not applicable for the arguments
        (Class<MavenModuleSet.DescriptorImpl>). The inferred type
        MavenModuleSet.DescriptorImpl is not a valid substitute for the
        bounded parameter <T extends Descriptor> MavenOptsTest.java
        /maven-plugin/src/test/java/hudson/maven line 20    Java Problem
        The method annotate(ConsoleNote) of type
        SurefireArchiverUnitTest.NullBuildListener must override a
        superclass method    SurefireArchiverUnitTest.java
        /maven-plugin/src/test/java/hudson/maven/reporters    line 303
        Java Problem
        The method apply(String) of type new Function<String,File>(){}
        must override a superclass method    TestMojo.java
        /maven-plugin/src/main/java/hudson/maven/reporters    line 165
        Java Problem
        Queue.Item cannot be resolved to a type    MavenModuleSet.java
        /maven-plugin/src/main/java/hudson/maven    line 1104    Java
        Problem
        Queue.Item cannot be resolved to a type    MavenModuleSet.java
        /maven-plugin/src/main/java/hudson/maven    line 1108    Java
        Problem
        Queue.Item cannot be resolved to a type    MavenModuleSet.java
        /maven-plugin/src/main/java/hudson/maven    line 1097    Java
        Problem
        Cannot cast from Descriptor to MavenModuleSet.DescriptorImpl
        MavenModuleSet.java    /maven-plugin/src/main/java/hudson/maven
        line 1219    Java Problem
        The method apply(File) of type new Predicate<File>(){} must
        override a superclass method    SurefireArchiver.java
        /maven-plugin/src/main/java/hudson/maven/reporters    line 140
        Java Problem
        AbstractProjectDescriptor cannot be resolved to a type
        MavenModuleSet.java    /maven-plugin/src/main/java/hudson/maven
        line 1230    Java Problem
        The method apply(File) of type new Predicate<File>(){} must
        override a superclass method    SurefireArchiver.java
        /maven-plugin/src/main/java/hudson/maven/reporters    line 268
        Java Problem
        Queue.Item cannot be resolved to a type    MavenModuleSet.java
        /maven-plugin/src/main/java/hudson/maven    line 1109    Java
        Problem
        Queue.Item cannot be resolved to a type    MavenModuleSet.java
        /maven-plugin/src/main/java/hudson/maven    line 1109    Java
        Problem
        The method apply(String) of type new Function<String,File>(){}
        must override a superclass method    SurefireArchiver.java
        /maven-plugin/src/main/java/hudson/maven/reporters    line 282
        Java Problem
        Queue.Item cannot be resolved to a type    MavenModuleSet.java
        /maven-plugin/src/main/java/hudson/maven    line 1110    Java
        Problem

        ...


        Am 15.11.2013 22:15, schrieb Marcelo:
        Kutzi, in the category "Maven Problems" of the view "Markers"
        inside eclipse, you see any error?


        On Fri, Nov 15, 2013 at 5:55 PM, Baptiste Mathus
        <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="t1UgWvIv2_8J" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">bma...@... <mailto:<a href="javascript:" target="_blank" gdf-obfuscated-mailto="t1UgWvIv2_8J" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">bma...@...>> wrote:

            Hi, First thing I would ask is: does it build on the CLI
            outside Eclipse? That'll be a first step to see if this is
            likely a Maven issue or more an Eclipse or even a jenkins
            code one.
            My 2 cents


            2013/11/15 Christoph Kutzinski <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="t1UgWvIv2_8J" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">ku...@...
            <mailto:<a href="javascript:" target="_blank" gdf-obfuscated-mailto="t1UgWvIv2_8J" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">ku...@...>>


                Hi,

                I had several problems with building
                Jenkins/maven-plugin in the past, but the errors I'm
                getting now are especial nasty:
                Eclipse e.g. complains that it cannot find
                hudson.model.Queue.Item (in MavenModuleSet) and
                several other compile errors.
                I checked the the Jenkins core jar is intact (building
                with mvn works) and no amount of refreshing in Eclipse
                and the usual other tricks to get it working again got
                me anywhere.

                Did anyone have similar problems and maybe a solution?
                Eclipse Kepler 4.3.1, M2e 1.4.0

                -
                Kutzi

                --
                You received this message because you are subscribed
                to the Google Groups "Jenkins Developers" group.
                To unsubscribe from this group and stop receiving
                emails from it, send an email to
                <a href="javascript:" target="_blank" gdf-obfuscated-mailto="t1UgWvIv2_8J" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">jenkinsci-de...@googlegroups.com
                <mailto:<a href="javascript:" target="_blank" gdf-obfuscated-mailto="t1UgWvIv2_8J" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">jenkinsci-dev%2Bunsubscribe@...>.

                For more options, visit
                <a href="https://groups.google.com/groups/opt_out" target="_blank" onmousedown="this.href='https://groups.google.com/groups/opt_out';return true;" onclick="this.href='https://groups.google.com/groups/opt_out';return true;">https://groups.google.com/groups/opt_out.




            --
            Baptiste <Batmat> MATHUS - <a href="http://batmat.net" target="_blank" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fbatmat.net\46sa\75D\46sntz\0751\46usg\75AFQjCNFI0aRRUVET1KVByMjfiRv3CEtybg';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fbatmat.net\46sa\75D\46sntz\0751\46usg\75AFQjCNFI0aRRUVET1KVByMjfiRv3CEtybg';return true;">http://batmat.net
            Sauvez un arbre,
            Mangez un castor !
            --
            You received this message because you are subscribed to
            the Google Groups "Jenkins Developers" group.
            To unsubscribe from this group and stop receiving emails
            from it, send an email to
            <a href="javascript:" target="_blank" gdf-obfuscated-mailto="t1UgWvIv2_8J" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">jenkinsci-de...@googlegroups.com
            <mailto:<a href="javascript:" target="_blank" gdf-obfuscated-mailto="t1UgWvIv2_8J" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">jenkinsci-dev%2Bunsubscribe@...>.

            For more options, visit
            <a href="https://groups.google.com/groups/opt_out" target="_blank" onmousedown="this.href='https://groups.google.com/groups/opt_out';return true;" onclick="this.href='https://groups.google.com/groups/opt_out';return true;">https://groups.google.com/groups/opt_out.


        --
        You received this message because you are subscribed to the
        Google Groups "Jenkins Developers" group.
        To unsubscribe from this group and stop receiving emails from
        it, send an email to
        <a href="javascript:" target="_blank" gdf-obfuscated-mailto="t1UgWvIv2_8J" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">jenkinsci-de...@googlegroups.com
        <mailto:<a href="javascript:" target="_blank" gdf-obfuscated-mailto="t1UgWvIv2_8J" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">jenkinsci-dev+unsubscribe@...>.

        For more options, visit <a href="https://groups.google.com/groups/opt_out" target="_blank" onmousedown="this.href='https://groups.google.com/groups/opt_out';return true;" onclick="this.href='https://groups.google.com/groups/opt_out';return true;">https://groups.google.com/groups/opt_out.

        --
        You received this message because you are subscribed to the
        Google Groups "Jenkins Developers" group.
        To unsubscribe from this group and stop receiving emails from
        it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="t1UgWvIv2_8J" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">jenkinsci-de...@googlegroups.com
        <mailto:<a href="javascript:" target="_blank" gdf-obfuscated-mailto="t1UgWvIv2_8J" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">jenkinsci-dev%2Bunsubscribe@...>.

        For more options, visit <a href="https://groups.google.com/groups/opt_out" target="_blank" onmousedown="this.href='https://groups.google.com/groups/opt_out';return true;" onclick="this.href='https://groups.google.com/groups/opt_out';return true;">https://groups.google.com/groups/opt_out.



--
You received this message because you are subscribed to the Google
Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="t1UgWvIv2_8J" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">jenkinsci-de...@googlegroups.com.
For more options, visit <a href="https://groups.google.com/groups/opt_out" target="_blank" onmousedown="this.href='https://groups.google.com/groups/opt_out';return true;" onclick="this.href='https://groups.google.com/groups/opt_out';return true;">https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="t1UgWvIv2_8J" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">jenkinsci-de...@googlegroups.com.
For more options, visit <a href="https://groups.google.com/groups/opt_out" target="_blank" onmousedown="this.href='https://groups.google.com/groups/opt_out';return true;" onclick="this.href='https://groups.google.com/groups/opt_out';return true;">https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Issue running Jenkins as a Windows service?

Jeff King
Hi all,

Not sure if anyone else is experiencing this, but I've been seeing a
problem with running Jenkins as a Windows service starting with 1.559.
Basically, if you trigger something that causes Jenkins to restart
(install/update plugins, use the /restart URI, etc.), Jenkins stops but
does not start again.

Since Windows doesn't have an atomic service restart, the Jenkins
Windows service wrapper (jenkins.exe) handles the "restart" option by
doing a "stop", waits, and then "starts". The wrapper's "stop" handling
finds the Process ID of Jenkins, recursively halts all the children
processes of that PID, then stops the PID itself.

However, since WindowsServiceLifecycle.java is what called "jenkins.exe
restart", this instance of the wrapper is a child of the parent Jenkins
PID, so the wrapper ends up stopping itself!

It seemed like the simplest fix was to modify the service wrapper such
that, as it recurses through all the child processes of the Jenkins
process, it compares its own execution path against that of the child
PID. If they match, the wrapper doesn't stop that particular PID.

I've tested this change on my company's three build machines and it
resolves the issue.* A WinSW pull request with the above fix has been
submitted, and the issue was captured as JENKINS-22685. Hopefully this
is the right list and tracker for the problem; I didn't see ones
specifically for WinSW.

*Testing was tricky at first until I figured out that
WindowsServiceLifecycle checks if the current jenkins.exe is different
than the one packaged as a resource in jenkins-core-xxx.jar, and, if so,
replaces the current with the packaged when Jenkins is restarted.
Updating the JAR by replacing the \windows-service\jenkins.exe with my
modified copy took care of it.

Thanks,

Jeff

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Issue running Jenkins as a Windows service?

Jeff King
On 05/10/2014 02:12 PM, Jeff King wrote:
> Hi all,
>
> Not sure if anyone else is experiencing this, but I've been seeing a
> problem with running Jenkins as a Windows service starting with 1.559.
> Basically, if you trigger something that causes Jenkins to restart
> (install/update plugins, use the /restart URI, etc.), Jenkins stops but
> does not start again.

Thanks to Kohsuke for steering me back to winsw's "restart!" command, so
I realized my mistake in the initial test. All that's needed now is for
WindowsServiceLifecycle.java to use "restart!" instead of "restart".
I've submitted that as a pull request:

https://github.com/jenkinsci/jenkins/pull/1238

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Problems building maven-plugin in Eclipse

Jesse Glick-4
In reply to this post by Christoph Kutzinski
On Sat, Nov 16, 2013 at 4:46 AM, Christoph Kutzinski <[hidden email]> wrote:
> Maybe we're missing this bug fix which comes with bridge-method-annotation 1.9

Well Jenkins 1.536+ uses 1.9.

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Problems building maven-plugin in Eclipse

karthikVS
In reply to this post by Christoph Kutzinski
Hi,

I am getting the same error. Can anyone provide the solution for this? I am using Eclipse Kepler.

On Friday, 15 November 2013 10:29:28 UTC-8, kutzi wrote:
Hi,

I had several problems with building Jenkins/maven-plugin in the past,
but the errors I'm getting now are especial nasty:
Eclipse e.g. complains that it cannot find hudson.model.Queue.Item (in
MavenModuleSet) and several other compile errors.
I checked the the Jenkins core jar is intact (building with mvn works)
and no amount of refreshing in Eclipse and the usual other tricks to get
it working again got me anywhere.

Did anyone have similar problems and maybe a solution?
Eclipse Kepler 4.3.1, M2e 1.4.0

-
Kutzi

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Problems building maven-plugin in Eclipse

Ace Han
Hi, Karthik

plz refer to my post(Ace Han) for a short term solution

  1. download the source.zip from https://github.com/jenkinsci/jenkins(I mean the root of the project, not just core folder since Jenkins CLI module is required for Jenkins core from the this recompilation build ), pick up any commit, branch as you like
  2. unzip this source.zip to folder jenkins-xxx, (wherever as you like)
  3. replace @WithBridgeMethods\(.*\) with // patching for debug  to jenkins-xxx/core/src/**/*.java
  4. run mvn package -Dmaven.test.skip=true (you should get your maven working)
  5. we should only care about the jenkins-core-xxx.jar is finally recompiled though some error may occur on other modules
  6. done

On Wednesday, June 18, 2014 9:14:23 AM UTC+8, Karthik V S wrote:
Hi,

I am getting the same error. Can anyone provide the solution for this? I am using Eclipse Kepler.

On Friday, 15 November 2013 10:29:28 UTC-8, kutzi wrote:
Hi,

I had several problems with building Jenkins/maven-plugin in the past,
but the errors I'm getting now are especial nasty:
Eclipse e.g. complains that it cannot find hudson.model.Queue.Item (in
MavenModuleSet) and several other compile errors.
I checked the the Jenkins core jar is intact (building with mvn works)
and no amount of refreshing in Eclipse and the usual other tricks to get
it working again got me anywhere.

Did anyone have similar problems and maybe a solution?
Eclipse Kepler 4.3.1, M2e 1.4.0

-
Kutzi

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Problems building maven-plugin in Eclipse

Tomas Kolda
In reply to this post by Jesse Glick-4
I used 1.554.3 that uses 1.9 and have same issue.

import hudson.model.Node.Mode; -> The import hudson.model.Node.Mode cannot be resolved
or
public static final Mode DEFAULT_MODE = Mode.EXCLUSIVE; -> Mode cannot be resolved to a type

Is there Jenkins issue already for this? I do not want to build my core as a workaround. What the people are using for development? I only found issue in JDT:

On Tuesday, May 27, 2014 10:00:54 PM UTC+2, Jesse Glick wrote:
On Sat, Nov 16, 2013 at 4:46 AM, Christoph Kutzinski <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="zyUV_JKHh-gJ" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">ku...@...> wrote:
> Maybe we're missing this bug fix which comes with bridge-method-annotation 1.9

Well Jenkins 1.536+ uses 1.9.

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Problems building maven-plugin in Eclipse

Jakub Bocheński
3 years later the issue is still there.

Is there any better workaround than changing and recompiling core locally?

On Wednesday, July 9, 2014 at 3:21:47 PM UTC+2, Tomas Kolda wrote:
I used 1.554.3 that uses 1.9 and have same issue.

import hudson.model.Node.Mode; -> The import hudson.model.Node.Mode cannot be resolved
or
public static final Mode DEFAULT_MODE = Mode.EXCLUSIVE; -> Mode cannot be resolved to a type

Is there Jenkins issue already for this? I do not want to build my core as a workaround. What the people are using for development? I only found issue in JDT:
<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=424952" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fbugs.eclipse.org%2Fbugs%2Fshow_bug.cgi%3Fid%3D424952\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHrEYCxQA8RQdIEdVRoIROHDD7YAA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fbugs.eclipse.org%2Fbugs%2Fshow_bug.cgi%3Fid%3D424952\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHrEYCxQA8RQdIEdVRoIROHDD7YAA&#39;;return true;">https://bugs.eclipse.org/bugs/show_bug.cgi?id=424952

On Tuesday, May 27, 2014 10:00:54 PM UTC+2, Jesse Glick wrote:
On Sat, Nov 16, 2013 at 4:46 AM, Christoph Kutzinski <[hidden email]> wrote:
> Maybe we're missing this bug fix which comes with bridge-method-annotation 1.9

Well Jenkins 1.536+ uses 1.9.

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/f56b1de7-7a38-4f18-9bc3-14fba9f118e7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.