Skip to content

Instantly share code, notes, and snippets.

@justinedelson
Created April 12, 2010 14:55
Show Gist options
  • Save justinedelson/363643 to your computer and use it in GitHub Desktop.
Save justinedelson/363643 to your computer and use it in GitHub Desktop.
This is a Maven pom using the Sling Launchpad plugin. It creates a WAR file which includes Sling and the Felix Shell bundle.
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<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>sample</groupId>
<artifactId>sample-war</artifactId>
<packaging>war</packaging>
<version>1-SNAPSHOT</version>
<name>Sample Launchpad War</name>
<description>
A Sample Launchpad War...
</description>
<build>
<plugins>
<plugin>
<groupId>org.apache.sling</groupId>
<artifactId>maven-launchpad-plugin</artifactId>
<version>2.0.5-SNAPSHOT</version>
<executions>
<execution>
<id>prepare-package</id>
<goals>
<goal>prepare-package</goal>
</goals>
</execution>
</executions>
<configuration>
<defaultBundleList>
<!-- only need this until the next release -->
<version>6-SNAPSHOT</version>
</defaultBundleList>
<additionalBundles>
<bundle>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.shell</artifactId>
<version>1.4.2</version>
</bundle>
</additionalBundles>
</configuration>
</plugin>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.23</version>
<configuration>
<contextPath>/</contextPath>
<webAppSourceDirectory>
target/${artifactId}-${pom.version}
</webAppSourceDirectory>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<webResources>
<resource>
<directory>
${project.build.directory}/launchpad-bundles
</directory>
<targetPath>WEB-INF</targetPath>
</resource>
</webResources>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.launchpad.base</artifactId>
<version>2.1.1-SNAPSHOT</version>
<classifier>webapp</classifier>
<type>war</type>
<scope>runtime</scope>
</dependency>
</dependencies>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment