Skip to content

Commit

Permalink
Creates a maven project that wraps a jar as a simple OSGI bundle.
Browse files Browse the repository at this point in the history
  • Loading branch information
Erik Froese committed Mar 18, 2011
0 parents commit c9f0cd1
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pom.xml
@@ -0,0 +1,10 @@
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.hallwaytech.osgi</groupId>
<artifactId>wrap-jar</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
</project>

9 changes: 9 additions & 0 deletions src/main/resources/META-INF/maven/archetype.xml
@@ -0,0 +1,9 @@
<archetype xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype/1.0.0 http://maven.apache.org/xsd/archetype-1.0.0.xsd">
<id>wrap-jar</id>
<sources>
</sources>
<testSources>
</testSources>
</archetype>

65 changes: 65 additions & 0 deletions src/main/resources/archetype-resources/pom.xml
@@ -0,0 +1,65 @@
<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>
<groupId>org.apache.felix.commons</groupId>
<artifactId>${artifactId}</artifactId>
<name>${artifactId} bundle</name>
<description>
This bundle simply wraps ${pom.artifactId}-${pom.version}.jar.
</description>
<version>${version}</version>
<packaging>bundle</packaging>

<organization>
<name>Apache Felix Project</name>
<url>http://felix.apache.org/</url>
</organization>

<dependencies>
<dependency>
<groupId>${groupId}</groupId>
<artifactId>${artifactId}</artifactId>
<version>${version}</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-SymbolicName>${artifactId}</Bundle-SymbolicName>
<Export-Package>*</Export-Package>
</instructions>
</configuration>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>deploy</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.sling</groupId>
<artifactId>maven-sling-plugin</artifactId>
<executions>
<execution>
<id>install-bundle</id>
<goals><goal>install</goal></goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>

0 comments on commit c9f0cd1

Please sign in to comment.