3 Replies Latest reply on Nov 25, 2015 2:34 AM by bs09543

    Plugin creation using Maven failing

    priyesh

      I am new to Maven and Jive. I tried to create a  new HelloWorld plugin in maven. I want to use the plugin with Jive6. The following is my command.

       

      D:\Projects\Maven>mvn archetype:generate -e -B -P jive.archiva -DarchetypeGroupId=com.jivesoftware.maven -DarchetypeArtifactId=maven-jive-plugin-archetype -DarchetypeVersion=6.0.x-SNAPSHOT

      -DgroupId=com.jivesoftware.helloworld -DartifactId=helloworld

       

      The following is the response i got. I have bypassed proxies for jivesoftware.com and apache.org. Also the above command works for -DarchetypeArtifactId=maven-jive-archetype. The problem is for

      -DarchetypeArtifactId=maven-jive-plugin-archetype. Does anyone have any idea how to solve this?

       

       

      [INFO] Error stacktraces are turned on.
      [INFO] Scanning for projects...
      [INFO]
      [INFO] ------------------------------------------------------------------------
      [INFO] Building Maven Stub Project (No POM) 1
      [INFO] ------------------------------------------------------------------------
      [INFO]
      [INFO] >>> maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom >>>
      [INFO]
      [INFO] <<< maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom <<<
      [INFO]
      [INFO] --- maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom ---
      [INFO] Generating project in Batch mode
      [WARNING] Error reading archetype catalog http://repo1.maven.org/maven2
      org.apache.maven.wagon.TransferFailedException: peer not authenticated
              at org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.fillInput
      Data(AbstractHttpClientWagon.java:892)
              at org.apache.maven.wagon.StreamWagon.getInputStream(StreamWagon.java:116)
              at org.apache.maven.wagon.StreamWagon.getIfNewer(StreamWagon.java:88)
              at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:61)
              at org.apache.maven.archetype.source.RemoteCatalogArchetypeDataSource.downloadCatalog(RemoteCatalogArchetypeDataSource.java:119)
              at org.apache.maven.archetype.source.RemoteCatalogArchetypeDataSource.getArchetypeCatalog(RemoteCatalogArchetypeDataSource.java:87)
              at org.apache.maven.archetype.DefaultArchetypeManager.getRemoteCatalog(DefaultArchetypeManager.java:216)
              at org.apache.maven.archetype.DefaultArchetypeManager.getRemoteCatalog(DefaultArchetypeManager.java:205)
              at org.apache.maven.archetype.ui.generation.DefaultArchetypeSelector.getArchetypesByCatalog(DefaultArchetypeSelector.java:200)
              at org.apache.maven.archetype.ui.generation.DefaultArchetypeSelector.selectArchetype(DefaultArchetypeSelector.java:71)
              at org.apache.maven.archetype.mojos.CreateProjectFromArchetypeMojo.execute(CreateProjectFromArchetypeMojo.java:197)
              at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
              at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
              at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
              at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
              at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
              at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
              at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
              at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
              at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
              at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
              at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
              at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
              at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:606)
              at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
              at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
              at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
              at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
      Caused by: javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
         at sun.security.ssl.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:397)
              at org.apache.maven.wagon.providers.http.httpclient.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:126)
              at org.apache.maven.wagon.providers.http.httpclient.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:572)
              at org.apache.maven.wagon.shared.http4.ConfigurableSSLSocketFactoryDecorator.connectSocket(ConfigurableSSLSocketFactoryDecorator.java:64)
              at org.apache.maven.wagon.providers.http.httpclient.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180)
              at org.apache.maven.wagon.providers.http.httpclient.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:294)
              at org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:645)
              at org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:480)
              at org.apache.maven.wagon.providers.http.httpclient.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
              at org.apache.maven.wagon.providers.http.httpclient.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805)
              at org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.execute(AbstractHttpClientWagon.java:746)
              at org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:886)
              ... 31 more
      [WARNING] No archetype found in remote catalog. Defaulting to internal catalog
      [WARNING] Archetype not found in any catalog. Falling back to central repository (http://repo1.maven.org/maven2).
      [WARNING] Use -DarchetypeRepository=<your repository> if archetype's repository is elsewhere.
      ven-metadata.xml
      en-metadata.xml
      [WARNING] Could not transfer metadata com.jivesoftware.maven:maven-jive-plugin-archetype:6.0.x-SNAPSHOT/maven-metadata.xml from/to maven-jive-plugin-archetype-r
      epo (http://repo1.maven.org/maven2): peer not authenticated
      [WARNING] Could not transfer metadata com.jivesoftware.maven:maven-jive-plugin-archetype:6.0.x-SNAPSHOT/maven-metadata.xml from/to jive.internal (https://maven-
      secure.jivesoftware.com/archiva/repository/jive.internal): peer not authenticated
      [WARNING] Could not transfer metadata com.jivesoftware.maven:maven-jive-plugin-archetype:6.0.x-SNAPSHOT/maven-metadata.xml from/to jive.snapshots (https://maven
      -secure.jivesoftware.com/archiva/repository/jive.snapshots): peer not authenticated
      en-jive-plugin-archetype-6.0.x-SNAPSHOT.jar
      ven-jive-plugin-archetype-6.0.x-SNAPSHOT.jar
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 4.862s
      [INFO] Finished at: Wed Dec 18 16:28:26 IST 2013
      [INFO] Final Memory: 17M/154M
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2
      .2:generate (default-cli) on project standalone-pom: The desired archetype does
      not exist (com.jivesoftware.maven:maven-jive-plugin-archetype:6.0.x-SNAPSHOT) ->
      [Help 1]
      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:generate (default-cli) on pro
      ject standalone-pom: The desired archetype does not exist (com.jivesoftware.maven:maven-jive-plugin-archetype:6.0.x-SNAPSHOT)
              at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
              at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
      .java:153)
              at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
      .java:145)
              at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
              at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
              at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
              at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
              at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
              at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
              at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
              at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:606)
              at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
              at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
              at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
              at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
      Caused by: org.apache.maven.plugin.MojoFailureException: The desired archetype does not exist (com.jivesoftware.maven:maven-jive-plugin-archetype:6.0.x-SNAPSHOT
      )
              at org.apache.maven.archetype.mojos.CreateProjectFromArchetypeMojo.execute(CreateProjectFromArchetypeMojo.java:221)
              at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
              at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
              ... 19 more
      Caused by: org.apache.maven.archetype.exception.UnknownArchetype: The desired archetype does not exist (com.jivesoftware.maven:maven-jive-plugin-archetype:6.0.x
      -SNAPSHOT)
              at org.apache.maven.archetype.ui.generation.DefaultArchetypeGenerationConfigurator.configureArchetype(DefaultArchetypeGenerationConfigurator.java:117)
              at org.apache.maven.archetype.mojos.CreateProjectFromArchetypeMojo.execute(CreateProjectFromArchetypeMojo.java:205)
              ... 21 more
      [ERROR]
      [ERROR] Re-run Maven using the -X switch to enable full debug logging.
      [ERROR]
      [ERROR] For more information about the errors and possible solutions, please read the following articles:
        • Re: Plugin creation using Maven failing
          mtuljapurkar

          You might want to check whether the maven settings.xml has been properly configured. Check the file against the instructions Maven: Settings.xml File

          I never had to use the "-P jive.archiva" argument. Is it necessary?

          1 person found this helpful
          • Re: Plugin creation using Maven failing
            shailendra

            please check you settings.xml file in windows it is in your home directory if your user name is abcd then it is in

             

            C:\Documents and Settings\abcd\.m2 folder

            In case of linux/mac system it is in the user folder /Users/abcd/.m2

             

            .m2 if hidden used by maven.

             

            if you are using proxy server to access internet then in setting.xml file add your poxy server details as shown below

             

            <?xml version="1.0"?>
            <settings>

            <proxies>

                <proxy>

                <active>true</active>

                <protocol>http</protocol>

                <host>172.18.65.22</host>

                <port>80</port>

                <username>proxyuser</username>

                <password>somepassword</password>

                 <nonProxyHosts>www.google.com|*.somewhere.com</nonProxyHosts>

                  </proxy>

                  </proxies>


                <profiles>
                    <profile>
                        <id>jive.archiva</id>
                        <activation>
                            <activeByDefault>true</activeByDefault>
                        </activation>
                        <repositories>
                            <repository>
                                <id>jive.internal</id>
                                <name>Jive's Repository</name>
                                <url>http://maven-secure.jivesoftware.com/archiva/repository/jive.internal</url>
                            </repository>

                            <repository>
                                <id>jive.snapshots</id>
                                <name>Jive's Repository</name>
                                <url>http://maven-secure.jivesoftware.com/archiva/repository/jive.snapshots</url>
                            </repository>
                        </repositories>

                        <pluginRepositories>
                            <pluginRepository>
                                <id>jive.internal</id>
                                <name>Jive's Repository</name>
                                <url>http://maven-secure.jivesoftware.com/archiva/repository/jive.internal</url>
                            </pluginRepository>

                            <pluginRepository>
                                <id>jive.snapshots</id>
                                <name>Jive's Repository</name>
                                <url>http://maven-secure.jivesoftware.com/archiva/repository/jive.snapshots</url>
                            </pluginRepository>
                        </pluginRepositories>

                        <properties>
                            <tomcat6.home><![CDATA[/jive5/apache-tomcat-6.0.14]]></tomcat6.home>
                            <cargo.wait>false</cargo.wait>
                            <jive.setup>true</jive.setup>
                            <jive.devMode>false</jive.devMode>
                            <pluginDirs>null</pluginDirs>
                        </properties>
                    </profile>
                </profiles>
            <!-- Be sure to substitute your login name and password information here -->
                <servers>
                     <server>
                        <id>jive.internal</id>
                        <username>username</username>
                        <password>pass</password>
                     </server>
                     <server>
                        <id>jive.snapshots</id>
                        <username>username</username>
                        <password>pass</password>
                     </server>
                  </servers>
            </settings>

            1 person found this helpful