9 Replies Latest reply on May 5, 2013 11:11 AM by mike_ottinger

    Developing with Maven : [ERROR]     Unresolveable build extension: Plugin com.day.jcr.vault

    Max_Salah Level 1

      I am trying to deploy AEM with maven, so I followed this tutorial.

      When I run the command mvn clear package, I get the following error:

       

       

       

      C:\workspace\myproject\app>mvn clean package
      [INFO] Scanning for projects...
      [WARNING] The POM for com.day.jcr.vault:maven-vault-plugin:jar:0.0.10 is missing
      , no dependency information available
      [ERROR] The build could not read 1 project -> [Help 1]
      [ERROR]
      [ERROR]   The project com.uum:app:1-SNAPSHOT (C:\workspace\myproject\app\pom.xml
      ) has 3 errors
      [ERROR]     Unresolveable build extension: Plugin com.day.jcr.vault:maven-vault-
      plugin:0.0.10 or one of its dependencies could not be resolved: Failure to find
      com.day.jcr.vault:maven-vault-plugin:jar:0.0.10 in http://repo.maven.apache.org/
      maven2 was cached in the local repository, resolution will not be reattempted un
      til the update interval of central has elapsed or updates are forced -> [Help 2]

      [ERROR]     Unknown packaging: content-package @ line 12, column 16
      [ERROR]     'dependencies.dependency.groupId' for :core:jar is missing. @ line 1
      8, column 22
      [ERROR]
      [ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
      ch.
      [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/ProjectBuildin
      gException
      [ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/PluginResoluti
      onException

      my myproject/app/pom.xml looks like this:

       

      <?xml version="1.0" encoding="UTF-8"?>
      <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
          <modelVersion>4.0.0</modelVersion>
          <parent>
              <groupId>com.uum</groupId>
              <artifactId>parent</artifactId>
              <relativePath>../parent/pom.xml</relativePath>
              <version>1-SNAPSHOT</version>
          </parent>

          <artifactId>app</artifactId>
          <packaging>content-package</packaging>

          <name>Sample Application package</name>

          <dependencies>
              <dependency>
                  <groupId><!-- {groupId} --></groupId>
                  <artifactId>core</artifactId>
                  <version>${project.version}</version>                      
              </dependency>

              <!-- add additional dependencies -->
          </dependencies>

          <build>
              <resources>
                  <resource>
                      <directory>${basedir}/META-INF</directory>
                      <targetPath>../vault-work/META-INF</targetPath>
                  </resource>
                  <resource>
                      <directory>${basedir}/jcr_root</directory>
                      <excludes>
                          <exclude>**/.vlt</exclude>
                          <exclude>**/.vltignore</exclude>
                          <exclude>**/*.iml</exclude>
                          <exclude>**/.classpath</exclude>
                          <exclude>**/.project</exclude>
                          <exclude>**/.DS_Store</exclude>
                          <exclude>**/target/**</exclude>
                          <exclude>libs/**</exclude>
                      </excludes>
                  </resource>
              </resources>

              <plugins>

                  <plugin>
                      <groupId>com.day.jcr.vault</groupId>
                      <artifactId>maven-vault-plugin</artifactId>
                      <extensions>true</extensions>
                      <configuration>
                          <group>Sample</group>
                          <requiresRoot>true</requiresRoot>

                          <install>true</install>
                          <verbose>true</verbose>

                          <packageFile>${project.build.directory}/${project.artifactId}-${project.version}.zip</packageFile>

                          <version>${project.version}</version>
                          <properties>
                              <acHandling>overwrite</acHandling>
                          </properties>

                          <embeddeds>
                              <embedded>
                                  <groupId><!-- {groupId} --></groupId>
                                  <artifactId>core</artifactId>
                                  <target><!-- {install path in the repository (e.g. /apps/myproject/install)} --></target>
                              </embedded>
                          </embeddeds>
                      </configuration>
                  </plugin>

              </plugins>
          </build>

          <profiles>
              <profile>
                  <id>installPackages</id>
                  <activation>
                  </activation>
                  <build>
                      <plugins>
                          <plugin>
                              <groupId>com.day.jcr.vault</groupId>
                              <artifactId>maven-vault-plugin</artifactId>
                              <executions>
                                  <execution>
                                      <id>install-package</id>
                                      <goals>
                                          <goal>install</goal>
                                      </goals>
                                  </execution>
                              </executions>
                          </plugin>
                      </plugins>
                  </build>
              </profile>
          </profiles>

      </project>

      Any idea how to get this work?

       

      Thanks in advance

        • 1. Re: Developing with Maven : [ERROR]     Unresolveable build extension: Plugin com.day.jcr.vault
          pchamoun

          Here is a sample profile from a project I have. I know it works. I can see the jar under (..\.m2\repository\com\day\jcr\vault\maven-vault-plugin\0.0.6) Give that a try:

           

           

          <profile>

                                        <id>full</id>

                                        <activation>

                                                  <activeByDefault>false</activeByDefault>

                                        </activation>

                                        <build>

                                                  <resources>

                                                            <resource>

                                                                      <directory>${basedir}/src/main/content/jcr_root</directory>

                                                                      <excludes>

                                                                                <exclude>**/*.vlt/**</exclude>

                                                                                <exclude>**/*.vlt</exclude>

                                                                                <exclude>**/*.DS_Store</exclude>

                                                                      </excludes>

                                                                      <targetPath>.</targetPath>

                                                            </resource>

                                                            <resource>

                                                                      <directory>${basedir}/src/main/content/META-INF</directory>

                                                                      <excludes>

                                                                                <exclude>**/*.vlt/**</exclude>

                                                                                <exclude>**/*.vlt</exclude>

                                                                                <exclude>**/*.DS_Store</exclude>

                                                                      </excludes>

                                                                      <targetPath>../vault-work/META-INF</targetPath>

                                                            </resource>

                                                  </resources>

                                                  <plugins>

                                                            <!-- use the vault plugin to create & install the package -->

                                                            <plugin>

                                                                      <groupId>com.day.jcr.vault</groupId>

                                                                      <artifactId>maven-vault-plugin</artifactId>

                                                                      <version>0.0.6</version>

                                                                      <extensions>true</extensions>

                                                                      <executions>

                                                                                <execution>

                                                                                          <id>create-package</id>

                                                                                          <goals>

                                                                                                    <goal>package</goal>

                                                                                                    <goal>install</goal>

                                                                                          </goals>

                                                                                </execution>

                                                                      </executions>

                                                                      <configuration>

                                                                                <verbose>true</verbose>

                                                                                <embeddeds>

                                                                                          <embedded>

                                                                                                    <groupId>${project.groupId}</groupId>

                                                                                                    <artifactId>company-core</artifactId>

                                                                                                    <target>/apps/company/install</target>

                                                                                          </embedded>

                                                                                </embeddeds>

                                                                      </configuration>

                                                            </plugin>

                                                  </plugins>

                                        </build>

                              </profile>

          • 2. Re: Developing with Maven : [ERROR]     Unresolveable build extension: Plugin com.day.jcr.vault
            rush_pawan Level 4

            Hello,

             

            Did you install vault in your day cq? which will help to map repositoy system to local file system.

            http://dev.day.com/docs/en/cq/current/developing/developmenttools/developing_with_eclipse. html#Installing FileVault (VLT)

             

            if yes, then can you try to modify your pom.xml to use correct vault plugin

             

            instead of this in pom.xml

            <groupId>com.day.jcr.vault</groupId>

                                <artifactId>maven-vault-plugin</artifactId>

                                <version>0.0.10</version>

             

            Use below (latest)

             

            <groupId>com.day.jcr.vault</groupId>

                                      <artifactId>content-package-maven-plugin</artifactId>

                                      <version>0.0.14</version>

             

            and replace it every where in pom.xml

             

            I hope above helps you to resolve the issue

             

            Thanks,

            Pawan

            1 person found this helpful
            • 3. Re: Developing with Maven : [ERROR]     Unresolveable build extension: Plugin com.day.jcr.vault
              pchamoun Level 1

              Yes I installed the vault as mentioned in the article.

              • 4. Re: Developing with Maven : [ERROR]     Unresolveable build extension: Plugin com.day.jcr.vault
                Jörg Hoh Adobe Employee

                What are you configured plugin repositories? Have you added the adobe repository like this?

                 

                <pluginRepositories>

                                <pluginRepository>

                                        <id>adobe-public-releases</id>

                                        <name>Adobe Basel Public Repository</name>

                                        <url>http://repo.adobe.com/nexus/content/groups/public</url>

                                        <releases>

                                                <enabled>true</enabled>

                                                <updatePolicy>never</updatePolicy>

                                        </releases>

                                        <snapshots>

                                                <enabled>false</enabled>

                                        </snapshots>

                                </pluginRepository>

                        </pluginRepositories>

                • 5. Re: Developing with Maven : [ERROR]     Unresolveable build extension: Plugin com.day.jcr.vault
                  Max_Salah Level 1

                  Thank you for your replay!

                   

                  I have installed vault in my day cq and modified as u described. I get the follwoing Errors:

                  C:\workspace\myproject\app>mvn clean package

                  [INFO] Scanning for projects...

                  [WARNING] The POM for com.day.jcr.vault:content-package-maven-plugin:jar:0.0.10

                  is missing, no dependency information available

                  [ERROR] The build could not read 1 project -> [Help 1]

                  [ERROR]

                  [ERROR]   The project com.uum:app:1-SNAPSHOT (C:\workspace\myproject\app\pom.xml

                  ) has 2 errors

                  [ERROR]     Unresolveable build extension: Plugin com.day.jcr.vault:content-pack

                  age-maven-plugin:0.0.14 or one of its dependencies could not be resolved: Failur

                  e to find com.day.jcr.vault:content-package-maven-plugin:jar:0.0.14 in http://re

                  po.maven.apache.org/maven2 was cached in the local repository, resolution will n

                  ot be reattempted until the update interval of central has elapsed or updates ar

                  e forced -> [Help 2]

                  [ERROR]     Unknown packaging: content-package @ line 12, column 16

                  [ERROR]

                  [ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit

                  ch.

                  [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/ProjectBuildin

                  gException

                  [ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/PluginResoluti

                  onException

                   

                  Message was edited by: Max_Salah: ERROR message updated

                  • 6. Re: Developing with Maven : [ERROR]     Unresolveable build extension: Plugin com.day.jcr.vault
                    Max_Salah Level 1

                    Thank you for your replay!

                     

                    I tried this solution but without success.

                     

                    I have uploaded the project hier, I hope somebody can try it and tell me what did wrong.

                    • 7. Re: Developing with Maven : [ERROR]     Unresolveable build extension: Plugin com.day.jcr.vault
                      mike_ottinger

                      Have you placed the following in your settings.xml?

                       

                      <profile>

                        <id>adobe-public</id>

                        <activation>

                          <activeByDefault>true</activeByDefault>

                        </activation>

                        <repositories>

                          <repository>

                            <id>adobe</id>

                            <name>Nexus Proxy Repository</name>

                            <url>http://repo.adobe.com/nexus/content/groups/public/</url>

                            <layout>default</layout>

                          </repository>

                        </repositories>

                        <pluginRepositories>

                          <pluginRepository>

                            <id>adobe</id>

                            <name>Nexus Proxy Repository</name>

                            <url>http://repo.adobe.com/nexus/content/groups/public/</url>

                            <layout>default</layout>

                          </pluginRepository>

                        </pluginRepositories>

                      </profile>

                      • 8. Re: Developing with Maven : [ERROR]     Unresolveable build extension: Plugin com.day.jcr.vault
                        Max_Salah Level 1

                        Thank you for the helpful answer!

                         

                        I tried your profile and i get the following on the console:

                         

                         

                        C:\workspace\myproject\app>mvn clean package
                        [INFO] Scanning for projects...
                        [INFO]
                        [INFO] ------------------------------------------------------------------------
                        [INFO] Building Sample Application package 1-SNAPSHOT
                        [INFO] ------------------------------------------------------------------------
                        [WARNING] The POM for com.uum:core:jar:1-SNAPSHOT is missing, no dependency info
                        rmation available
                        [INFO] ------------------------------------------------------------------------
                        [INFO] BUILD FAILURE
                        [INFO] ------------------------------------------------------------------------
                        [INFO] Total time: 0.909s
                        [INFO] Finished at: Sun May 05 12:53:55 CEST 2013
                        [INFO] Final Memory: 6M/149M
                        [INFO] ------------------------------------------------------------------------
                        [ERROR] Failed to execute goal on project app: Could not resolve dependencies fo
                        r project com.uum:app:content-package:1-SNAPSHOT: Failure to find com.uum:core:j
                        ar:1-SNAPSHOT in http://repo.adobe.com/nexus/content/groups/public/ was cached i
                        n the local repository, resolution will not be reattempted until the update inte
                        rval of adobe has elapsed or updates are forced -> [Help 1]
                        [ERROR]
                        [ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
                        ch.
                        [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/DependencyReso
                        lutionException
                        

                         

                        When I have removed the dependency

                         

                         

                        <dependencies>
                                <dependency>
                                    <groupId>com.uum</groupId>
                                    <artifactId>core</artifactId>
                                    <version>1-SNAPSHOT</version>  
                        
                                </dependency>
                        

                         

                        from myproject/app/pom.xml the built works fine. My question is, why it couldn't find the core?

                         

                        my myproject/core/pom.xml looks like this:

                         

                         

                        <?xml version="1.0" encoding="UTF-8"?>
                        <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
                            <modelVersion>4.0.0</modelVersion>
                        
                            <parent>
                                <groupId>com.uum</groupId>
                                <artifactId>parent</artifactId>
                                <relativePath>../parent/pom.xml</relativePath>
                                <version>1-SNAPSHOT</version>
                            </parent>
                        
                            <artifactId>core</artifactId>
                            <packaging>bundle</packaging>
                        
                            <name>Sample Core Bundle</name>
                        
                            <dependencies>
                                <dependency>
                                    <groupId>com.day.cq.wcm</groupId>
                                    <artifactId>cq-wcm-api</artifactId>
                                </dependency>
                        
                                <!-- add additional dependencies here -->
                            </dependencies>
                        
                            <build>
                                <plugins>
                                    <plugin>
                                        <groupId>org.apache.felix</groupId>
                                        <artifactId>maven-scr-plugin</artifactId>
                                    </plugin>
                        
                                    <plugin>
                                        <groupId>org.apache.felix</groupId>
                                        <artifactId>maven-bundle-plugin</artifactId>
                                        <extensions>true</extensions>
                                        <configuration>
                                            <instructions>
                                                <Bundle-Category>hoc</Bundle-Category>
                                                <Include-Resource>{maven-resources}</Include-Resource>
                                                <Export-Package>com.uum.myproject</Export-Package>
                                            </instructions>
                                        </configuration>
                                    </plugin>
                                </plugins>
                            </build>
                        
                            <profiles>
                                <!-- define deployment steps when installPackages profile is selected -->
                        
                                <profile>
                                    <id>installPackages</id>
                                    <activation>
                                    </activation>
                                    <build>
                                        <plugins>
                                            <plugin>
                                                <groupId>org.apache.sling</groupId>
                                                <artifactId>maven-sling-plugin</artifactId>
                                                <executions>
                                                    <execution>
                                                        <id>generate-adapter-metadata</id>
                                                        <phase>process-classes</phase>
                                                        <goals>
                                                            <goal>generate-adapter-metadata</goal>
                                                        </goals>
                                                    </execution>
                                                    <execution>
                                                        <id>install-bundle</id>
                                                        <goals>
                                                            <goal>install</goal>
                                                        </goals>
                                                    </execution>
                                                </executions>
                                            </plugin>
                                        </plugins>
                                    </build>
                                </profile>
                            </profiles>
                        
                        </project>
                        

                         

                        I did like the explanation in the tutorial but doesn't work

                        • 9. Re: Developing with Maven : [ERROR]     Unresolveable build extension: Plugin com.day.jcr.vault
                          mike_ottinger Level 1

                          Looking closer at your pom files, I see you're declaring parent poms which will allow for dependency inheritence, etc. But I don't see that you've defined the child poms as modules to the parent, which gives you project aggregation in maven.

                           

                          If you place in your parent/pom.xml something like this:

                           

                          <modules>

                                                <module>../core</module>

                                                <module>../app</module>

                          </modules>

                           

                          I think you'll get closer. But you've also got an empty core project which I think maven is going to complain about. Also, in my opinion the root at myproject/pom.xml and parent/pom.xml are a little redundant. Consider making the myproject/pom.xml the "true" parent project by copy/pasting the contents of parent/pom.xml into /myproject/pom.xml, remove parent/pom.xml altogether, and then the above module lines would be:

                           

                          <modules>

                             <module>core</module>

                             <module>app</module>

                          </modules>

                           

                          Hope this helps