6 Replies Latest reply on Feb 11, 2014 2:18 PM by whoiskevin

    Unable to create Jive 7 Plugin.

    jgotti

      When i run the following terminal command:

      mvn archetype:create -e -B -DarchetypeGroupId=com.jivesoftware.maven -DarchetypeArtifactId=maven-jive-plugin-archetype -DarchetypeVersion=7.0.x-SNAPSHOT -DgroupId=com.test.plugin -DartifactId=MyPlugin
      

       

      I receive the following ERROR:

      [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:create (default-cli) @ standalone-pom ---
      [WARNING] This goal is deprecated. Please use mvn archetype:generate instead
      [INFO] Defaulting package to group ID: com.test.plugin
      [INFO] -------------------------------------------------------------------------
      ---
      [INFO] Using following parameters for creating project from Old (1.x) Archetype:
       maven-jive-plugin-archetype:7.0.x-SNAPSHOT
      [INFO] -------------------------------------------------------------------------
      ---
      [INFO] Parameter: groupId, Value: com.test.plugin
      [INFO] Parameter: packageName, Value: com.test.plugin
      [INFO] Parameter: package, Value: com.test.plugin
      [INFO] Parameter: artifactId, Value: MyPlugin
      [INFO] Parameter: basedir, Value: C:\Code\Connect
      [INFO] Parameter: version, Value: 1.0-SNAPSHOT
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 1.592s
      [INFO] Finished at: Mon Jan 06 14:55:51 MST 2014
      [INFO] Final Memory: 21M/495M
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2
      .2:create (default-cli) on project standalone-pom: Error creating from archetype
      : The META-INF/maven/archetype.xml descriptor cannot be found. -> [Help 1]
      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal o
      rg.apache.maven.plugins:maven-archetype-plugin:2.2:create (default-cli) on proje
      ct standalone-pom: Error creating from archetype
              at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
      .java:216)
              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.buildProje
      ct(LifecycleModuleBuilder.java:84)
              at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
      ct(LifecycleModuleBuilder.java:59)
              at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBu
      ild(LifecycleStarter.java:183)
              at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl
      eStarter.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(DelegatingMethodAcces
      sorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:606)
              at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
      cher.java:289)
              at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
      a:229)
              at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
      uncher.java:415)
              at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
      356)
      Caused by: org.apache.maven.plugin.MojoExecutionException: Error creating from a
      rchetype
              at org.apache.maven.archetype.mojos.MavenArchetypeMojo.execute(MavenArch
      etypeMojo.java:239)
              at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(Default
      BuildPluginManager.java:106)
              at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
      .java:208)
              ... 19 more
      Caused by: org.apache.maven.archetype.old.ArchetypeDescriptorException: The META
      -INF/maven/archetype.xml descriptor cannot be found.
              at org.apache.maven.archetype.old.DefaultOldArchetype.createArchetype(De
      faultOldArchetype.java:189)
              at org.apache.maven.archetype.old.DefaultOldArchetype.createArchetype(De
      faultOldArchetype.java:118)
              at org.apache.maven.archetype.mojos.MavenArchetypeMojo.execute(MavenArch
      etypeMojo.java:227)
              ... 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 rea
      d the following articles:
      [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE
      xception
      

       

      Has anyone else had problems creating a Jive7 Plugin?

       

      Thanks

      -Jason

        • Re: Unable to create Jive 7 Plugin.
          jgotti

          5.0.x-SNAPSHOT & 6.0.x-SNAPSHOT work just fine, i just can't get 7 to work.

          • Re: Unable to create Jive 7 Plugin.
            jgotti

            Figured it out on my own this morning.  Looks like the archetype:create parameter has been deprecated and you have to use archetype:generate param.  This document explains: Maven: How To Create a New Maven Project

             

            I can successfully run the following to create a Jive7 plugin:

             

            mvn archetype:generate -e -B -DarchetypeGroupId=com.jivesoftware.maven -DarchetypeArtifactId=maven-jive-plugin-archetype -DarchetypeVersion=7.0.x-SNAPSHOT -DgroupId=com.jivesoftware.module1 -DartifactId=module1

             

            But running mvm clean package from the module1 directory yields the following:

            c:\Code\module1>mvn clean package
            [INFO] Scanning for projects...
            [WARNING]
            [WARNING] Some problems were encountered while building the effective model for com.jivesoftware.mod
            ule1:module1:jar:1.0
            [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missi
            ng. @ line 55, column 15
            [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-surefire-plugin is missi
            ng. @ line 105, column 21
            [WARNING] 'build.plugins.plugin.version' for org.codehaus.mojo:aspectj-maven-plugin is missing. @ li
            ne 63, column 21
            [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-jar-plugin is missing. @
             line 116, column 18
            [WARNING]
            [WARNING] It is highly recommended to fix these problems because they threaten the stability of your
             build.
            [WARNING]
            [WARNING] For this reason, future Maven versions might no longer support building such malformed pro
            jects.
            [WARNING]
            [INFO]
            [INFO] ------------------------------------------------------------------------
            [INFO] Building module1 1.0
            [INFO] ------------------------------------------------------------------------
            [WARNING] The POM for com.jivesoftware:kahadb:jar:5.3.2-5.0.0.0 is invalid, transitive dependencies
            (if any) will not be available, enable debug logging for more details
            [INFO]
            [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ module1 ---
            [INFO] Deleting c:\Code\module1\target
            [INFO]
            [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ module1 ---
            [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platfo
            rm dependent!
            [INFO] Copying 1 resource
            [INFO]
            [INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ module1 ---
            [WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dep
            endent!
            [INFO] Compiling 1 source file to c:\Code\module1\target\classes
            [INFO]
            [INFO] --- aspectj-maven-plugin:1.6:compile (default) @ module1 ---
            [WARNING] bad version number found in C:\Users\Developer\.m2\repository\org\aspectj\aspectjrt\1.7.2\
            aspectjrt-1.7.2.jar expected 1.7.4 found 1.7.2
            [WARNING] advice defined in org.springframework.orm.jpa.aspectj.JpaExceptionTranslatorAspect has not
             been applied [Xlint:adviceDidNotMatch]
            [WARNING] advice defined in org.springframework.mock.staticmock.AnnotationDrivenStaticEntityMockingC
            ontrol has not been applied [Xlint:adviceDidNotMatch]
            [WARNING] advice defined in org.springframework.mock.staticmock.AbstractMethodMockingControl has not
             been applied [Xlint:adviceDidNotMatch]
            [WARNING] advice defined in org.springframework.mock.staticmock.AbstractMethodMockingControl has not
             been applied [Xlint:adviceDidNotMatch]
            [WARNING] advice defined in com.jivesoftware.community.audit.aop.AuditAspect has not been applied [X
            lint:adviceDidNotMatch]
            [WARNING] advice defined in com.jivesoftware.community.license.DenyLicenseSeatStatusAspect has not b
            een applied [Xlint:adviceDidNotMatch]
            [INFO]
            [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ module1 ---
            [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platfo
            rm dependent!
            [INFO] Copying 1 resource
            [INFO]
            [INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @ module1 ---
            [WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dep
            endent!
            [INFO] Compiling 1 source file to c:\Code\module1\target\test-classes
            [INFO]
            [INFO] --- aspectj-maven-plugin:1.6:test-compile (default) @ module1 ---
            [WARNING] bad version number found in C:\Users\Developer\.m2\repository\org\aspectj\aspectjrt\1.7.2\
            aspectjrt-1.7.2.jar expected 1.7.4 found 1.7.2
            [WARNING] advice defined in org.springframework.orm.jpa.aspectj.JpaExceptionTranslatorAspect has not
             been applied [Xlint:adviceDidNotMatch]
            [WARNING] advice defined in org.springframework.mock.staticmock.AnnotationDrivenStaticEntityMockingC
            ontrol has not been applied [Xlint:adviceDidNotMatch]
            [WARNING] advice defined in org.springframework.mock.staticmock.AbstractMethodMockingControl has not
             been applied [Xlint:adviceDidNotMatch]
            [WARNING] advice defined in org.springframework.mock.staticmock.AbstractMethodMockingControl has not
             been applied [Xlint:adviceDidNotMatch]
            [WARNING] advice defined in com.jivesoftware.community.audit.aop.AuditAspect has not been applied [X
            lint:adviceDidNotMatch]
            [WARNING] advice defined in com.jivesoftware.community.license.DenyLicenseSeatStatusAspect has not b
            een applied [Xlint:adviceDidNotMatch]
            [INFO]
            [INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ module1 ---
            [INFO] Surefire report directory: c:\Code\module1\target\surefire-reports
            -----------------------------------------------------
             T E S T S
            -------------------------------------------------------
            
            -------------------------------------------------------
             T E S T S
            -------------------------------------------------------
            Error occurred during initialization of VM
            agent library failed to init: instrument
            Error opening zip file or JAR manifest missing : C:\Users\Developer\.m2\repository/org/aspectj/aspec
            tjweaver/1.7.2/aspectjweaver-1.7.2.jar
            
            
            Results :Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
            
            
            [INFO] ------------------------------------------------------------------------
            [INFO] BUILD FAILURE ------------------------------------------------------------------------
            [INFO] Total time: 16.551s
            [INFO] Finished at: Tue Jan 07 07:55:26 MST 2014
            [INFO] Final Memory: 50M/495M
            [INFO] ------------------------------------------------------------------------
            [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-t
            est) on project module1: ExecutionException; nested exception is java.util.concurrent.ExecutionExcep
            tion: java.lang.RuntimeException: The forked VM terminated without saying properly goodbye. VM crash
             or System.exit called ? -> [Help 1]
            [ERROR]
            [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
            [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 arti
            cles:
            [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
            

             

            I can't get a Jive7 plugin to build?  Whats missing?

              • Re: Unable to create Jive 7 Plugin.
                jgotti

                it looks like aspectjweaver 1.7.2 is missing from the maven repo.  I was able to download it and install it into the \.m2\repository\org\aspectj\aspectjweaver\1.7.2 directory and successfully compile.

                 

                I should have done more research before having a public conversation with myself. 

                Hopefully, the jive Devs can get aspectjweaver added to maven!

                 

                -Jason

                1 person found this helpful
                  • Re: Unable to create Jive 7 Plugin.
                    mueller-ziebur

                    Thanks Jason Gotti,

                     

                    please keep having your public / private conversations That solved my problem as well!!

                    it looks like aspectjweaver 1.7.2 is missing from the maven repo.  I was able to download it and install it into the \.m2\repository\org\aspectj\aspectjweaver\1.7.2 directory and successfully compile.

                    Cheers Stephan

                    1 person found this helpful
                      • Re: Unable to create Jive 7 Plugin.
                        ntalreja32

                        That's correct ,the build on Jive 7 Plug-in (mvn clean package) gave an issue about missing aspectjweaver 1.7.2 from the maven repository. The easy fix was to add the dependency in the widget’s  pom.xml. which downloaded the required version -

                           <dependency>

                               <groupId>org.aspectj</groupId>

                               <artifactId>aspectjweaver</artifactId>

                               <version>1.7.2</version>

                            </dependency>

                         

                        Thanks

                        Neeraj

                          • Re: Unable to create Jive 7 Plugin.
                            whoiskevin

                            Just an additional tip.  I noticed the web plugin defines the version as a property so I moved this property to the main pom:

                            <aspectj.version>1.7.2</aspectj.version>

                             

                            Then if you use the parent pom in your plugin you can add the version using the property from the parent.  Helps keep everything on the same version.

                             

                            <dependencies>
                            <dependency>
                            <groupId>org.aspectj</groupId>
                            <artifactId>aspectjtools</artifactId>
                            <version>${aspectj.version}</version>
                            </dependency>
                            <dependency>
                            <groupId>org.aspectj</groupId>
                            <artifactId>aspectjweaver</artifactId>
                            <version>${aspectj.version}</version>
                            </dependency>
                            </dependencies>