Uploaded image for project: 'Maven Plugin Tools'
  1. Maven Plugin Tools
  2. MPLUGIN-269

maven-plugin-tools-annotations does not work in builds which don't package

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • None
    • None
    • None

    Description

      When running descriptor goal inside m2e workspace, I get the following exception for plugin projects that depend on other plugin projects.

      org.apache.maven.plugin.PluginExecutionException: Execution default-descriptor of goal org.apache.maven.plugins:maven-plugin-plugin:3.3:descriptor failed: The source must not be a directory.
      	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:143)
      	at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:328)
      	at org.eclipse.m2e.core.internal.embedder.MavenImpl$10.call(MavenImpl.java:1355)
      	at org.eclipse.m2e.core.internal.embedder.MavenImpl$10.call(MavenImpl.java:1)
      	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:174)
      	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:110)
      	at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:1353)
      	at org.eclipse.m2e.core.project.configurator.MojoExecutionBuildParticipant.build(MojoExecutionBuildParticipant.java:52)
      	at org.eclipse.m2e.core.internal.builder.MavenBuilderImpl.build(MavenBuilderImpl.java:132)
      	at org.eclipse.m2e.core.internal.builder.MavenBuilder$1.method(MavenBuilder.java:172)
      	at org.eclipse.m2e.core.internal.builder.MavenBuilder$1.method(MavenBuilder.java:1)
      	at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod$1$1.call(MavenBuilder.java:115)
      	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:174)
      	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:110)
      	at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod$1.call(MavenBuilder.java:105)
      	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:174)
      	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:149)
      	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:97)
      	at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.execute(MavenBuilder.java:86)
      	at org.eclipse.m2e.core.internal.builder.MavenBuilder.build(MavenBuilder.java:200)
      	at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:734)
      	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
      	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)
      	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246)
      	at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:299)
      	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
      	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:302)
      	at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:358)
      	at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:381)
      	at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
      	at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
      	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
      Caused by: org.codehaus.plexus.archiver.ArchiverException: The source must not be a directory.
      	at org.codehaus.plexus.archiver.AbstractUnArchiver.validate(AbstractUnArchiver.java:185)
      	at org.codehaus.plexus.archiver.AbstractUnArchiver.extract(AbstractUnArchiver.java:118)
      	at org.apache.maven.tools.plugin.annotations.JavaAnnotationsMojoDescriptorExtractor.discoverClassesFromSourcesJar(JavaAnnotationsMojoDescriptorExtractor.java:220)
      	at org.apache.maven.tools.plugin.annotations.JavaAnnotationsMojoDescriptorExtractor.scanJavadoc(JavaAnnotationsMojoDescriptorExtractor.java:172)
      	at org.apache.maven.tools.plugin.annotations.JavaAnnotationsMojoDescriptorExtractor.execute(JavaAnnotationsMojoDescriptorExtractor.java:100)
      	at org.apache.maven.tools.plugin.scanner.DefaultMojoScanner.populatePluginDescriptor(DefaultMojoScanner.java:96)
      	at org.apache.maven.plugin.plugin.AbstractGeneratorMojo.execute(AbstractGeneratorMojo.java:243)
      	at org.apache.maven.plugin.plugin.DescriptorGeneratorMojo.execute(DescriptorGeneratorMojo.java:90)
      	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
      	... 31 more
      

      As a result, plugin.xml is not generated and the plugin cannot be used from m2e workspace directly.

      The same exception is thrown during multimodule reactor build invoked with "mvn clean process-classes -e".

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            rfscholte Robert Scholte
            igorf Igor Fedorenko
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment