jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven 2.x Plugin Tools
  • MPLUGIN-102

The 2.4 Release Breaks Previously-Working Builds

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 2.4
  • Fix Version/s: 2.4.1
  • Component/s: Plugin Plugin
  • Labels:
    None
  • Environment:
    Maven version: 2.0.8
    Java version: 1.5.0_14
    OS name: "windows vista" version: "6.0" arch: "x86" Family: "windows"

Description

We have an archetype contained within our project. Today, when I tried to run our build, I got the following error:

[INFO] [plugin:descriptor]
[INFO] Using 2 extractors.
[INFO] Applying extractor for language: java
[INFO] Extractor for language: java found 0 mojo descriptors.
[INFO] Applying extractor for language: bsh
[INFO] Extractor for language: bsh found 0 mojo descriptors.
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error extracting plugin descriptor: 'No mojo descriptors found in plugin.'

However, if I add this to my pom.xml file for that module:

<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>2.3</version>
</plugin>
</plugins>
</pluginManagement>

the build works just fine, as usual (understandable since the 2.4 release came out yesterday).

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Hide
    Zip Archive
    archetype-test.zip
    19/Mar/08 3:04 PM
    5 kB
    James Carman
    1. XML File
      archetype-test/pom.xml 1 kB
    2. File
      archetype-test/src/.../archetype.properties 0.0 kB
    3. XML File
      archetype-test/src/.../pom.xml 0.2 kB
    4. XML File
      archetype-test/src/.../META-INF/beans.xml 0.3 kB
    5. XML File
      archetype-test/src/.../archetype.xml 0.3 kB
    Download Zip
    Show
    Zip Archive
    archetype-test.zip
    19/Mar/08 3:04 PM
    5 kB
    James Carman
  2. Text File
    debug.log
    19/Mar/08 3:18 PM
    41 kB
    James Carman

Issue Links

depends upon

Bug - A problem which impairs or prevents the functions of the product. MPLUGIN-103 Plugins without descriptors

  • Minor - Minor loss of function, or other problem where easy workaround is present.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.
is related to

Bug - A problem which impairs or prevents the functions of the product. MPLUGIN-103 Plugins without descriptors

  • Minor - Minor loss of function, or other problem where easy workaround is present.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.
relates to

Bug - A problem which impairs or prevents the functions of the product. MPLUGIN-106 remove no mojo deprecation warning and throw an exception

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Benjamin Bentmann added a comment - 19/Mar/08 11:47 AM

The plugin-plugin works in other cases so the problem is likely caused by something specific to your project/environment. Could you please attach a debug log of Maven and if possible some test project to reproduce this? Just from your description it's really hard to start the bug search.

As a side note: For best build reproducibility, consider to always specify fixed versions for the plugins you employ during the build. This adds a little more clutter to the POM but frees you from such surprises. If you have a parent POM, its <pluginManagement> section is a good place to do this centrally.

Show
Benjamin Bentmann added a comment - 19/Mar/08 11:47 AM The plugin-plugin works in other cases so the problem is likely caused by something specific to your project/environment. Could you please attach a debug log of Maven and if possible some test project to reproduce this? Just from your description it's really hard to start the bug search. As a side note: For best build reproducibility, consider to always specify fixed versions for the plugins you employ during the build. This adds a little more clutter to the POM but frees you from such surprises. If you have a parent POM, its <pluginManagement> section is a good place to do this centrally.
Hide
Permalink
James Carman added a comment - 19/Mar/08 3:04 PM

Here's an example project.

Show
James Carman added a comment - 19/Mar/08 3:04 PM Here's an example project.
Hide
Permalink
James Carman added a comment - 19/Mar/08 3:06 PM

Yes, I'm currently in the process of locking down all versions of our project's plugins. This seems to be quite tedious. I was trying to use the enforcer plugin, but it has its own problems:

http://jira.codehaus.org/browse/MENFORCER-25

Is there an easy way to ask "what are all my plugins I'm using and what are the current versions"? Better yet, I'd love to be able to do:

mvn plugin:lockdown-current

Show
James Carman added a comment - 19/Mar/08 3:06 PM Yes, I'm currently in the process of locking down all versions of our project's plugins. This seems to be quite tedious. I was trying to use the enforcer plugin, but it has its own problems: http://jira.codehaus.org/browse/MENFORCER-25 Is there an easy way to ask "what are all my plugins I'm using and what are the current versions"? Better yet, I'd love to be able to do: mvn plugin:lockdown-current
Hide
Permalink
James Carman added a comment - 19/Mar/08 3:07 PM

