Skip to content

Instantly share code, notes, and snippets.

@markdaugherty
Last active December 11, 2015 17:58
Show Gist options
  • Save markdaugherty/4637863 to your computer and use it in GitHub Desktop.
Save markdaugherty/4637863 to your computer and use it in GitHub Desktop.
Maven POM configuration for OSGi Bundle Status plugin.
<?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">
<parent>
<groupId>com.citytechinc.cqlibrary</groupId>
<artifactId>cq5-library</artifactId>
<version>4.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>cq5-library-ui</artifactId>
<packaging>jar</packaging>
<name>CITYTECH, Inc. CQ5 Library - UI</name>
<properties>
<maven.test.skip>true</maven.test.skip>
<assembly.descriptor>src/main/assembly/zip.xml</assembly.descriptor>
<cq.host>localhost</cq.host>
<cq.port>4502</cq.port>
<cq.username>admin</cq.username>
<cq.password>admin</cq.password>
</properties>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>utf-8</encoding>
</configuration>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<configuration>
<skipIfEmpty>true</skipIfEmpty>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2.1</version>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>${assembly.descriptor}</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>curl</executable>
<arguments>
<argument>-f</argument>
<argument>-v</argument>
<argument>-u</argument>
<argument>${cq.username}:${cq.password}</argument>
<argument>-F</argument>
<argument>file=@./target/${project.artifactId}-${project.parent.version}.zip</argument>
<argument>http://${cq.host}:${cq.port}/crx/packmgr/service.jsp?name=${project.artifactId}-${project.parent.version}</argument>
<argument>-F</argument>
<argument>install=true</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.citytechinc.maven.plugins</groupId>
<artifactId>osgi-bundle-status-maven-plugin</artifactId>
<version>0.4.0</version>
<executions>
<execution>
<goals>
<goal>status</goal>
</goals>
<configuration>
<bundleNames>
<bundleName>com.citytechinc.cqlibrary.cq5-library-core</bundleName>
<bundleName>groovy-all</bundleName>
<bundleName>com.google.guava</bundleName>
</bundleNames>
<host>${cq.host}</host>
<port>${cq.port}</port>
<username>${cq.username}</username>
<password>${cq.password}</password>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>cq5-library-core</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>2.1.0</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>13.0.1</version>
<scope>runtime</scope>
</dependency>
</dependencies>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment