You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by el...@apache.org on 2026/08/09 12:03:21 UTC
(maven-jar-plugin) branch ste-site created (now e6f6f9a)
This is an automated email from the ASF dual-hosted git repository.
elharo pushed a change to branch ste-site
in repository https://gitbox.apache.org/repos/asf/maven-jar-plugin.git
at e6f6f9a docs: rewrite site pages in ASD-STE100 Simplified Technical English
This branch includes the following new commits:
new e6f6f9a docs: rewrite site pages in ASD-STE100 Simplified Technical English
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(maven-jar-plugin) 01/01: docs: rewrite site pages in ASD-STE100 Simplified Technical English
Posted by el...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
elharo pushed a commit to branch ste-site
in repository https://gitbox.apache.org/repos/asf/maven-jar-plugin.git
commit e6f6f9a8157e30d335257cb8db51a3a4d004a686
Author: Elliotte Rusty Harold <el...@ibiblio.org>
AuthorDate: Sun Aug 9 12:02:52 2026 +0000
docs: rewrite site pages in ASD-STE100 Simplified Technical English
---
src/site/fml/faq.fml | 6 ++--
src/site/markdown/examples/attached-jar.md.vm | 6 ++--
src/site/markdown/examples/create-test-jar.md.vm | 28 ++++++++++---------
src/site/markdown/examples/include-exclude.md.vm | 6 ++--
.../markdown/examples/manifest-customization.md.vm | 10 +++----
src/site/markdown/index.md | 28 +++++++++----------
src/site/markdown/usage.md.vm | 32 ++++++++++++++--------
src/site/xdoc/download.xml.vm | 19 +++++++------
8 files changed, 74 insertions(+), 61 deletions(-)
diff --git a/src/site/fml/faq.fml b/src/site/fml/faq.fml
index 1e8d392..95a0cfc 100644
--- a/src/site/fml/faq.fml
+++ b/src/site/fml/faq.fml
@@ -28,9 +28,9 @@ under the License.
<question>Why is there no documentation for the archive parameter?</question>
<answer>
<p>
- The archive parameter is a class that resides outside of this plugin,
- in the Maven Archiver component. You can find the documentation for
- Maven Archiver
+ The `archive` parameter is a class outside of this plugin. It is
+ part of the Maven Archiver component. Read the Maven Archiver
+ documentation
<a href="/shared/maven-archiver/index.html">here</a>.
</p>
</answer>
diff --git a/src/site/markdown/examples/attached-jar.md.vm b/src/site/markdown/examples/attached-jar.md.vm
index a47225b..8558777 100644
--- a/src/site/markdown/examples/attached-jar.md.vm
+++ b/src/site/markdown/examples/attached-jar.md.vm
@@ -24,11 +24,11 @@ specific language governing permissions and limitations
under the License.
-->
-# How to create an additional attached jar artifact from the project
+# How to Create an Additional Attached JAR Artifact
-Specify a list of fileset patterns to be included or excluded by adding `<includes>`/`<include>` or `<excludes>`/`<exclude>` and add a `classifier` in your `pom.xml`.
+Add `<includes>`/`<include>` or `<excludes>`/`<exclude>` in your `pom.xml`. Add a `classifier` as well.
-**Note:** the jar-plugin must be defined in a new execution, otherwise it will replace the default use of the jar-plugin instead of adding a second artifact. The `classifier` is also required to create more than one artifact.
+**Note:** Define the JAR Plugin in a new execution. Otherwise, it replaces the default use of the JAR Plugin. It does not add a second artifact. The `classifier` is also required to create more than one artifact.
```unknown
<project>
diff --git a/src/site/markdown/examples/create-test-jar.md.vm b/src/site/markdown/examples/create-test-jar.md.vm
index 7fc0754..f275638 100644
--- a/src/site/markdown/examples/create-test-jar.md.vm
+++ b/src/site/markdown/examples/create-test-jar.md.vm
@@ -1,5 +1,5 @@
---
-title: How to create a jar containing test classes
+title: How to create a jar with test classes
author:
- Karl Heinz Marbaise
date: 2014-06-16
@@ -24,17 +24,17 @@ specific language governing permissions and limitations
under the License.
-->
-# How to create a jar containing test classes
+# How to Create a JAR With Test Classes
-When you want to create a jar containing _test-classes_, you would probably want to reuse those classes. There are two ways to solve this:
+When you create a JAR with test classes, you probably want to reuse those classes. There are two ways to do this:
-- Create an attached jar with the _test-classes_ from the current project and loose its transitive `test`-scoped dependencies.
-- Create a separate project with the _test-classes_.
+- Create an attached JAR with the test classes from the current project. This JAR does not include the transitive `test`-scoped dependencies.
+- Create a separate project with the test classes.
The easy way
------------
-You can produce a jar which will include your test classes and resources.
+Use this configuration to produce a JAR with your test classes and resources:
```unknown
<project>
@@ -61,7 +61,7 @@ You can produce a jar which will include your test classes and resources.
</project>
```
-To reuse this artifact in an other project, you must declare this dependency with type test-jar :
+To reuse this artifact in another project, declare the dependency with `type` set to `test-jar`:
```unknown
<project>
@@ -80,14 +80,16 @@ To reuse this artifact in an other project, you must declare this dependency wit
</project>
```
-Based on such configuration there will be two jar files generated. The first one contains the classes from `src/main/java` whereas the second one will contain the classes from `src/test/java`. The generated jar files follow the naming schema `artifactId-version.jar` for the first one and `artifactId-version-classifier.jar` for the second one. The parts `artifactId`, `versions` will be replaced by the values given within your project `pom.xml` file. The `classifier` will be set to `tests` [...]
+This configuration generates two JAR files. The first contains the classes from `src/main/java`. The second contains the classes from `src/test/java`. The JAR names follow the schema `artifactId-version.jar` and `artifactId-version-classifier.jar`.
-**Note:** The downside of this solution is that you don't get the transitive `test`-scoped dependencies automatically. Maven only resolves the `compile`-time dependencies, so you'll have to add all the other required `test`-scoped dependencies by hand.
+The values of `artifactId` and `version` come from your `pom.xml` file. The default `classifier` is `tests`. You can change it in the [jar goal configuration](../test-jar-mojo.html).
+
+**Note:** This solution does not include the transitive `test`-scoped dependencies automatically. Maven resolves only the `compile`-time dependencies. Add all other required `test`-scoped dependencies by hand.
The preferred way
-----------------
-In order to let Maven resolve all `test`-scoped transitive dependencies you should create a separate project.
+To let Maven resolve all `test`-scoped transitive dependencies, create a separate project:
```unknown
<project>
@@ -98,10 +100,10 @@ In order to let Maven resolve all `test`-scoped transitive dependencies you shou
</project>
```
-- Move the sources files from `src/test/java` you want to share from the original project to the `src/main/java` of this project. The same type of movement counts for the resources as well of course.
-- Move the required `test`-scoped dependencies from the original project to this project and remove the scope (i.e. changing it to the `compile`-scope). And yes, that means that the junit dependency (or any other testing framework dependency) gets the default scope too. You'll probably need to add some project specific dependencies as well to let it all compile again.
+- Move the source files you want to share from `src/test/java` in the original project to `src/main/java` in this project. Move the resources in the same way.
+- Move the required `test`-scoped dependencies from the original project to this project. Remove their `test` scope. The test framework dependency, for example junit, gets the default scope too. Add any project specific dependencies that the code needs.
-Now you have your reusable _test-classes_ and you can refer to it as you're used to:
+Add this dependency to use the reusable test classes in another project:
```unknown
<project>
diff --git a/src/site/markdown/examples/include-exclude.md.vm b/src/site/markdown/examples/include-exclude.md.vm
index a6fcd88..789eca5 100644
--- a/src/site/markdown/examples/include-exclude.md.vm
+++ b/src/site/markdown/examples/include-exclude.md.vm
@@ -24,9 +24,9 @@ specific language governing permissions and limitations
under the License.
-->
-# How to include/exclude content from jar artifact
+# How to Include or Exclude Content from a JAR Artifact
-Specify a list of fileset patterns to be included or excluded by adding `<includes>`/`<include>` or `<excludes>`/`<exclude>` in your `pom.xml`.
+Add `<includes>`/`<include>` or `<excludes>`/`<exclude>` in your `pom.xml`. These elements specify the fileset patterns to include or exclude.
```unknown
<project>
@@ -51,4 +51,4 @@ Specify a list of fileset patterns to be included or excluded by adding `<includ
</project>
```
-Note that the patterns need to be relative to the path specified for the plugin's `classesDirectory` parameter.
+The patterns must be relative to the path for the plugin's `classesDirectory` parameter.
diff --git a/src/site/markdown/examples/manifest-customization.md.vm b/src/site/markdown/examples/manifest-customization.md.vm
index 81b862f..4daeccd 100644
--- a/src/site/markdown/examples/manifest-customization.md.vm
+++ b/src/site/markdown/examples/manifest-customization.md.vm
@@ -29,14 +29,14 @@ under the License.
The Default Manifest
--------------------
-The default contents of the manifest is described in the documentation for [Maven Archiver](/shared/maven-archiver/examples/manifest.html).
+The documentation for [Maven Archiver](/shared/maven-archiver/examples/manifest.html) describes the default contents of the manifest.
-Starting with version 2.1, the maven-jar-plugin uses Maven Archiver ${mavenArchiverVersion}. This means that it no longer creates the Specification and Implementation details in the manifest by default. If you want them you have to say so explicitly in your plugin configuration. This is also is described in the documentation for [Maven Archiver](/shared/maven-archiver/examples/manifest.html).
+Since version 2.1, the Maven JAR Plugin uses Maven Archiver ${mavenArchiverVersion}. It no longer creates the Specification and Implementation details in the manifest by default. To add them, specify them explicitly in your plugin configuration. The documentation for [Maven Archiver](/shared/maven-archiver/examples/manifest.html) describes this as well.
-Customization the Manifest
---------------------------
+Manifest Customization
+----------------------
-The default manifest can be altered with the `archive` configuration element. Below you will find some of the configuration options that are available. For more info see the [Maven Archiver reference](/shared/maven-archiver/index.html).
+You can alter the default manifest with the `archive` configuration element. The example below shows some of the available configuration options. For more information, see the [Maven Archiver reference](/shared/maven-archiver/index.html).
```unknown
<project>
diff --git a/src/site/markdown/index.md b/src/site/markdown/index.md
index 03fdd11..e7ca598 100644
--- a/src/site/markdown/index.md
+++ b/src/site/markdown/index.md
@@ -25,33 +25,31 @@ under the License.
-->
# Apache Maven JAR Plugin
-This plugin provides the capability to build jars. To sign jars, use the [Maven Jarsigner Plugin](/plugins/maven-jarsigner-plugin/).
+
+This plugin builds JAR files. To sign JAR files, use the [Maven Jarsigner Plugin](/plugins/maven-jarsigner-plugin/).
## Goals Overview
-- [jar:jar](./jar-mojo.html) create a jar file for your project classes inclusive resources.
-- [jar:test-jar](./test-jar-mojo.html) create a jar file for your project test classes .
+- [jar:jar](./jar-mojo.html): create a JAR file for your project classes and their resources.
+- [jar:test-jar](./test-jar-mojo.html): create a JAR file for your project test classes.
+
## Usage
-General instructions on how to use the JAR Plugin can be found on the [usage page](./usage.html). Some more specific use cases are described in the examples below.
+General instructions for the JAR Plugin are on the [usage page](./usage.html). The examples below describe more specific use cases.
-In case you still have questions regarding the plugin's usage, please have a look at the [FAQ](./faq.html) and feel free to contact the [user mailing list](./mailing-lists.html). The posts to the mailing list are archived and could already contain the answer to your question as part of an older thread. Hence, it is also worth browsing/searching the [mail archive](./mailing-lists.html).
+If you have questions about the plugin, see the [FAQ](./faq.html) or contact the [user mailing list](./mailing-lists.html). The mailing list stores all posts in an archive. An older thread can contain the answer to your question. You can search the [mail archive](./mailing-lists.html) for the answer.
-If you feel like the plugin is missing a feature or has a defect, you can file a feature request or bug report in our [issue tracker](https://github.com/apache/maven-jar-plugin/issues). When creating a new issue, please provide a comprehensive description of your concern. Especially for fixing bugs it is crucial that the developers can reproduce your problem. For this reason, entire debug logs, POMs, or most preferably little demo projects attached to the issue are very much appreciated. [...]
+If the plugin is missing a feature or has a defect, file a feature request or bug report in the [issue tracker](https://github.com/apache/maven-jar-plugin/issues). When you create a new issue, describe your concern in detail. The developers must reproduce the problem to fix a bug. Attach entire debug logs, POMs, or small demo projects to the issue. Patches are welcome. Contributors can check out the project from the [source repository](./scm.html) and find supplementary information in th [...]
## Archiver Configuration
-The plugin uses Maven Archiver to handle jar content and manifest configuration.
-
-You can have a look at the [Maven Archiver Documentation](/shared/maven-archiver/) to understand how to setup this.
-
-You might also want to consult the [Guide to Working with Manifests](/guides/mini/guide-manifest.html).
+The plugin uses Maven Archiver to handle JAR content and manifest configuration. See the [Maven Archiver Documentation](/shared/maven-archiver/) to learn how to set it up. You can also see the [Guide to Working with Manifests](/guides/mini/guide-manifest.html).
## Examples
-To provide you with better understanding of some usages of the JAR Plugin, you can take a look at the following examples:
+The following examples show some usages of the JAR Plugin:
- [Manifest Customization](./examples/manifest-customization.html)
-- [Howto include/exclude Content from a jar archive](./examples/include-exclude.html)
-- [How to create an additional attached jar artifact from the project](./examples/attached-jar.html)
-- [How to create a jar containing test classes](./examples/create-test-jar.html)
+- [Include/Exclude Content from a JAR Archive](./examples/include-exclude.html)
+- [Create an Additional Attached JAR Artifact](./examples/attached-jar.html)
+- [Create a JAR With Test Classes](./examples/create-test-jar.html)
diff --git a/src/site/markdown/usage.md.vm b/src/site/markdown/usage.md.vm
index 4520005..5dd4e20 100644
--- a/src/site/markdown/usage.md.vm
+++ b/src/site/markdown/usage.md.vm
@@ -29,16 +29,16 @@ under the License.
# Usage
-Some brief examples on how to use this plugin. If you want to use advanced configurations you should have a look at the [Example section](./index.html#Examples). documentation for [Maven Archiver](/shared/maven-archiver/).
+The examples below show how to use this plugin. For advanced configurations, see the [Example section](./index.html#Examples). See the documentation for [Maven Archiver](/shared/maven-archiver/).
-To handle archiving this version of Maven JAR Plugin uses [Maven Archiver](/shared/maven-archiver/index.html) ${mavenArchiverVersion}.
+This version of the Maven JAR Plugin uses [Maven Archiver](/shared/maven-archiver/index.html) ${mavenArchiverVersion} to handle archive creation.
-**Note:** If you need to sign your JAR files you should use the [Maven Jarsigner Plugin](/plugins/maven-jarsigner-plugin/) instead.
+**Note:** If you need to sign your JAR files, use the [Maven Jarsigner Plugin](/plugins/maven-jarsigner-plugin/) instead.
How to build a JAR file
-----------------------
-When you want to create a JAR-file with Maven, you first have to create a `pom.xml`-file with at least the following content:
+To create a JAR file with Maven, create a `pom.xml` file with at least the following content:
```unknown
<project>
@@ -51,23 +51,33 @@ When you want to create a JAR-file with Maven, you first have to create a `pom.x
</project>
```
-Since 'jar' is the default packaging type it is not required to set it in this case. Apart from the above you will normally want some real java source files which should be located within `src/main/java`. If you need extra resources on your classpath (for example property files) they should be located in `src/main/resources`. Now we can create a JAR-file by using the command below:
+The `jar` packaging type is the default. You do not have to set it in this case.
+
+1. Place your Java source files in `src/main/java`.
+2. If you need extra resources, such as property files, on the classpath, place them in `src/main/resources`.
+3. Create the JAR file with the command below:
```unknown
mvn package
```
-The 'package' phase is always responsible for bundling all the files in the artifact, in this case a JAR-file.
+The `package` phase bundles all the files into the artifact. In this case, the artifact is a JAR file.
-In your project's `target` directory you'll see the generated jar file which is named like: 'core-1.0-SNAPSHOT.jar'. The resulting 'jar' file contains the compiled java class files as well as the files from `src/main/resources`.
+The generated JAR file is in the `target` directory. Its name is `core-1.0-SNAPSHOT.jar`. The JAR file contains the compiled Java class files and the files from `src/main/resources`.
-Usually there is no need to mentioned the 'maven-jar-plugin' explicit cause it's bound to the [Maven Build Life Cycle](/guides/introduction/introduction-to-the-lifecycle.html).
+Usually you do not need to declare the `maven-jar-plugin` in your `pom.xml`. The plugin is bound to the [Maven Build Life Cycle](/guides/introduction/introduction-to-the-lifecycle.html).
-For full documentation, click [here](./plugin-info.html).
+For full documentation, see [plugin-info](./plugin-info.html).
Modular JAR files
-----------------
-The [Java Platform Module System (JPMS)](https://openjdk.java.net/projects/jigsaw/spec/) introduced [changes in the JAR file specifications](https://cr.openjdk.java.net/~mr/jigsaw/spec/jar.html) as well - Modular JAR files. Modular JAR files are JAR files with `module-info.class` file in the root directory (or in the versioned area for multi-release JAR files). If the project contains `module-info.class` the resulting JAR will be a Modular JAR without a need for any configuration regardl [...]
+The [Java Platform Module System (JPMS)](https://openjdk.java.net/projects/jigsaw/spec/) introduced Modular JAR files in the [JAR file specifications](https://cr.openjdk.java.net/~mr/jigsaw/spec/jar.html). A Modular JAR file contains a `module-info.class` file in the root directory. For multi-release JAR files, the file is in the versioned area. If the project contains `module-info.class`, the final JAR is a Modular JAR. This happens without any configuration and regardless of the plugin [...]
+
+Since version 3.1.2, this plugin updates the modular descriptor when the JAR contains `module-info.class`. The plugin adds additional attributes, such as the list of included packages. It verifies the modular descriptor. It also verifies that all services provided by the module are in the JAR file. The most notable added attribute is the module main class.
+
+If the JAR manifest contains the `Main-Class` attribute, this plugin sets the module main class to the same value. For an example, see [Make The Jar Executable](../../shared/maven-archiver/examples/classpath.html).
+
+The plugin uses the JDK `jar` tool internally to add the additional attributes and to verify the modular descriptor. This requires JDK version 9 or newer.
-Starting with version 3.1.2, if the JAR file contains `module-info.class`, this plugin will update the modular descriptor (`module-info.class`) with additional attributes such as the list of packages included and will validate the resulting modular descriptor (for example if all services provided by the module are actually included in the JAR file). The most notable additional attribute added is the module main class. If the JAR manifest contains `Main-Class` attribute this plugin will s [...]
+If you use JDK version 8 or earlier, the JAR is still a Modular JAR. The JAR contains `module-info.class`. The plugin adds no additional attributes and performs no validation.
diff --git a/src/site/xdoc/download.xml.vm b/src/site/xdoc/download.xml.vm
index 8f28f05..87aa49b 100644
--- a/src/site/xdoc/download.xml.vm
+++ b/src/site/xdoc/download.xml.vm
@@ -29,9 +29,8 @@ under the License.
<p><strong>${project.name} ${project.version}</strong> is distributed in source format.</p>
- <p>Use a source archive if you intend to build <strong>${project.name}</strong> yourself.</p>
-
- <p>Otherwise, simply use the ready-made binary artifacts from <strong>central repository</strong>.</p>
+ <p>Use a source archive if you want to build <strong>${project.name}</strong> yourself.
+ Otherwise, use the ready-made binary artifacts from the central repository.</p>
<p><strong>${project.name}</strong> is distributed under the <a href="https://www.apache.org/licenses/">Apache License, version 2.0</a>.</p>
@@ -58,16 +57,20 @@ under the License.
</tbody>
</table>
- <p>It is essential that you <a href="https://www.apache.org/info/verification.html">verify the integrity</a> of the downloaded file
- using the checksum (.sha512 file)
- or using the signature (.asc file) against the public <a href="https://downloads.apache.org/maven/KEYS">KEYS</a> used by the Apache Maven developers.
+ <p>Verify the integrity of the downloaded file before use. Use the checksum
+ (.sha512 file) or the signature (.asc file). Verify the signature against
+ the public <a href="https://downloads.apache.org/maven/KEYS">KEYS</a> used
+ by the Apache Maven developers. See the
+ <a href="https://www.apache.org/info/verification.html">verification instructions</a>
+ for more information.
</p>
</subsection>
<subsection name="Previous Versions">
- <p>It is strongly recommended to use the latest release version of <strong>${project.name}</strong> to take advantage of the newest features and bug fixes.</p>
- <p>Older non-recommended releases can be found on our <a href="https://archive.apache.org/dist/maven/plugins/">archive site</a>.</p>
+ <p>Use the latest release version of <strong>${project.name}</strong>. It contains
+ the newest features and bug fixes.</p>
+ <p>You can find older releases on our <a href="https://archive.apache.org/dist/maven/plugins/">archive site</a>.</p>
</subsection>
</section>
</body>