By the way, the Tapestry folks also ran into this issue. Have a look:

https://issues.apache.org/jira/browse/TAPESTRY-1914

Show
James Carman added a comment - 19/Mar/08 3:07 PM By the way, the Tapestry folks also ran into this issue. Have a look: https://issues.apache.org/jira/browse/TAPESTRY-1914
Hide
Permalink
Benjamin Bentmann added a comment - 19/Mar/08 6:06 PM

Caused by change for MPLUGIN-103 applied in r543359.

Show
Benjamin Bentmann added a comment - 19/Mar/08 6:06 PM Caused by change for MPLUGIN-103 applied in r543359.
Hide
Permalink
Vincent Siveton added a comment - 19/Mar/08 8:07 PM

Other comments on your test case:

Adding the following

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-plugin-plugin</artifactId>
                <version>2.4</version>
            </plugin>
        </plugins>
    </reporting>

mvn site fails with a NPE on maven-plugin-plugin 2.3 or bellow but produces your error on 2.4

Show
Vincent Siveton added a comment - 19/Mar/08 8:07 PM Other comments on your test case: Adding the following
    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-plugin-plugin</artifactId>
                <version>2.4</version>
            </plugin>
        </plugins>
    </reporting>
mvn site fails with a NPE on maven-plugin-plugin 2.3 or bellow but produces your error on 2.4
Hide
Permalink
Leonardo Uribe added a comment - 19/Mar/08 8:36 PM

I have the same error running archetypes with 2.4

The log is this:

[INFO] Apache MyFaces Trinidad Archetype
[INFO] MyFaces Archetype
[INFO] MyFaces Archetype Facelets
[INFO] MyFaces Portlet Archetype
[INFO] ------------------------------------------------------------------------
[INFO] Building Apache MyFaces Buildtools Maven2 Archetype Parent
[INFO] task-segment: [clean, install]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] [site:attach-descriptor]
[INFO] [install:install]
[INFO] Installing C:\GSOC\workspace\maven2-archetypes\pom.xml to C:\Documents and Settings\Leonardo\.m2\repository\org\apache\myfaces\buildtools\myfaces-archetype-parent\1.0.1-SNAPSHOT\myfaces-archetype-parent-1.0.1-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] Building JSF Components Library Archetype
[INFO] task-segment: [clean, install]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] Deleting directory C:\GSOC\workspace\maven2-archetypes\myfaces-archetype-jsfcomponents\target
[INFO] [plugin:descriptor]
[INFO] Using 2 extractors.
[INFO] Applying extractor for language: java
[INFO] Extractor for language: java found 0 mojo descriptors.
[INFO] Applying extractor for language: bsh
[INFO] Extractor for language: bsh found 0 mojo descriptors.
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error extracting plugin descriptor: 'No mojo descriptors found in plugin.'

[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error extracting plugin descriptor: 'No mojo descriptors found in plugin.'
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:564)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:333)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:282)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error extracting plugin descriptor: 'No mojo descriptors found in plugin.'
at org.apache.maven.plugin.plugin.AbstractGeneratorMojo.execute(AbstractGeneratorMojo.java:149)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:447)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
... 16 more
Caused by: org.apache.maven.plugin.descriptor.InvalidPluginDescriptorException: No mojo descriptors found in plugin.
at org.apache.maven.tools.plugin.scanner.DefaultMojoScanner.populatePluginDescriptor(DefaultMojoScanner.java:107)
at org.apache.maven.plugin.plugin.AbstractGeneratorMojo.execute(AbstractGeneratorMojo.java:137)
... 18 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5 seconds
[INFO] Finished at: Wed Mar 19 20:32:46 COT 2008
[INFO] Final Memory: 11M/254M
[INFO] ------------------------------------------------------------------------

getting back to 2.3 make this work again

