2013-05-03 5 views
5

Ich versuche, AEM mit Maven bereitzustellen, so dass ich this tutorial folgen. Wenn ich den Befehl mvn klar Paket ausführen, erhalte ich folgende Fehlermeldung:Bereitstellen von AEM mit Maven (Fehler)

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 

meine myproject/app/pom.xml wie folgt aussieht:

<?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> 

Jede Idee, wie die Bereitstellung zu erhalten mit Maven funktioniert?

Antwort

5

Es sieht aus, Maven weiß nicht, wo das Maven-Vault-Plugin zu finden ist. Sie müssen das Adobe-Repository zu Ihrem maven-POM hinzufügen, siehe http://repo.adobe.com/.

Das wird die Unresolveable build extension: Plugin com.day.jcr.vault:maven-vault- plugin:0.0.10 Fehler und die Unknown packaging: content-package @ line 12, column 16 Fehler verursachen.

Außerdem haben Sie noch einige variable Platzhalter (<groupId><!-- {groupId} --></groupId>) aus dem Tutorial in Ihrem Code, die ersetzt werden müssen. Siehe den Fehler:

[ERROR]  'dependencies.dependency.groupId' for :core:jar is missing. @ line 18, column 22 

Im <embeddeds> Abschnitt des Gewölbes Plugin-Konfiguration können Sie Maven Abhängigkeiten angeben, die Sie aufnehmen möchten. Ein Beispiel dafür ist in dieser Managing packages with Maven Seite zu sehen.

Wenn Sie jetzt keine externen Abhängigkeiten in Ihr Paket aufnehmen möchten, können Sie wahrscheinlich den Abschnitt <embeddeds> insgesamt entfernen.

+0

Vielen Dank für Ihre Antwort. Nach dem Hinzufügen des Adobe-Repositorys zur Datei setting.xml ist dieses Problem gelöst, aber ein anderes Problem wird auf der Konsole ausgegeben: [FEHLER] Ausführung des Ziels in der Projekt-App fehlgeschlagen: Abhängigkeiten konnten nicht aufgelöst werden r project com.uum: app: content -package: 1-SNAPSHOT: Fehler beim Auffinden von com.uum: core: j ar: 1-SNAPSHOT in http://repo.adobe.com/nexus/content/groups/public/ wurde im lokalen Repository zwischengespeichert , Auflösung wird nicht erneut versucht, bis die .. –

+0

mein Myproject/core/pom.xml kann hier gefunden werden: https://www.dropbox.com/s/fydv7zw83v8wl9s/pom.xml. Das Beispiel myproject finden Sie hier https://www.dropbox.com/s/fogbxcky6ndvs6l/myproject.zip. Hoffe, jemand kann helfen –

+0

Es könnte am besten sein, eine weitere Frage hinzuzufügen, wenn Sie ein anderes Problem haben – diffa

1

Vergewissern Sie sich, dass Sie CQ/AEM vor dem Erstellen des Projekts gestartet haben. Viele Fehler, die mit Vault und Maven vertraut sind, entstehen dadurch.

Verwandte Themen