7 Replies Latest reply on Mar 5, 2012 9:44 AM by mazz

    Can't build skeleton-plugin

    michaelbini

      Hi,

      The project downloaded from git using eclipse.

      Maven version : Apache Maven 3.0.3 (r1075438; 2011-02-28 19:31:09+0200)

      no modification was done to the maven "settings.xml"

      command mvn install came out with this error :

       

      [INFO] Scanning for projects...

      [WARNING]

      [WARNING] Some problems were encountered while building the effective model for org.rhq.sample.skeletonplugin:skeleton-plugin:jar:1.0-SNAPSHOT

      [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 112, 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 projects.

      [WARNING]

      [INFO]

      [INFO] ------------------------------------------------------------------------

      [INFO] Building Skeleton RHQ Plugin Template 1.0-SNAPSHOT

      [INFO] ------------------------------------------------------------------------

      [WARNING] The POM for org.rhq:rhq-core-domain:jar:4.3.0-SNAPSHOT is missing, no dependency information available

      [WARNING] The POM for org.rhq:rhq-core-plugin-api:jar:4.3.0-SNAPSHOT is missing, no dependency information available

      [WARNING] The POM for org.rhq:rhq-core-native-system:jar:4.3.0-SNAPSHOT is missing, no dependency information available

      [WARNING] The POM for hibernate-annotations:hibernate-annotations:jar:3.2.1.GA is missing, no dependency information available

      [INFO] ------------------------------------------------------------------------

      [INFO] BUILD FAILURE

      [INFO] ------------------------------------------------------------------------

      [INFO] Total time: 0.461s

      [INFO] Finished at: Sun Mar 04 19:19:21 IST 2012

      [INFO] Final Memory: 3M/90M

      [INFO] ------------------------------------------------------------------------

      [ERROR] Failed to execute goal on project skeleton-plugin: Could not resolve dependencies for project org.rhq.sample.skeletonplugin:skeleton-plugin:jar:1.0-SNAPSHOT: The following artifacts could not be resolved: org.rhq:rhq-core-domain:jar:4.3.0-SNAPSHOT, org.rhq:rhq-core-plugin-api:jar:4.3.0-SNAPSHOT, org.rhq:rhq-core-native-system:jar:4.3.0-SNAPSHOT, hibernate-annotations:hibernate-annotations:jar:3.2.1.GA: Could not find artifact org.rhq:rhq-core-domain:jar:4.3.0-SNAPSHOT -> [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 articles:

      [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

        • 1. Re: Can't build skeleton-plugin
          lkrejci

          Have you built the full RHQ prior to the skeleton plugin? As you can see, you are trying to build against version 4.3.0-SNAPSHOT and we don't publish snapshot builds to maven repositories. Therefore you need to build RHQ locally to have those artifacts available.

           

          You can get more info on how to build RHQ here: http://rhq-project.org/display/RHQ/Building+RHQ

          • 2. Re: Can't build skeleton-plugin
            lkrejci

            Btw, you will want to read http://rhq-project.org/display/RHQ/Advanced+Build+Notes#AdvancedBuildNotes-GWTCompilationForDifferentBrowsers if the machine you will be building RHQ on doesn't have loads of RAM.

            • 3. Re: Can't build skeleton-plugin
              michaelbini

              Thanks for your answer.

              But I see no reason why I need to build the entire RHQ for compiling a simple plugin.

              I choose the easy way ant scrip to build the jar.

              • 4. Re: Can't build skeleton-plugin
                lkrejci

                Well, the reason why you need to build the full RHQ for compiling a single plugin is because you chose to build against a version of RHQ that hasn't been released yet and therefore is not available in maven repos If you don't want to live on the cutting edge, you can checkout code of an already released RHQ version, e.g.

                 

                git clone git://git.fedorahosted.org/rhq/rhq.git;

                cd rhq;

                git checkout RHQ_4_2_0

                 

                If you then try to build the skeleton plugin, you should no longer need to build the full RHQ, because it will be built against RHQ 4.2.0 which is available in the public maven repos. Note that RHQ 4.3.0 will be announced and the artifacts available very shortly.

                • 5. Re: Can't build skeleton-plugin
                  michaelbini

                  Thanks,

                  I'll try it out.

                  • 6. Re: Can't build skeleton-plugin
                    mazz

                    you should not have to build the entire project to build the skeleton plugin. It always the intention to just run the build of the skeleton plugin module.  I'll fix it. we just have to change the skeleton pom. we always forget this when we release a new build... sorry about that.

                    • 7. Re: Can't build skeleton-plugin
                      mazz

                      michaelbini wrote:

                       

                      Thanks for your answer.

                      But I see no reason why I need to build the entire RHQ for compiling a simple plugin.

                      I choose the easy way ant scrip to build the jar.

                      michaelbini - to get this to work (you are right, there is no reason to build the entire RHQ project for compiling the skeleton plugin), do this. Go to the skeleton plugin's pom.xml (etc/samples/skeleton-plugin/pom.xml) and make sure this is the rhq.version property:

                       

                         <properties>

                            <rhq.version>4.2.0</rhq.version>

                         </properties>

                       

                      Notice you change it to the last published RHQ GA version (4.2.0). Right now we have it as 4.3.0-SNAPSHOT, but you should be able to get this to build simply by building against the latest public release.

                      1 of 1 people found this helpful