Show
Leonardo Uribe added a comment - 19/Mar/08 8:36 PM I have the same error running archetypes with 2.4 The log is this: [INFO] Apache MyFaces Trinidad Archetype [INFO] MyFaces Archetype [INFO] MyFaces Archetype Facelets [INFO] MyFaces Portlet Archetype [INFO] ------------------------------------------------------------------------ [INFO] Building Apache MyFaces Buildtools Maven2 Archetype Parent [INFO] task-segment: [clean, install] [INFO] ------------------------------------------------------------------------ [INFO] [clean:clean] [INFO] [site:attach-descriptor] [INFO] [install:install] [INFO] Installing C:\GSOC\workspace\maven2-archetypes\pom.xml to C:\Documents and Settings\Leonardo\.m2\repository\org\apache\myfaces\buildtools\myfaces-archetype-parent\1.0.1-SNAPSHOT\myfaces-archetype-parent-1.0.1-SNAPSHOT.pom [INFO] ------------------------------------------------------------------------ [INFO] Building JSF Components Library Archetype [INFO] task-segment: [clean, install] [INFO] ------------------------------------------------------------------------ [INFO] [clean:clean] [INFO] Deleting directory C:\GSOC\workspace\maven2-archetypes\myfaces-archetype-jsfcomponents\target [INFO] [plugin:descriptor] [INFO] Using 2 extractors. [INFO] Applying extractor for language: java [INFO] Extractor for language: java found 0 mojo descriptors. [INFO] Applying extractor for language: bsh [INFO] Extractor for language: bsh found 0 mojo descriptors. [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Error extracting plugin descriptor: 'No mojo descriptors found in plugin.' [INFO] ------------------------------------------------------------------------ [INFO] Trace org.apache.maven.lifecycle.LifecycleExecutionException: Error extracting plugin descriptor: 'No mojo descriptors found in plugin.' at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:564) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:333) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126) at org.apache.maven.cli.MavenCli.main(MavenCli.java:282) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: org.apache.maven.plugin.MojoExecutionException: Error extracting plugin descriptor: 'No mojo descriptors found in plugin.' at org.apache.maven.plugin.plugin.AbstractGeneratorMojo.execute(AbstractGeneratorMojo.java:149) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:447) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539) ... 16 more Caused by: org.apache.maven.plugin.descriptor.InvalidPluginDescriptorException: No mojo descriptors found in plugin. at org.apache.maven.tools.plugin.scanner.DefaultMojoScanner.populatePluginDescriptor(DefaultMojoScanner.java:107) at org.apache.maven.plugin.plugin.AbstractGeneratorMojo.execute(AbstractGeneratorMojo.java:137) ... 18 more [INFO] ------------------------------------------------------------------------ [INFO] Total time: 5 seconds [INFO] Finished at: Wed Mar 19 20:32:46 COT 2008 [INFO] Final Memory: 11M/254M [INFO] ------------------------------------------------------------------------ getting back to 2.3 make this work again
Hide
Permalink
Dennis Lundberg added a comment - 21/Mar/08 6:15 AM

James, why do you have this in the pom of your archetype?

<packaging>maven-plugin</packaging>

That's what is pulling in the plugin-plugin. But your code doesn't have any plugin in it so plugin-plugin (correctly IMO) reports the error.

Show
Dennis Lundberg added a comment - 21/Mar/08 6:15 AM James, why do you have this in the pom of your archetype?
<packaging>maven-plugin</packaging>
That's what is pulling in the plugin-plugin. But your code doesn't have any plugin in it so plugin-plugin (correctly IMO) reports the error.
Hide
Permalink
James Carman added a comment - 21/Mar/08 6:36 AM

Because I followed the directions here when I created it:

http://maven.apache.org/guides/mini/guide-creating-archetypes.html

Show
James Carman added a comment - 21/Mar/08 6:36 AM Because I followed the directions here when I created it: http://maven.apache.org/guides/mini/guide-creating-archetypes.html
Hide
Permalink
Dennis Lundberg added a comment - 21/Mar/08 9:40 AM

It turns out that that page is not correct. You should change the packaging to "jar" to solve your problem. I've committed a change to said document in svn.

Show
Dennis Lundberg added a comment - 21/Mar/08 9:40 AM It turns out that that page is not correct. You should change the packaging to "jar" to solve your problem. I've committed a change to said document in svn.
Hide
Permalink
James Carman added a comment - 21/Mar/08 9:51 AM

But, it's not a jar module. It's an archetype. It seems like there might be support for a "maven-archetype" packaging:

http://jira.codehaus.org/browse/ARCHETYPE-88

