pom.xml revision 168
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen The contents of this file are subject to the terms of either the GNU
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen General Public License Version 2 only ("GPL") or the Common Development
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen and Distribution License("CDDL") (collectively, the "License"). You
faed8babca9914257f34fb2e603d74016d563b2dTimo Sirainen may not use this file except in compliance with the License. You can obtain
faed8babca9914257f34fb2e603d74016d563b2dTimo Sirainen a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
faed8babca9914257f34fb2e603d74016d563b2dTimo Sirainen or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen language governing permissions and limitations under the License.
bb10ebcf076c959c752f583746d83805d7686df8Timo Sirainen When distributing the software, include this License Header Notice in each
bb10ebcf076c959c752f583746d83805d7686df8Timo Sirainen file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen Sun designates this particular file as subject to the "Classpath" exception
41e1c7380edda701719d8ce1fb4d465d2ec4c84dTimo Sirainen as provided by Sun in the GPL Version 2 section of the License file that
41e1c7380edda701719d8ce1fb4d465d2ec4c84dTimo Sirainen accompanied this code. If applicable, add the following below the License
41e1c7380edda701719d8ce1fb4d465d2ec4c84dTimo Sirainen Header, with the fields enclosed by brackets [] replaced by your own
41e1c7380edda701719d8ce1fb4d465d2ec4c84dTimo Sirainen identifying information: "Portions Copyrighted [year]
41e1c7380edda701719d8ce1fb4d465d2ec4c84dTimo Sirainen [name of copyright owner]"
bb10ebcf076c959c752f583746d83805d7686df8Timo Sirainen Contributor(s):
bb10ebcf076c959c752f583746d83805d7686df8Timo Sirainen If you wish your version of this file to be governed by only the CDDL or
bb10ebcf076c959c752f583746d83805d7686df8Timo Sirainen only the GPL Version 2, indicate your decision by adding "[Contributor]
bb10ebcf076c959c752f583746d83805d7686df8Timo Sirainen elects to include this software in this distribution under the [CDDL or GPL
bb10ebcf076c959c752f583746d83805d7686df8Timo Sirainen Version 2] license." If you don't indicate a single choice of license, a
bb10ebcf076c959c752f583746d83805d7686df8Timo Sirainen recipient has the option to distribute your version of this file under
bb10ebcf076c959c752f583746d83805d7686df8Timo Sirainen either the CDDL, the GPL Version 2 or to extend the choice of license to
bb10ebcf076c959c752f583746d83805d7686df8Timo Sirainen its licensees as provided above. However, if you add GPL Version 2 code
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen and therefore, elected the GPL Version 2 license, then the option applies
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen only if the new code is made subject to such option by the copyright
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen<project xmlns="http://maven.apache.org/POM/4.0.0"
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen <url>http://java.sun.com/projects/javamail</url>
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen <comments>A business-friendly OSS license</comments>
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen <url>https://glassfish.dev.java.net/public/CDDL+GPL.html</url>
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen <comments>GPL version 2 plus the Classpath Exception</comments>
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen <organization>
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen </organization>
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen <!-- like mail.version, but with underscores instead of dots -->
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen <mail.zipversion>1_4_3-SNAPSHOT</mail.zipversion>
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen <activation-api.version>1.1</activation-api.version>
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen <!-- defaults that are overridden in mail module -->
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen </properties>
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen <organization>Sun Microsystems, Inc.</organization>
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen </developers>
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen This profile contains modules that should only be built
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen but not installed or deployed.
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen </activation>
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen Activating this profile manually for deployment causes
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen the above profile to be deactivated, which works around
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen an apparent bug in maven that prevents me from manually
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen deactivating a profile. This profile purposely has none
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen of the modules I don't want to be deployed.
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen <distributionManagement>
faed8babca9914257f34fb2e603d74016d563b2dTimo Sirainen <url>java-net:/maven2-repository/trunk/repository/</url>
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen </repository>
faed8babca9914257f34fb2e603d74016d563b2dTimo Sirainen </distributionManagement>
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen This plugin is reponsible for packaging artifacts
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen as OSGi bundles. Please refer to
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen http://felix.apache.org/site/maven-bundle-plugin-bnd.html
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen for more information about how to use this plugin.
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen <configuration>
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen <instructions>
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen </instructions>
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen </configuration>
287ba82a8da3eaa473b5735d4eeac2fb4c5d8117Timo Sirainen Since we don't change the packaging type to bundle, we
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen need to configure the plugin to execute the manifest goal
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen during the process-classes phase of the build life cycle.
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen </executions>
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen <artifactId>maven-compiler-plugin</artifactId>
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen <configuration>
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen </configuration>
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen <!-- need at least this version to make excludes work -->
faed8babca9914257f34fb2e603d74016d563b2dTimo Sirainen <configuration>
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen Configure the maven-jar-plugin to pick up
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen META-INF/MANIFEST.MF that's generated by
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen the maven-bundle-plugin.
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen <manifestFile>
faed8babca9914257f34fb2e603d74016d563b2dTimo Sirainen ${project.build.outputDirectory}/META-INF/MANIFEST.MF
faed8babca9914257f34fb2e603d74016d563b2dTimo Sirainen </manifestFile>
faed8babca9914257f34fb2e603d74016d563b2dTimo Sirainen <manifestEntries>
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen </manifestEntries>
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen </configuration>
faed8babca9914257f34fb2e603d74016d563b2dTimo Sirainen This is the rule that creates the zip file for distribution.
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen <artifactId>maven-assembly-plugin</artifactId>
faed8babca9914257f34fb2e603d74016d563b2dTimo Sirainen I'd like this to be run as part of the
faed8babca9914257f34fb2e603d74016d563b2dTimo Sirainen package phase, but that doesn't work.
faed8babca9914257f34fb2e603d74016d563b2dTimo Sirainen Have to run it explicitly as:
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen mvn package assembly:assembly
faed8babca9914257f34fb2e603d74016d563b2dTimo Sirainen <phase>package</phase>
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen <goal>assembly</goal>
faed8babca9914257f34fb2e603d74016d563b2dTimo Sirainen <configuration>
faed8babca9914257f34fb2e603d74016d563b2dTimo Sirainen <finalName>javamail${mail.zipversion}</finalName>
41e1c7380edda701719d8ce1fb4d465d2ec4c84dTimo Sirainen <descriptors>
faed8babca9914257f34fb2e603d74016d563b2dTimo Sirainen </descriptors>
faed8babca9914257f34fb2e603d74016d563b2dTimo Sirainen </configuration>
faed8babca9914257f34fb2e603d74016d563b2dTimo Sirainen </executions>
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen <artifactId>maven-release-plugin</artifactId>
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen <configuration>
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen <arguments>-P deploy</arguments>
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen </configuration>
41e1c7380edda701719d8ce1fb4d465d2ec4c84dTimo Sirainen <pluginManagement>
41e1c7380edda701719d8ce1fb4d465d2ec4c84dTimo Sirainen By default, disable the FindBugs plugin for all modules.
41e1c7380edda701719d8ce1fb4d465d2ec4c84dTimo Sirainen It's enabled in the "mail" module, which is the only
41e1c7380edda701719d8ce1fb4d465d2ec4c84dTimo Sirainen module where we actually want to run it.
41e1c7380edda701719d8ce1fb4d465d2ec4c84dTimo Sirainen <artifactId>findbugs-maven-plugin</artifactId>
41e1c7380edda701719d8ce1fb4d465d2ec4c84dTimo Sirainen <configuration>
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen </configuration>
41e1c7380edda701719d8ce1fb4d465d2ec4c84dTimo Sirainen </pluginManagement>
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen Following should be:
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen <version>RELEASE</version>
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen but Kohsuke says it doesn't work and to replace
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen it with the actual version number.
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen </extensions>
faed8babca9914257f34fb2e603d74016d563b2dTimo Sirainen <dependencyManagement>
faed8babca9914257f34fb2e603d74016d563b2dTimo Sirainen <dependencies>
faed8babca9914257f34fb2e603d74016d563b2dTimo Sirainen </dependency>
faed8babca9914257f34fb2e603d74016d563b2dTimo Sirainen </dependency>
faed8babca9914257f34fb2e603d74016d563b2dTimo Sirainen </dependency>
faed8babca9914257f34fb2e603d74016d563b2dTimo Sirainen </dependency>
faed8babca9914257f34fb2e603d74016d563b2dTimo Sirainen </dependency>
faed8babca9914257f34fb2e603d74016d563b2dTimo Sirainen </dependency>
faed8babca9914257f34fb2e603d74016d563b2dTimo Sirainen </dependencies>
faed8babca9914257f34fb2e603d74016d563b2dTimo Sirainen </dependencyManagement>