Install the cq5-archiva-servlet-1.6.zip. (It may fail to load on CQ 5.2.1, but ignore the message then install.)
This method isn't officially supported.
Install the cq5-archiva-servlet-1.6.zip. (It may fail to load on CQ 5.2.1, but ignore the message then install.)
Configure your project pom.xml to use your local CQ5 instance as a maven repository
<repositories>
<repository>
<id>localinstance</id>
<name>CQ 5.x localinstance</name>
<url>http://localhost:4502/maven/repository</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>localinstance</id>
<name>CQ 5.x localinstance</name>
<url>http://localhost:4502/maven/repository</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
Additionally, you can use as parent dependency the following:
<parent>
<groupId>com.day</groupId>
<artifactId>cq5-parent</artifactId>
<version>5.6.0</version> (if for example your instance is a 5.6.0)
</parent>
The groupId/artifactId is configurable with Sling configuration, and the version is not important. (But make sense to use according to target, such as 5.2.1/5.3/5.4).
In your .m2/settings.xml, add the following lines to define the login/password:
<server>
<id>localinstance</id>
<username>admin</username>
<password>admin</password>
</server>
Additionally, you can add your jar/pom in the "/var/maven/repository" (using same structure as maven store it usually)
Notes:
Quick help for the maven-packutil-plugin (which is not currently an official plug-in, but useful)
<plugin>
<groupId>com.day.cq.tools</groupId>
<artifactId>maven-packutil-plugin</artifactId>
<version>0.0.1</version>
<configuration>
<targetURL>http://localhost:4502</targetURL>
<user>admin</user>
<password>admin</password>
<workspace>crx.default</workspace>
</configuration>
<executions>
<execution>
<id>install-package</id>
<goals>
<goal>install</goal>
</goals>
</execution>
</executions>
</plugin>
Lataa
Lataa
Kirjaudu sisään tiliisi