However, this worked in the past just fine and apparently was the way we were supposed to do it. So, I guess this is a backward compatibility issue? If the packaging must change because of this code change, maybe the error message could give us a little hint?

Error extracting plugin descriptor: 'No mojo descriptors found in plugin (for archetypes, please use packaging jar/maven-archetype).'

Show
James Carman added a comment - 21/Mar/08 9:51 AM But, it's not a jar module. It's an archetype. It seems like there might be support for a "maven-archetype" packaging: http://jira.codehaus.org/browse/ARCHETYPE-88 However, this worked in the past just fine and apparently was the way we were supposed to do it. So, I guess this is a backward compatibility issue? If the packaging must change because of this code change, maybe the error message could give us a little hint? Error extracting plugin descriptor: 'No mojo descriptors found in plugin (for archetypes, please use packaging jar/maven-archetype).'
Hide
Permalink
Dennis Lundberg added a comment - 21/Mar/08 10:17 AM

I did go and ask the developers about this before I replied.

You can read the thread here:
http://www.nabble.com/Is-an-archetype-really-a-plugin--to16198757s177.html

Show
Dennis Lundberg added a comment - 21/Mar/08 10:17 AM I did go and ask the developers about this before I replied. You can read the thread here: http://www.nabble.com/Is-an-archetype-really-a-plugin--to16198757s177.html
Hide
Permalink
James Carman added a comment - 21/Mar/08 10:59 AM - edited

Ok, so the old documentation was wrong? That means that there are probably lots (as many people who were willing to write their own archetypes for maven) of folks out there using maven-plugin as their packaging in their archetypes. The unfortunate thing is that this actually worked in the past and now it doesn't.

Show
James Carman added a comment - 21/Mar/08 10:59 AM - edited Ok, so the old documentation was wrong? That means that there are probably lots (as many people who were willing to write their own archetypes for maven) of folks out there using maven-plugin as their packaging in their archetypes. The unfortunate thing is that this actually worked in the past and now it doesn't.
Hide
Permalink
Brian Fox added a comment - 21/Mar/08 2:58 PM

We're restoring the old functionality for one release with a huge warning:

[INFO] Extractor for language: bsh found 0 mojo descriptors.
[WARNING]
[WARNING]
[WARNING]
[WARNING]
[WARNING]
[WARNING]
[WARNING]
[WARNING]
[WARNING]
[WARNING]
[WARNING] *******************************************************
[WARNING] Deprecation Alert:
[WARNING] No mojo descriptors were found in this project, which has a packaging type of maven-plugin.
[WARNING] In future versions of the plugin tools, this will fail the build.
[WARNING] If this project is an archetype, change the packaging type from maven-plugin to maven-archetype.
[WARNING] ********************************************************
[WARNING]
[WARNING]
[WARNING]
[WARNING]
[WARNING]
[WARNING]
[WARNING]
[WARNING]
[WARNING]
[WARNING]
Show
Brian Fox added a comment - 21/Mar/08 2:58 PM We're restoring the old functionality for one release with a huge warning:
[INFO] Extractor for language: bsh found 0 mojo descriptors.
[WARNING]
[WARNING]
[WARNING]
[WARNING]
[WARNING]
[WARNING]
[WARNING]
[WARNING]
[WARNING]
[WARNING]
[WARNING] *******************************************************
[WARNING] Deprecation Alert:
[WARNING] No mojo descriptors were found in this project, which has a packaging type of maven-plugin.
[WARNING] In future versions of the plugin tools, this will fail the build.
[WARNING] If this project is an archetype, change the packaging type from maven-plugin to maven-archetype.
[WARNING] ********************************************************
[WARNING]
[WARNING]
[WARNING]
[WARNING]
[WARNING]
[WARNING]
[WARNING]
[WARNING]
[WARNING]
[WARNING]
Hide
Permalink
James Carman added a comment - 21/Mar/08 4:36 PM

I like it! Thanks.

Show
James Carman added a comment - 21/Mar/08 4:36 PM I like it! Thanks.

People

  • Assignee:
    Brian Fox
    Reporter:
    James Carman
Vote (0)
Watch (0)

Dates

  • Created:
    19/Mar/08 10:09 AM
    Updated:
    21/Mar/08 4:36 PM
    Resolved:
    21/Mar/08 2:58 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.