pom.xml revision 63
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen Copyright 1997-2008 Sun Microsystems, Inc. All rights reserved.
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen The contents of this file are subject to the terms of either the GNU
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen General Public License Version 2 only ("GPL") or the Common Development
e015e2f7e7f48874495f9df8b0dd192b7ffcb5ccTimo Sirainen and Distribution License("CDDL") (collectively, the "License"). You
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen may not use this file except in compliance with the License. You can obtain
e015e2f7e7f48874495f9df8b0dd192b7ffcb5ccTimo Sirainen a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific
fcfb528483369975066c6adf1c55c16e6fb6e91fTimo Sirainen language governing permissions and limitations under the License.
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen When distributing the software, include this License Header Notice in each
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo Sirainen file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen Sun designates this particular file as subject to the "Classpath" exception
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo Sirainen as provided by Sun in the GPL Version 2 section of the License file that
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen accompanied this code. If applicable, add the following below the License
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo Sirainen Header, with the fields enclosed by brackets [] replaced by your own
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo Sirainen identifying information: "Portions Copyrighted [year]
fcfb528483369975066c6adf1c55c16e6fb6e91fTimo Sirainen [name of copyright owner]"
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo Sirainen Contributor(s):
fcfb528483369975066c6adf1c55c16e6fb6e91fTimo Sirainen If you wish your version of this file to be governed by only the CDDL or
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen only the GPL Version 2, indicate your decision by adding "[Contributor]
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo Sirainen elects to include this software in this distribution under the [CDDL or GPL
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen Version 2] license." If you don't indicate a single choice of license, a
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo Sirainen recipient has the option to distribute your version of this file under
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen either the CDDL, the GPL Version 2 or to extend the choice of license to
fcfb528483369975066c6adf1c55c16e6fb6e91fTimo Sirainen its licensees as provided above. However, if you add GPL Version 2 code
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen and therefore, elected the GPL Version 2 license, then the option applies
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo Sirainen only if the new code is made subject to such option by the copyright
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo Sirainen<project xmlns="http://maven.apache.org/POM/4.0.0"
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen <url>http://java.sun.com/projects/javamail</url>
6a19e109ee8c5a6f688da83a86a7f6abeb71abddTimo Sirainen <comments>A business-friendly OSS license</comments>
73b50eecfc31750a312e2f940023f522eb07178cTimo Sirainen <url>https://glassfish.dev.java.net/public/CDDL+GPL.html</url>
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo Sirainen <comments>GPL version 2 plus the Classpath Exception</comments>
6a19e109ee8c5a6f688da83a86a7f6abeb71abddTimo Sirainen <organization>
6a19e109ee8c5a6f688da83a86a7f6abeb71abddTimo Sirainen </organization>
aff3354de83df9d683587e27461697193ff36591Timo Sirainen <activation-api.version>1.1</activation-api.version>
dc0474dc9d5652d76cb41f439844dd80c8b96642Timo Sirainen <!-- defaults that are overridden in mail module -->
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen </properties>
785b1ca149341b70bf2cb8cc3049f1c4c1070b52Timo Sirainen <organization>Sun Microsystems, Inc.</organization>
785b1ca149341b70bf2cb8cc3049f1c4c1070b52Timo Sirainen </developers>
6a8a4c9f530668cd8961b73d702856ed94f05f80Timo Sirainen This profile contains modules that should only be built
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen but not installed or deployed.
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo Sirainen </activation>
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen Activating this profile manually for deployment causes
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen the above profile to be deactivated, which works around
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen an apparent bug in maven that prevents me from manually
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen deactivating a profile. This profile purposely has none
73a44af966c790560a72a0447f37bb35b1031a83Timo Sirainen of the modules I don't want to be deployed.
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen <distributionManagement>
02166e32bcda5d0018ae1a2a38614126ab5c6025Timo Sirainen <url>java-net:/maven2-repository/trunk/www/repository/</url>
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen </repository>
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen </distributionManagement>
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen This plugin is reponsible for packaging artifacts
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen as OSGi bundles. Please refer to
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen http://felix.apache.org/site/maven-bundle-plugin-bnd.html
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen for more information about how to use this plugin.
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen <configuration>
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen <instructions>
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen The following entry makes this jar an HK2 jar as
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen well. This is needed because GlassFish currently
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen picks up only OSGi bundles that have this entry.
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen Remove this when GlassFish does not have this
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen </instructions>
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen </configuration>
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen Since we don't change the packaging type to bundle, we
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen need to configure the plugin to execute the manifest goal
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen during the process-classes phase of the build life cycle.
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen </executions>
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen <artifactId>maven-compiler-plugin</artifactId>
5e4f94015f5bbc9eefb1f2cb7af81ed50dcd2b39Timo Sirainen <configuration>
5e4f94015f5bbc9eefb1f2cb7af81ed50dcd2b39Timo Sirainen </configuration>
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen <!-- need at least this version to make excludes work -->
ca316aeb7648d3f1bcf45231f73ddeb1b67a6961Timo Sirainen <configuration>
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen Configure the maven-jar-plugin to pick up
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen META-INF/MANIFEST.MF that's generated by
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen the maven-bundle-plugin.
785b1ca149341b70bf2cb8cc3049f1c4c1070b52Timo Sirainen <manifestFile>
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen ${project.build.outputDirectory}/META-INF/MANIFEST.MF
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen </manifestFile>
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen <manifestEntries>
992a13add4eea0810e4db0f042a595dddf85536aTimo Sirainen </manifestEntries>
e015e2f7e7f48874495f9df8b0dd192b7ffcb5ccTimo Sirainen </configuration>
e015e2f7e7f48874495f9df8b0dd192b7ffcb5ccTimo Sirainen This is the rule that creates the zip file for distribution.
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen <artifactId>maven-assembly-plugin</artifactId>
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen I'd like this to be run as part of the
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen package phase, but that doesn't work.
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen Have to run it explicitly as:
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen mvn package assembly:assembly
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo Sirainen <phase>package</phase>
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo Sirainen <goal>assembly</goal>
e015e2f7e7f48874495f9df8b0dd192b7ffcb5ccTimo Sirainen <configuration>
e015e2f7e7f48874495f9df8b0dd192b7ffcb5ccTimo Sirainen <descriptors>
dd4b5f14b71b01a84af942e720a2d6e5f15ee1a7Timo Sirainen </descriptors>
e015e2f7e7f48874495f9df8b0dd192b7ffcb5ccTimo Sirainen </configuration>
6a8a4c9f530668cd8961b73d702856ed94f05f80Timo Sirainen </executions>
992a13add4eea0810e4db0f042a595dddf85536aTimo Sirainen <artifactId>maven-release-plugin</artifactId>
992a13add4eea0810e4db0f042a595dddf85536aTimo Sirainen <configuration>
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen <arguments>-P deploy</arguments>
e015e2f7e7f48874495f9df8b0dd192b7ffcb5ccTimo Sirainen </configuration>
992a13add4eea0810e4db0f042a595dddf85536aTimo Sirainen Following should be:
710deabc6b3c305c3a842e7a2e0d173c526d13a7Timo Sirainen <version>RELEASE</version>
992a13add4eea0810e4db0f042a595dddf85536aTimo Sirainen but Kohsuke says it doesn't work and to replace
992a13add4eea0810e4db0f042a595dddf85536aTimo Sirainen it with the actual version number.
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen </extensions>
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen <dependencyManagement>
dd4b5f14b71b01a84af942e720a2d6e5f15ee1a7Timo Sirainen <dependencies>
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen </dependency>
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen </dependency>
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen </dependency>
dd4b5f14b71b01a84af942e720a2d6e5f15ee1a7Timo Sirainen </dependency>
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo Sirainen </dependency>
0beb5d6c661ee68130a954ed0f31a34c19195fb7Timo Sirainen </dependency>
710deabc6b3c305c3a842e7a2e0d173c526d13a7Timo Sirainen </dependencies>
0beb5d6c661ee68130a954ed0f31a34c19195fb7Timo Sirainen </dependencyManagement>
992a13add4eea0810e4db0f042a595dddf85536aTimo Sirainen <dependencies>
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen </dependency>
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen <!-- following works around a bug that causes NullPointerException -->
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen </dependency>
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen </dependency>
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen </dependencies>
e015e2f7e7f48874495f9df8b0dd192b7ffcb5ccTimo Sirainen Following two needed to make <includes> work in dependency plugin
e015e2f7e7f48874495f9df8b0dd192b7ffcb5ccTimo Sirainen and <excludes> work in jar plugin.
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen <pluginRepositories>
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo Sirainen <pluginRepository>
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo Sirainen <url>http://people.apache.org/repo/m2-snapshot-repository</url>
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen </pluginRepository>
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo Sirainen <pluginRepository>
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo Sirainen <url>http://snapshots.repository.codehaus.org</url>
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen </pluginRepository>
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen </pluginRepositories>
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo Sirainen <repositories>
e015e2f7e7f48874495f9df8b0dd192b7ffcb5ccTimo Sirainen <url>http://people.apache.org/repo/m2-snapshot-repository</url>
e015e2f7e7f48874495f9df8b0dd192b7ffcb5ccTimo Sirainen </repository>
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen <url>http://snapshots.repository.codehaus.org</url>
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen </repository>
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo Sirainen </repository>
e015e2f7e7f48874495f9df8b0dd192b7ffcb5ccTimo Sirainen </repositories>