Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 27 additions & 6 deletions docs/src/site/apt/index.apt.vm
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,29 @@ Apache Software Foundation Parent POM
** <<mailingLists>>: The POM sets up generic Apache announcement
lists. You should override this.

** <<javaVersion>>: Java version used for compilation, default value is <<$context.get("javaVersion")>>.

You can override this property in your project POM to set different Java version for compilation.

The <<<javaVersion>>> property is used to set the <<<maven.compiler.*>>> properties, so they should not be set directly in your project POM.

They will be set automatically according to the JDK used for the project build:

*** for JDK 8 and older

+------+
<maven.compiler.source>\${javaVersion}</maven.compiler.source>
<maven.compiler.target>\${javaVersion}</maven.compiler.target>
+------+

*** for JDK 9 and newer

+------+
<maven.compiler.release>\${javaVersion}</maven.compiler.release>
+------+

[]

* <<pluginManagement>>: The plugin management section specifies versions
of a list of plugins. See the {{{./plugin-management.html}Plugin Management report}} for
the complete list with versions.
Expand All @@ -77,11 +100,6 @@ Apache Software Foundation Parent POM

[]

** The compiler plugin is set target <<Java $context.get("maven.compiler.target")>> (<<<maven.compiler.target>>> property)
and assume $context.get("project.build.sourceEncoding") source encoding (<<<project.build.sourceEncoding>>> property). When being executed
with JDK 9 or newer also <<<maven.compiler.release>>> is set to the value of property <<<maven.compiler.target>>>.
Therefore its value must not start with <<<1.>>> (use for example <<<8>>> instead of <<<1.8>>>).

** The jar plugin is set to add default specification and implementation entries.

** The resources plugin is set for $context.get("project.build.sourceEncoding").
Expand All @@ -108,7 +126,7 @@ Apache Software Foundation Parent POM

*** <<<minimalMavenBuildVersion>>> property: default value is <<Maven $context.get("minimalMavenBuildVersion")>>

*** <<<minimalJavaBuildVersion>>> property: default value is <<Java $context.get("minimalJavaBuildVersion")>>
*** <<<minimalJavaBuildVersion>>> property: default is <<<javaVersion>>> property value.

[]

Expand Down Expand Up @@ -191,6 +209,9 @@ Settings Configuration

Notices

* Since version <<36>>, the <<<javaVersion>>> property has been introduced
to define the Java version used for the <<<maven.compiler.*>>> properties.

* Since version <<32>> <<<maven-site-plugin:attach-descriptor>>> was removed from <<<plugins>>> section.

Publishing a site descriptor is only needed in project parent poms, child projects not need publish it.
Expand Down
15 changes: 6 additions & 9 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,10 @@ under the License.
<sourceReleaseAssemblyDescriptor>source-release</sourceReleaseAssemblyDescriptor>
<resourceBundleArtifact>apache-jar-resource-bundle</resourceBundleArtifact>
<gpg.useagent>true</gpg.useagent>
<!-- java version used to to set maven.compiler.* -->
<javaVersion>8</javaVersion>
<minimalMavenBuildVersion>3.6.3</minimalMavenBuildVersion>
<minimalJavaBuildVersion>${maven.compiler.target}</minimalJavaBuildVersion>
<maven.compiler.source>${maven.compiler.target}</maven.compiler.source>
<!-- use version numbers without the "1." prefix (supported since javac 5) -->
<maven.compiler.target>8</maven.compiler.target>
<minimalJavaBuildVersion>${javaVersion}</minimalJavaBuildVersion>
<!-- for surefire, failsafe and surefire-report -->
<surefire.version>3.5.4</surefire.version>
<assembly.tarLongFileMode>posix</assembly.tarLongFileMode>
Expand Down Expand Up @@ -520,9 +519,8 @@ under the License.
<jdk>[,9)</jdk>
</activation>
<properties>
<maven.compiler.source>${maven.compiler.target}</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<minimalJavaBuildVersion>${maven.compiler.target}</minimalJavaBuildVersion>
<maven.compiler.source>${javaVersion}</maven.compiler.source>
<maven.compiler.target>${javaVersion}</maven.compiler.target>
</properties>
</profile>
<profile>
Expand All @@ -533,8 +531,7 @@ under the License.
</activation>
<properties>
<!-- https://maven.apache.org/plugins/maven-compiler-plugin/examples/set-compiler-release.html, affects m-compiler-p and m-javadoc-p -->
<maven.compiler.release>8</maven.compiler.release>
<minimalJavaBuildVersion>${maven.compiler.release}</minimalJavaBuildVersion>
<maven.compiler.release>${javaVersion}</maven.compiler.release>
</properties>
</profile>
<profile>
Expand Down