| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
| 2 |
<!-- |
| 3 |
|
| 4 |
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. |
| 5 |
|
| 6 |
Copyright (c) 2010-2016 Oracle and/or its affiliates. All rights reserved. |
| 7 |
|
| 8 |
The contents of this file are subject to the terms of either the GNU |
| 9 |
General Public License Version 2 only ("GPL") or the Common Development |
| 10 |
and Distribution License("CDDL") (collectively, the "License"). You |
| 11 |
may not use this file except in compliance with the License. You can |
| 12 |
obtain a copy of the License at |
| 13 |
http://glassfish.java.net/public/CDDL+GPL_1_1.html |
| 14 |
or packager/legal/LICENSE.txt. See the License for the specific |
| 15 |
language governing permissions and limitations under the License. |
| 16 |
|
| 17 |
When distributing the software, include this License Header Notice in each |
| 18 |
file and include the License file at packager/legal/LICENSE.txt. |
| 19 |
|
| 20 |
GPL Classpath Exception: |
| 21 |
Oracle designates this particular file as subject to the "Classpath" |
| 22 |
exception as provided by Oracle in the GPL Version 2 section of the License |
| 23 |
file that accompanied this code. |
| 24 |
|
| 25 |
Modifications: |
| 26 |
If applicable, add the following below the License Header, with the fields |
| 27 |
enclosed by brackets [] replaced by your own identifying information: |
| 28 |
"Portions Copyright [year] [name of copyright owner]" |
| 29 |
|
| 30 |
Contributor(s): |
| 31 |
If you wish your version of this file to be governed by only the CDDL or |
| 32 |
only the GPL Version 2, indicate your decision by adding "[Contributor] |
| 33 |
elects to include this software in this distribution under the [CDDL or GPL |
| 34 |
Version 2] license." If you don't indicate a single choice of license, a |
| 35 |
recipient has the option to distribute your version of this file under |
| 36 |
either the CDDL, the GPL Version 2 or to extend the choice of license to |
| 37 |
its licensees as provided above. However, if you add GPL Version 2 code |
| 38 |
and therefore, elected the GPL Version 2 license, then the option applies |
| 39 |
only if the new code is made subject to such option by the copyright |
| 40 |
holder. |
| 41 |
|
| 42 |
--> |
| 43 |
<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"> |
| 44 |
<modelVersion>4.0.0</modelVersion> |
| 45 |
<parent> |
| 46 |
<groupId>net.java</groupId> |
| 47 |
<artifactId>jvnet-parent</artifactId> |
| 48 |
<version>1</version> |
| 49 |
</parent> |
| 50 |
<groupId>com.sun.jersey.samples.helloworld-osgi-webapp</groupId> |
| 51 |
<artifactId>war-bundle</artifactId> |
| 52 |
<version>1.20-SNAPSHOT</version> |
| 53 |
|
| 54 |
<name>Helloworld OSGi WebApp - Jersey Sample WAR</name> |
| 55 |
|
| 56 |
<packaging>war</packaging> |
| 57 |
|
| 58 |
<profiles> |
| 59 |
<!-- To use this profile, must first build Jersey source with "mvn clean install -Dcobertura" --> |
| 60 |
<profile> |
| 61 |
<id>cobertura</id> |
| 62 |
<activation> |
| 63 |
<property> |
| 64 |
<name>cobertura</name> |
| 65 |
</property> |
| 66 |
</activation> |
| 67 |
<dependencies> |
| 68 |
<dependency> |
| 69 |
<groupId>com.sun.jersey</groupId> |
| 70 |
<artifactId>jersey-servlet</artifactId> |
| 71 |
<version>${project.version}</version> |
| 72 |
<scope>provided</scope> |
| 73 |
<classifier>cobertura</classifier> |
| 74 |
</dependency> |
| 75 |
</dependencies> |
| 76 |
<build> |
| 77 |
<plugins> |
| 78 |
<plugin> |
| 79 |
<groupId>org.codehaus.mojo</groupId> |
| 80 |
<artifactId>cobertura-maven-plugin</artifactId> |
| 81 |
</plugin> |
| 82 |
</plugins> |
| 83 |
</build> |
| 84 |
</profile> |
| 85 |
<profile> |
| 86 |
<id>default</id> |
| 87 |
<activation> |
| 88 |
<activeByDefault>true</activeByDefault> |
| 89 |
</activation> |
| 90 |
<dependencies> |
| 91 |
<dependency> |
| 92 |
<groupId>com.sun.jersey</groupId> |
| 93 |
<artifactId>jersey-servlet</artifactId> |
| 94 |
<version>${project.version}</version> |
| 95 |
<scope>provided</scope> |
| 96 |
</dependency> |
| 97 |
</dependencies> |
| 98 |
</profile> |
| 99 |
<profile> |
| 100 |
<id>release</id> |
| 101 |
<build> |
| 102 |
<plugins> |
| 103 |
<plugin> |
| 104 |
<groupId>org.apache.maven.plugins</groupId> |
| 105 |
<artifactId>maven-gpg-plugin</artifactId> |
| 106 |
<version>1.1</version> |
| 107 |
<executions> |
| 108 |
<execution> |
| 109 |
<id>sign-artifact</id> |
| 110 |
<phase>verify</phase> |
| 111 |
<goals> |
| 112 |
<goal>sign</goal> |
| 113 |
</goals> |
| 114 |
</execution> |
| 115 |
</executions> |
| 116 |
</plugin> |
| 117 |
</plugins> |
| 118 |
</build> |
| 119 |
</profile> |
| 120 |
</profiles> |
| 121 |
|
| 122 |
<dependencies> |
| 123 |
<dependency> |
| 124 |
<groupId>javax.servlet</groupId> |
| 125 |
<artifactId>servlet-api</artifactId> |
| 126 |
<version>2.5</version> |
| 127 |
<scope>provided</scope> |
| 128 |
</dependency> |
| 129 |
<dependency> |
| 130 |
<groupId>org.osgi</groupId> |
| 131 |
<artifactId>org.osgi.core</artifactId> |
| 132 |
<version>4.2.0</version> |
| 133 |
<scope>provided</scope> |
| 134 |
</dependency> |
| 135 |
<dependency> |
| 136 |
<groupId>org.osgi</groupId> |
| 137 |
<artifactId>org.osgi.compendium</artifactId> |
| 138 |
<version>4.2.0</version> |
| 139 |
<scope>provided</scope> |
| 140 |
</dependency> |
| 141 |
</dependencies> |
| 142 |
|
| 143 |
<build> |
| 144 |
<plugins> |
| 145 |
<plugin> |
| 146 |
<artifactId>maven-compiler-plugin</artifactId> |
| 147 |
<inherited>true</inherited> |
| 148 |
<configuration> |
| 149 |
<source>1.6</source> |
| 150 |
<target>1.6</target> |
| 151 |
</configuration> |
| 152 |
</plugin> |
| 153 |
|
| 154 |
|
| 155 |
<!-- to generate the MANIFEST-FILE required by the bundle --> |
| 156 |
<plugin> |
| 157 |
<groupId>org.apache.felix</groupId> |
| 158 |
<artifactId>maven-bundle-plugin</artifactId> |
| 159 |
<extensions>true</extensions> |
| 160 |
<executions> |
| 161 |
<execution> |
| 162 |
<id>bundle-manifest</id> |
| 163 |
<phase>process-classes</phase> |
| 164 |
<goals> |
| 165 |
<goal>manifest</goal> |
| 166 |
</goals> |
| 167 |
</execution> |
| 168 |
</executions> |
| 169 |
<configuration> |
| 170 |
<manifestLocation>${project.build.directory}/META-INF</manifestLocation> |
| 171 |
<supportedProjectTypes> |
| 172 |
<supportedProjectType>bundle</supportedProjectType> |
| 173 |
<supportedProjectType>war</supportedProjectType> |
| 174 |
</supportedProjectTypes> |
| 175 |
<instructions> |
| 176 |
<Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName> |
| 177 |
<Bundle-ClassPath>.,WEB-INF/classes</Bundle-ClassPath> |
| 178 |
<Import-Package>com.sun.jersey.api.core,com.sun.jersey.spi.container.servlet,*</Import-Package> |
| 179 |
<Export-Package>com.sun.jersey.samples.helloworld</Export-Package> |
| 180 |
<Embed-Directory>WEB-INF/lib</Embed-Directory> |
| 181 |
<Embed-Dependency>*;scope=compile|runtime</Embed-Dependency> |
| 182 |
<Embed-Transitive>true</Embed-Transitive> |
| 183 |
<Webapp-Context>helloworld</Webapp-Context> |
| 184 |
<Web-ContextPath>helloworld</Web-ContextPath> |
| 185 |
<Bundle-Activator>com.sun.jersey.samples.helloworld.WebAppContextListener</Bundle-Activator> |
| 186 |
</instructions> |
| 187 |
</configuration> |
| 188 |
</plugin> |
| 189 |
|
| 190 |
<plugin> |
| 191 |
<groupId>org.apache.maven.plugins</groupId> |
| 192 |
<artifactId>maven-war-plugin</artifactId> |
| 193 |
<configuration> |
| 194 |
<attachClasses>true</attachClasses> |
| 195 |
<archive> |
| 196 |
<manifestFile>${project.build.directory}/META-INF/MANIFEST.MF</manifestFile> |
| 197 |
<manifestEntries> |
| 198 |
<Bundle-ClassPath>WEB-INF/classes</Bundle-ClassPath> |
| 199 |
</manifestEntries> |
| 200 |
</archive> |
| 201 |
</configuration> |
| 202 |
</plugin> |
| 203 |
</plugins> |
| 204 |
</build> |
| 205 |
|
| 206 |
</project> |