DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. Copyright (c) 1997-2013 Oracle and/or its affiliates. All rights reserved. The contents of this file are subject to the terms of either the GNU General Public License Version 2 only ("GPL") or the Common Development and Distribution License("CDDL") (collectively, the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the License at language governing permissions and limitations under the License. When distributing the software, include this License Header Notice in each Oracle designates this particular file as subject to the "Classpath" exception as provided by Oracle in the GPL Version 2 section of the License file that accompanied this code. If applicable, add the following below the License Header, with the fields enclosed by brackets [] replaced by your own identifying information: "Portions Copyright [year] [name of copyright owner]" If you wish your version of this file to be governed by only the CDDL or only the GPL Version 2, indicate your decision by adding "[Contributor] elects to include this software in this distribution under the [CDDL or GPL Version 2] license." If you don't indicate a single choice of license, a recipient has the option to distribute your version of this file under either the CDDL, the GPL Version 2 or to extend the choice of license to its licensees as provided above. However, if you add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the option applies only if the new code is made subject to such option by the copyright <
artifactId>jvnet-parent</
artifactId>
<
modelVersion>4.0.0</
modelVersion>
<
artifactId>all</
artifactId>
<
packaging>pom</
packaging>
<
version>1.5-SNAPSHOT</
version>
<
name>JavaMail API distribution</
name>
<
system>Bugzilla</
system>
<
distribution>repo</
distribution>
<
comments>A business-friendly OSS license</
comments>
<
distribution>repo</
distribution>
<
comments>GPL version 2 plus the Classpath Exception</
comments>
<!-- like mail.version, but with underscores instead of dots --> <!-- defaults that are overridden in mail module --> <!-- for the osgiversion-maven-plugin --> <
name>Bill Shannon</
name>
<
email>bill.shannon@oracle.com</
email>
<
organization>Oracle</
organization>
<
module>mailapijar</
module>
This profile contains modules that should only be built but not installed or deployed. <
activeByDefault>true</
activeByDefault>
This profile is used for deploying a JavaMail final release. Activating this profile manually for deployment causes the above profile to be deactivated, which works around an apparent bug in maven that prevents me from manually deactivating a profile. This profile purposely has none of the modules I don't want to be deployed. <
module>parent-distrib</
module>
<
artifactId>maven-surefire-plugin</
artifactId>
<
artifactId>maven-javadoc-plugin</
artifactId>
<
artifactId>maven-gpg-plugin</
artifactId>
This profile is used for deploying a JavaMail SNAPSHOT release. It's identical to the above deploy-release profile except that <
module>parent-distrib</
module>
<
artifactId>maven-surefire-plugin</
artifactId>
<
artifactId>maven-javadoc-plugin</
artifactId>
A special profile for compiling with the real JDK 1.5 compiler, to make sure there are no accidental dependencies on JDK 1.6 or newer APIs. Set the property javac.path to the path to the JDK 1.5 compiler, e.g., <
artifactId>maven-compiler-plugin</
artifactId>
<
compilerVersion>1.4</
compilerVersion>
<
defaultGoal>install</
defaultGoal>
Make sure we're using the correct version of maven, required to allow us to build JavaMail with JDK 1.4 and build the tests with JDK 1.5. See the maven-compiler-plugin configuration below. <
artifactId>maven-enforcer-plugin</
artifactId>
<
version>[2.2.1,)</
version>
This plugin is reponsible for packaging artifacts as OSGi bundles. Please refer to for more information about how to use this plugin. <
artifactId>maven-bundle-plugin</
artifactId>
Since we don't change the packaging type to bundle, we need to configure the plugin to execute the manifest goal during the process-classes phase of the build life cycle. <
phase>process-classes</
phase>
Since we don't want a qualifier like b05 or SNAPSHOT to appear in the OSGi package version attribute, we use the following plugin to populate a project property with an OSGi version that is equivalent to the maven version without the qualifier. <
artifactId>osgiversion-maven-plugin</
artifactId>
<
dropVersionComponent>qualifier</
dropVersionComponent>
<
id>compute-osgi-version</
id>
<
goal>compute-osgi-version</
goal>
Use the 1.5 compiler for JavaMail itself and the test classes. <
artifactId>maven-compiler-plugin</
artifactId>
<
id>default-testCompile</
id>
<
artifactId>maven-jar-plugin</
artifactId>
<!-- need at least this version to make excludes work --> Configure the maven-jar-plugin to pick up </
Implementation-
Version>
<
Implementation-
Vendor-
Id>
</
Implementation-
Vendor-
Id>
<
Probe-
Provider-
XML-
File-
Names>
</
Probe-
Provider-
XML-
File-
Names>
<
exclude>**/*.java</
exclude>
Tell the source plugin about the sources that may have been downloaded by the maven-dependency-plugin. that's copied there will also be compiled when using the latest version of the maven-compiler-plugin. <
artifactId>build-helper-maven-plugin</
artifactId>
<
phase>generate-sources</
phase>
<
source>
<!-- for dependencies --> Configure the source plugin here so that it will know about the sources that may have been downloaded by the maven-dependency-plugin and configured by the build-helper-maven-plugin. <
artifactId>maven-source-plugin</
artifactId>
<
includePom>true</
includePom>
Since we added the classes directory using the build-helper-maven-plugin above, we need to exclude the class files from the source jar file. <
exclude>**/*.class</
exclude>
This is the rule that creates the zip file for distribution. <
artifactId>maven-assembly-plugin</
artifactId>
<
inherited>false</
inherited>
I'd like this to be run as part of the package phase, but that doesn't work. Have to run it explicitly as: mvn package assembly:assembly <artifactId>maven-release-plugin</artifactId> <arguments>-P deploy</arguments> <
artifactId>maven-compiler-plugin</
artifactId>
<
artifactId>maven-surefire-plugin</
artifactId>
<
artifactId>maven-jar-plugin</
artifactId>
<
artifactId>build-helper-maven-plugin</
artifactId>
By default, disable the FindBugs plugin for all modules. It's enabled in the modules where we actually want to <
artifactId>findbugs-maven-plugin</
artifactId>
<
findbugsXmlWithMessages>true</
findbugsXmlWithMessages>
<
artifactId>maven-enforcer-plugin</
artifactId>
<
artifactId>maven-bundle-plugin</
artifactId>
<
artifactId>maven-source-plugin</
artifactId>
<
artifactId>maven-javadoc-plugin</
artifactId>
<
artifactId>maven-war-plugin</
artifactId>
<
artifactId>dsn</
artifactId>
<
artifactId>gimap</
artifactId>
<
artifactId>mbox</
artifactId>
<
artifactId>taglib</
artifactId>
<
artifactId>servlet-api</
artifactId>
<
artifactId>jsp-api</
artifactId>
<
artifactId>activation</
artifactId>
Configure FindBugs to run with "mvn site" and generate html output that can be viewed directly. <
artifactId>findbugs-maven-plugin</
artifactId>