Skip to content
Open
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
85 changes: 0 additions & 85 deletions src/site/markdown/faq.md

This file was deleted.

2 changes: 1 addition & 1 deletion src/site/markdown/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ This plugin generates J2EE Application Client file.

General instructions on how to use the ACR Plugin can be found on the [usage page](./usage.html). Some more specific use cases are described in the examples given below.

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).
In case you still have questions regarding the plugin's usage, 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 feel like the plugin is missing a feature or has a defect, you can fill a feature request or bug report in our [issue tracker](./issue-management.html). 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. Of course, patches are welcome, too. Contributors can check out the project from our [source repository](./scm.html) and will find supplementary information in the [guide to helping with Maven](/guides/development/guide-helping.html).

Expand Down
61 changes: 61 additions & 0 deletions src/site/markdown/usage.md.vm
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,64 @@ The ACR Plugin is used to package a JavaEE Application Client module. There are
```shell
mvn acr:acr
```

## Manifest entries

The plugin does not invent a default `Main-Class`. If you do not set
`archive.manifest.mainClass` (and you do not supply a custom manifest that
already has one), the generated jar has no `Main-Class` entry.

Jakarta EE treats a jar as an application client module if it has a
`Main-Class` manifest attribute *or* a `META-INF/application-client.xml`
descriptor; `Main-Class` is not required.
See the [Jakarta EE 11 platform spec](https://jakarta.ee/specifications/platform/11/jakarta-platform-spec-11.0#a3179).
Some runtimes (GlassFish) also accept the main class as a launch argument.

To put `Main-Class` in the manifest, configure Maven Archiver:

```xml
<project>
...
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-acr-plugin</artifactId>
<version>${project.version}</version>
...
<configuration>
<archive>
<manifest>
<mainClass>fully.qualified.MainClass</mainClass>
</manifest>
</archive>
</configuration>
...
</plugin>
</plugins>
</build>
...
</project>
```

See [Make The Jar Executable](/shared/maven-archiver/examples/classpath.html)
and [Using a Custom Manifest File](/shared/maven-archiver/examples/manifestFile.html).

To generate a `Class-Path` entry:

```xml
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
</manifest>
</archive>
</configuration>
```

See the [Maven Archiver Reference](/shared/maven-archiver/examples/classpath.html)
for the exact format of those entries.

Maven does not know the `app-client` packaging type unless the plugin is
loaded as an extension (`<extensions>true</extensions>`), as in the example
above.
1 change: 0 additions & 1 deletion src/site/site.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ under the License.
<item name="Introduction" href="index.html"/>
<item name="Plugin Documentation" href="plugin-info.html"/>
<item name="Usage" href="usage.html"/>
<item name="FAQ" href="faq.html"/>
<!-- According to https://issues.apache.org/jira/browse/MNGSITE-152 -->
<item name="License" href="https://www.apache.org/licenses/"/>
<item name="Download" href="download.html"/>
Expand Down
Loading