Issue Details (XML | Word | Printable)

Key: MNGECLIPSE-380
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Igor Fedorenko
Reporter: Thomas Hart
Votes: 8
Watchers: 4
Operations

If you were logged in you would be able to see more operations.
Maven Integration for Eclipse

problem with workspace resolution of maven-plugin projects

Created: 31/Jul/07 04:57 AM   Updated: 28/May/08 11:46 PM   Resolved: 28/May/08 11:46 PM
Component/s: Dependency Resolver
Affects Version/s: 0.0.11
Fix Version/s: 0.9.4

Time Tracking:
Not Specified

File Attachments: 1. Zip Archive flexproject.zip (0.6 kB)
2. Zip Archive projectNull.zip (7 kB)

Image Attachments:

1. editor error.jpg
(15 kB)
Issue Links:
dependent
 


 Description  « Hide

I have wrote my own maven plugin for har packaging. In the pom.xml is the tag <extensions>true</extensions> defined. This is needed to execute my plugin during the package phase. But if the tag <extensions> is in the pom.xml i get a Project build error null error message. In the console, problem view and the editor (see screenshot).
Plugin Version: 0.0.11.20070603-1200<plugin> <groupId>suite4p.commons</groupId> <artifactId>suite4p.commons.jboss-plugin</artifactId> <extensions>true</extensions></plugin>



Eugene Kuleshov added a comment - 31/Jul/07 07:23 AM

Please attach sample project that would allow us to reproduce this issue. Thanks.


Thomas Hart added a comment - 31/Jul/07 07:31 AM

I checked out the latest version from svn and it works.

BTW: When i enable the Include Modules feature from the maven container, the class Maven2Builder gets a NPE in line 103.


Eugene Kuleshov added a comment - 31/Jul/07 07:43 AM

We still going to need a test project to reproduce that.


Thomas Hart added a comment - 31/Jul/07 08:30 AM
  1. install the plugin
  2. refresh eclipse
  3. insert a space in the demo pom and save
  4. the error message appears in the demo pom

Eugene Kuleshov added a comment - 17/Sep/07 11:01 AM

Thomas, thanks fro the test case. I've been able to reproduce this issue. In 0.0.11 release you'll see error like
"The PluginDescriptor for the plugin org.maven.ide.eclipse.projects:MNGECLIPSE-380-plugin was not found MNGECLIPSE-380-demo". It seems like a problem with our workspace project resolution and the only workaround for now is to close plugin project, so workspace resolver won't see it. Also note that you don't need to edit pom.xml to rebuild classpath container, just kick Project / Clean... action.

Jason, it looks like our custom resolver don't update some info in the pluginCollector instance. See stack trace below. Can you please tell me what can we do about this?

java.lang.IllegalStateException: The PluginDescriptor for the plugin org.maven.ide.eclipse.projects:MNGECLIPSE-380-plugin was not found
at org.apache.maven.plugin.DefaultPluginManager.addPlugin(DefaultPluginManager.java:415)
at org.apache.maven.plugin.DefaultPluginManager.addPlugin(DefaultPluginManager.java:325)
at org.apache.maven.plugin.DefaultPluginManager.verifyVersionedPlugin(DefaultPluginManager.java:229)
at org.apache.maven.plugin.DefaultPluginManager.verifyVersionedPlugin(DefaultPluginManager.java:193)
at org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPluginManager.java:182)
at org.apache.maven.embedder.MavenEmbedder.verifyPlugin(MavenEmbedder.java:351)
at org.apache.maven.embedder.MavenEmbedder.findArtifactTypeHandlers(MavenEmbedder.java:388)
at org.apache.maven.embedder.MavenEmbedder.readProjectWithDependencies(MavenEmbedder.java:446)
at org.maven.ide.eclipse.embedder.MavenModelManager.readMavenProject(MavenModelManager.java:377)
at org.maven.ide.eclipse.embedder.BuildPathManager.resolveClasspathEntries(BuildPathManager.java:232)
at org.maven.ide.eclipse.embedder.BuildPathManager.updateClasspathContainer(BuildPathManager.java:193)
at org.maven.ide.eclipse.container.Maven2Builder.build(Maven2Builder.java:92)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:624)
...


Bouiaw added a comment - 24/Apr/08 07:16 PM

This bug occur with flex mojo plugin too, when we set :
<plugin>
<groupId>info.rvin.mojo</groupId>
<artifactId>flex-compiler-mojo</artifactId>
<extensions>true</extensions>
</plugin>

Without extensions, there is non errors


Bouiaw added a comment - 13/May/08 04:30 PM

Hi,

You can find a sample of failing POM bellow :
http://code.google.com/p/igenko/source/browse/trunk/igenko-backoffice-server/pom.xml

I have a message : fail to resolve extension plugin.


Eugene Kuleshov added a comment - 13/May/08 04:34 PM - edited

Sébastien, I really don't want us to guess what you have been doing. Can you please provide step by step instructions and specify when exactly you have that fail message. It would be much easier for use to work with small self-contained test project then trying to extract relevant pieces and resolve missing artifacts in your real projects. Thanks.


Igor Fedorenko added a comment - 14/May/08 08:52 AM

To clarify, m2eclipse does not resolve maven plugins from Eclipse workspace. Because extension plugins are essential for maven projects, maven fails processing pom.xml if it cannot resolve any of the extension plugins. Current workaround is to install the plugin into your local maven repository.


Bouiaw added a comment - 28/May/08 03:30 AM

Please find attached a test cased where m2eclipse trigger an error.

If you remove <extensions>true</extensions> from pom.xml, there is no more error but the plugin no more works


Eugene Kuleshov added a comment - 28/May/08 10:36 AM

Sébastien, please note that this issue is only about Maven plugins that code is in Eclipse Workspace. Currently those excplicitly disabled for resolving from Workspace and they always resolved from local or remote Maven repositories (hence plugins need to be deployed there).

So, the project you've attached is showing a completely unrelated issue. Please open separate jira issue for this. Note that root cause there is related to embedded Maven can't download flex-compiler-mojo from any repository. If you run maven build from the command line and then close and reopen your project in Eclipse, it will work. Also note that you need to specify both <repository> and <pluginRepository>.


Igor Fedorenko added a comment - 28/May/08 11:46 PM

Workspace resolution of extensions plugins should work now.