11 Replies Latest reply on Jul 12, 2007 4:49 PM by Paul Gier

    maven-resources-plugin problem

    Scott Stark Master

      I'm not able to build the https://svn.jboss.org/repos/common/jbossxb/tags/1.0.0.CR9 project, but its failing with this error. I have completely replaced my local maven2 repo and the problem is still there.

      [starksm@succubus jbossxb-1.0.0.CR9]$ mvn -e install
      + Error stacktraces are turned on.
      [INFO] Scanning for projects...
      [INFO] ----------------------------------------------------------------------------
      [INFO] Building JBoss XML Binding
      [INFO] task-segment: [install]
      [INFO] ----------------------------------------------------------------------------
      [INFO] ------------------------------------------------------------------------[ERROR] BUILD ERROR
      [INFO] ------------------------------------------------------------------------[INFO] The plugin 'org.apache.maven.plugins:maven-resources-plugin' does not exist or no valid version could be found
      [INFO] ------------------------------------------------------------------------[INFO] Trace
      org.apache.maven.lifecycle.LifecycleExecutionException: The plugin 'org.apache.maven.plugins:maven-resources-plugin' does not exist or no valid version could be found
       at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1281)
       at org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor(DefaultLifecycleExecutor.java:1517)
       at org.apache.maven.lifecycle.DefaultLifecycleExecutor.bindLifecycleForPackaging(DefaultLifecycleExecutor.java:1011)
       at org.apache.maven.lifecycle.DefaultLifecycleExecutor.constructLifecycleMappings(DefaultLifecycleExecutor.java:975)
       at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:453)
       at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
       at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
       at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
       at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
       at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
       at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
       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.version.PluginVersionNotFoundException: The plugin 'org.apache.maven.plugins:maven-resources-plugin' does not exist or no valid version could be found
       at org.apache.maven.plugin.version.DefaultPluginVersionManager.resolvePluginVersion(DefaultPluginVersionManager.java:225)
       at org.apache.maven.plugin.version.DefaultPluginVersionManager.resolvePluginVersion(DefaultPluginVersionManager.java:87)
       at org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPluginManager.java:158)
       at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1252)
       ... 18 more
      [INFO] ------------------------------------------------------------------------[INFO] Total time: < 1 second
      [INFO] Finished at: Mon Feb 26 22:45:58 PST 2007
      [INFO] Final Memory: 2M/74M
      [INFO] ------------------------------------------------------------------------[starksm@succubus jbossxb-1.0.0.CR9]$
      


      The maven-resources-plugin include:
      [starksm@succubus repository.jboss.com]$ ls -l maven2/org/apache/maven/plugins/maven-resources-plugin/2.2
      total 52
      drwxrwxr-x 2 starksm starksm 4096 Feb 26 22:16 CVS/
      -rw-rw-r-- 1 starksm starksm 13596 Dec 10 09:02 maven-resources-plugin-2.2.jar-rw-rw-r-- 1 starksm starksm 40 Dec 10 09:02 maven-resources-plugin-2.2.jar.sha1
      -rw-rw-r-- 1 starksm starksm 1509 Dec 10 09:02 maven-resources-plugin-2.2.pom-rw-rw-r-- 1 starksm starksm 40 Dec 10 09:02 maven-resources-plugin-2.2.pom.sha1
      



        • 1. Re: maven-resources-plugin problem
          Paul Gier Master

          It looks like the problem is caused by the reference to the ibiblio repository. The standard maven repository is now http://repo1.maven.org/maven2.
          There is still a problem with the jboss-common-core 1.0 jar that's currently in the repository though. It looks like this jar file is corrupt.

          • 2. Re: maven-resources-plugin problem
            Scott Stark Master

            The jboss-common-core 1.0 jar is not a valid release. It was some poc that Ruel did. I reset the common version:

             <dependency>
             <groupId>jboss</groupId>
             <artifactId>jboss-common</artifactId>
             <version>1.0.4.GA</version>
             <scope>compile</scope>
             </dependency>
            


            The debugging output of mvn is terrible in these version problem situations. How can this be improved?


            • 3. Re: maven-resources-plugin problem
              Paul Gier Master

               

              "scott.stark@jboss.org" wrote:

              The debugging output of mvn is terrible in these version problem situations. How can this be improved?


              I agree with you, maven does not have good error handling especially when it comes to figuring out problems with dependencies. As I come across different problems like this, I will add information to the jboss wiki and/or create a maven jira issue and hope that they improve this part of maven.

              • 4. Re: maven-resources-plugin problem
                ryan.campbell Expert

                Isn't this the sort of thing we could contract with someone to get done in the Maven codebase for us?

                Proper error handling of version configuration issues seems like an important feature.

                Or could you look at submitting a patch for something like this? Having someone earn commiter status on Maven seems like a good goal.

                • 5. Re: maven-resources-plugin problem
                  Scott Stark Master

                  Yes, I'm expecting that we get to contributing to the maven project. Contributing to it vs maintaining jbossbuild was the direction we decided to go.

                  • 6. Re: maven-resources-plugin problem
                    Paul Gier Master

                     

                    "scott.stark@jboss.org" wrote:
                    The jboss-common-core 1.0 jar is not a valid release. It was some poc that Ruel did. I reset the common version:



                    I removed the dependencies on jboss-logging-spi 1.0 and jboss-logging-log4j 1.0 from the pom. logging-log4j is dependent on commons-core 1.0 which is not valid. I don't think those are needed since jboss-common-1.0.4.GA includes the files from those subprojects, right? A lot of the unit tests are failing, but at least it is building now.

                    • 7. Re: maven-resources-plugin problem
                      Paul Gier Master

                      One thing that helps me debugging dependency problems is the dependency report.

                      mvn project-info-reports:dependencies

                      This will generate a report in target/site/dependencies.html
                      I also put this in the wiki in a Maven FAQ


                      • 8. Re: maven-resources-plugin problem
                        Scott Stark Master

                         

                        "pgier" wrote:
                        "scott.stark@jboss.org" wrote:
                        The jboss-common-core 1.0 jar is not a valid release. It was some poc that Ruel did. I reset the common version:



                        I removed the dependencies on jboss-logging-spi 1.0 and jboss-logging-log4j 1.0 from the pom. logging-log4j is dependent on commons-core 1.0 which is not valid. I don't think those are needed since jboss-common-1.0.4.GA includes the files from those subprojects, right? A lot of the unit tests are failing, but at least it is building now.


                        Correct. Its a bit confused as to how jbossxb is being built. The same version is in 4.2 and 5.0 but the common versions are not consistent across these. The common 1.0.x version is based on the
                        https://svn.jboss.org/repos/common/common-old/branches/Branch_1_0/ contents.

                        We need a branch for jbossxb that depends on this and a separate branch for the 2.0.x commons dependent version.


                        • 9. Re: maven-resources-plugin problem
                          Vicky Kak Master

                           

                          C:\svn\jboss-jca\core>mvn install -e
                          + Error stacktraces are turned on.
                          [INFO] Scanning for projects...
                          [INFO] -------------------------------------------------------------------------
                          ---
                          [INFO] Building JBoss JCA Core
                          [INFO] task-segment: [install]
                          [INFO] -------------------------------------------------------------------------
                          ---
                          [INFO] -------------------------------------------------------------------------
                          ---
                          [ERROR] BUILD ERROR
                          [INFO] -------------------------------------------------------------------------
                          ---
                          [INFO] The plugin 'org.apache.maven.plugins:maven-resources-plugin' does not exi
                          st or no valid version could be found
                          [INFO] -------------------------------------------------------------------------
                          ---
                          [INFO] Trace
                          org.apache.maven.lifecycle.LifecycleExecutionException: The plugin 'org.apache.m
                          aven.plugins:maven-resources-plugin' does not exist or no valid version could be
                           found
                           at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(Defa
                          ultLifecycleExecutor.java:1247)
                           at org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor
                          (DefaultLifecycleExecutor.java:1483)
                           at org.apache.maven.lifecycle.DefaultLifecycleExecutor.bindLifecycleForP
                          ackaging(DefaultLifecycleExecutor.java:979)
                           at org.apache.maven.lifecycle.DefaultLifecycleExecutor.constructLifecycl
                          eMappings(DefaultLifecycleExecutor.java:943)
                           at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
                          ltLifecycleExecutor.java:450)
                           at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
                          dleFailures(DefaultLifecycleExecutor.java:303)
                           at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
                          ts(DefaultLifecycleExecutor.java:270)
                           at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
                          fecycleExecutor.java:139)
                           at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
                           at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
                           at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
                           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
                          java:39)
                           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                          sorImpl.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.version.PluginVersionNotFoundException: The p
                          lugin 'org.apache.maven.plugins:maven-resources-plugin' does not exist or no val
                          id version could be found
                           at org.apache.maven.plugin.version.DefaultPluginVersionManager.resolvePl
                          uginVersion(DefaultPluginVersionManager.java:225)
                           at org.apache.maven.plugin.version.DefaultPluginVersionManager.resolvePl
                          uginVersion(DefaultPluginVersionManager.java:87)
                           at org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPlug
                          inManager.java:160)
                           at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(Defa
                          ultLifecycleExecutor.java:1218)
                           ... 18 more
                          [INFO] -------------------------------------------------------------------------
                          ---
                          [INFO] Total time: < 1 second
                          [INFO] Finished at: Fri Jul 13 01:18:31 IST 2007
                          [INFO] Final Memory: 1M/2M
                          [INFO] -------------------------------------------------------------------------
                          ---
                          

                          I am too hit by the same error .
                          Few moment back I was able to run it , I don't know what has happened suddenly :(
                          I am in process of Mavenizing the JCA/MC stuff which is yet not checked in the svn .

                          • 10. Re: maven-resources-plugin problem
                            Vicky Kak Master

                            Also noticed that this does not contain any repository
                            http://ibiblio.lsu.edu/main/pub/packages/maven2
                            I have pom.xml with

                            <pluginRepository>
                             <id>central</id>
                             <name>LSU maven2 mirror</name>
                             <url>http://ibiblio.lsu.edu/main/pub/packages/maven2</url>
                             <layout>default</layout>
                             <snapshots>
                             <enabled>false</enabled>
                             <updatePolicy>never</updatePolicy>
                             </snapshots>
                             </pluginRepository>

                            Not sure if this is the problem ...
                            Strange I was able to install,package an hour back , can't figure what changes broke it .

                            • 11. Re: maven-resources-plugin problem
                              Paul Gier Master

                               

                              "vickyk" wrote:
                              Also noticed that this does not contain any repository
                              http://ibiblio.lsu.edu/main/pub/packages/maven2
                              I have pom.xml with
                              <pluginRepository>
                               <id>central</id>
                               <name>LSU maven2 mirror</name>
                               <url>http://ibiblio.lsu.edu/main/pub/packages/maven2</url>
                               <layout>default</layout>
                               <snapshots>
                               <enabled>false</enabled>
                               <updatePolicy>never</updatePolicy>
                               </snapshots>
                               </pluginRepository>

                              Not sure if this is the problem ...
                              Strange I was able to install,package an hour back , can't figure what changes broke it .


                              The central maven repository is now located here:
                              http://repo1.maven.org/maven2/

                              I think the one you are pointing to might not be used anymore, or maybe it's just down.
                              Since you defined the repository with the id "central" it will override the default "central" repository. If you just remove that repository configuration, you should be able to reach the default repository again.