diff --git a/src/site/apt/examples/configureplugin.apt.vm b/src/site/apt/examples/configureplugin.apt.vm deleted file mode 100644 index 4b11cb8..0000000 --- a/src/site/apt/examples/configureplugin.apt.vm +++ /dev/null @@ -1,57 +0,0 @@ - ------ - Configuring Source Plugin - ------ - Maria Odea Ching - ------ - 11 July 2006 - ------ - -~~ Licensed to the Apache Software Foundation (ASF) under one -~~ or more contributor license agreements. See the NOTICE file -~~ distributed with this work for additional information -~~ regarding copyright ownership. The ASF licenses this file -~~ to you under the Apache License, Version 2.0 (the -~~ "License"); you may not use this file except in compliance -~~ with the License. You may obtain a copy of the License at -~~ -~~ http://www.apache.org/licenses/LICENSE-2.0 -~~ -~~ Unless required by applicable law or agreed to in writing, -~~ software distributed under the License is distributed on an -~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -~~ KIND, either express or implied. See the License for the -~~ specific language governing permissions and limitations -~~ under the License. - -~~ NOTE: For help with the syntax of this file, see: -~~ http://maven.apache.org/doxia/references/apt-format.html - -Configuring Source Plugin - - To customize the plugin, you can change its configuration parameters in your POM, as shown below: - -+-----+ - - ... - - - - org.apache.maven.plugins - maven-source-plugin - ${project.version} - - /absolute/path/to/the/output/directory - filename-of-generated-jar-file - false - - - - - ... - -+-----+ - - The generated jar file will be named by the value of the <<>> plus "-sources" if it is the main sources. Otherwise, - it would be <<>> plus "-test-sources" if it is the test sources. It will be generated in the specified - <<>>. The <<>> parameter specifies whether the java sources will be attached to the artifact list of - the project. diff --git a/src/site/apt/index.apt.vm b/src/site/apt/index.apt.vm deleted file mode 100644 index 4313308..0000000 --- a/src/site/apt/index.apt.vm +++ /dev/null @@ -1,83 +0,0 @@ - ------ - Introduction - ------ - Maria Odea Ching - ------ - 2013-07-22 - ------ - - ~~ Licensed to the Apache Software Foundation (ASF) under one - ~~ or more contributor license agreements. See the NOTICE file - ~~ distributed with this work for additional information - ~~ regarding copyright ownership. The ASF licenses this file - ~~ to you under the Apache License, Version 2.0 (the - ~~ "License"); you may not use this file except in compliance - ~~ with the License. You may obtain a copy of the License at - ~~ - ~~ http://www.apache.org/licenses/LICENSE-2.0 - ~~ - ~~ Unless required by applicable law or agreed to in writing, - ~~ software distributed under the License is distributed on an - ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - ~~ KIND, either express or implied. See the License for the - ~~ specific language governing permissions and limitations - ~~ under the License. - - ~~ NOTE: For help with the syntax of this file, see: - ~~ http://maven.apache.org/doxia/references/apt-format.html - -${project.name} - - The Source Plugin creates a jar archive of the source files of the current project. The jar file is, by default, - created in the project's target directory. - -* Important Hint - - Starting with version 3.0.0 of the plugin all properties which could be used via command line - have been named based on the following schema <>. Further details can be found - in the goal documentations. - -* Goals Overview - - The Source Plugin has five goals: - - * {{{./aggregate-mojo.html}source:aggregate}} aggregrates sources for all modules in an aggregator project. - - * {{{./jar-mojo.html}source:jar}} is used to bundle the main sources of the project into a jar archive. - - * {{{./test-jar-mojo.html}source:test-jar}} on the other hand, is used to bundle the test sources of the project into a - jar archive. - - * {{{./jar-no-fork-mojo.html}source:jar-no-fork}} is similar to <> but does not fork the build lifecycle. - - * {{{./test-jar-no-fork-mojo.html}source:test-jar-no-fork}} is similar to <> but does not fork the build lifecycle. - - [] - -* Usage - - General instructions on how to use the Source Plugin can be found on the {{{./usage.html}usage page}}. 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.html}FAQ}} and feel - free to contact the {{{./mailing-lists.html}user mailing list}}. 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 {{{./mailing-lists.html}mail archive}}. - - 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-management.html}issue tracker}}. 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 - {{{./scm.html}source repository}} and will find supplementary information in the - {{{http://maven.apache.org/guides/development/guide-helping.html}guide to helping with Maven}}. - -* Examples - - To provide you with better understanding on some usages of the Source plugin, you can take a look into the - following examples: - - * {{{./examples/configureplugin.html}Configuring Source Plugin}} - - [] - diff --git a/src/site/apt/usage.apt.vm b/src/site/apt/usage.apt.vm deleted file mode 100644 index 5976816..0000000 --- a/src/site/apt/usage.apt.vm +++ /dev/null @@ -1,117 +0,0 @@ - ------ - Usage - ------ - Maria Odea Ching - ------ - 11 July 2006 - ------ - -~~ Licensed to the Apache Software Foundation (ASF) under one -~~ or more contributor license agreements. See the NOTICE file -~~ distributed with this work for additional information -~~ regarding copyright ownership. The ASF licenses this file -~~ to you under the Apache License, Version 2.0 (the -~~ "License"); you may not use this file except in compliance -~~ with the License. You may obtain a copy of the License at -~~ -~~ http://www.apache.org/licenses/LICENSE-2.0 -~~ -~~ Unless required by applicable law or agreed to in writing, -~~ software distributed under the License is distributed on an -~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -~~ KIND, either express or implied. See the License for the -~~ specific language governing permissions and limitations -~~ under the License. - -~~ NOTE: For help with the syntax of this file, see: -~~ http://maven.apache.org/doxia/references/apt-format.html - -Usage - - The source plugin can be used to create a jar file of the project sources from the command line or by binding - the goal to the project's build lifecycle. To generate the jar from the command line, use the following command: - -+-----+ -mvn source:jar -+-----+ - - A jar file of the test sources can also be generated by executing: - -+-----+ -mvn source:test-jar -+-----+ - -*Installing the sources along with your artifact - - There are two ways to do this. You can either bind this plugin to a phase or - you can add it to a profile. The goals {{{./jar-no-fork-mojo.html}source:jar-no-fork}} and - {{{./test-jar-no-fork-mojo.html}source:test-jar-no-fork}} are preferred for binding - the goal to the build lifecycle. - -**Installing the sources using a phase binding - - Here is how you would configure the plugin in your <<>> to run - automatically during the phase: - -+-----+ - - ... - - - - org.apache.maven.plugins - maven-source-plugin - ${project.version} - - - attach-sources - verify - - jar-no-fork - - - - - - - ... - -+-----+ - - We are using the phase here because it is the phase that comes - before the phase, thus making sure that the sources jar has been - created <> the install takes place. - -**Installing the sources using a profile - - If you want to install a jar of your sources along with your artifact during - the release process, you can add this to your <<>> file: - -+-----+ - - ... - - - release - - - - org.apache.maven.plugins - maven-source-plugin - ${project.version} - - - attach-sources - - jar-no-fork - - - - - - - - - ... - -+-----+ diff --git a/src/site/markdown/examples/configureplugin.md.vm b/src/site/markdown/examples/configureplugin.md.vm new file mode 100644 index 0000000..3a689d0 --- /dev/null +++ b/src/site/markdown/examples/configureplugin.md.vm @@ -0,0 +1,45 @@ + + +# Configuring Source Plugin + +To customize the plugin, you can change its configuration parameters in your POM, as shown below: + +```xml + + ... + + + + org.apache.maven.plugins + maven-source-plugin + ${project.version} + + /absolute/path/to/the/output/directory + filename-of-generated-jar-file + false + + + + + ... + +``` + +The generated jar file will be named by the value of the `finalName` plus "-sources" if it is the main sources. Otherwise, it would be `finalName` plus "-test-sources" if it is the test sources. It will be generated in the specified `outputDirectory`. The `attach` parameter specifies whether the java sources will be attached to the artifact list of the project. diff --git a/src/site/markdown/index.md b/src/site/markdown/index.md new file mode 100644 index 0000000..f7951dd --- /dev/null +++ b/src/site/markdown/index.md @@ -0,0 +1,48 @@ + + +# Apache Maven Source Plugin +The Source Plugin creates a jar archive of the source files of the current project. The jar file is, by default, created in the project's target directory. + +## Important Hint + +Starting with version 3.0.0 of the plugin all properties which could be used via command line have been named based on the following schema **maven.source.\***. Further details can be found in the goal documentations. + +## Goals Overview + +The Source Plugin has five goals: + +- [source:aggregate](./aggregate-mojo.html) aggregrates sources for all modules in an aggregator project. +- [source:jar](./jar-mojo.html) is used to bundle the main sources of the project into a jar archive. +- [source:test-jar](./test-jar-mojo.html) on the other hand, is used to bundle the test sources of the project into a jar archive. +- [source:jar-no-fork](./jar-no-fork-mojo.html) is similar to **jar** but does not fork the build lifecycle. +- [source:test-jar-no-fork](./test-jar-no-fork-mojo.html) is similar to **test-jar** but does not fork the build lifecycle. +## Usage + +General instructions on how to use the Source 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). + +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](http://maven.apache.org/guides/development/guide-helping.html). + +## Examples + +To provide you with better understanding on some usages of the Source plugin, you can take a look into the following examples: + +- [Configuring Source Plugin](./examples/configureplugin.html) diff --git a/src/site/markdown/usage.md.vm b/src/site/markdown/usage.md.vm new file mode 100644 index 0000000..450aba7 --- /dev/null +++ b/src/site/markdown/usage.md.vm @@ -0,0 +1,101 @@ + + +# Usage + +The source plugin can be used to create a jar file of the project sources from the command line or by binding the goal to the project's build lifecycle. To generate the jar from the command line, use the following command: + +```shell +mvn source:jar +``` + +A jar file of the test sources can also be generated by executing: + +```shell +mvn source:test-jar +``` + +Installing the sources along with your artifact +----------------------------------------------- + +There are two ways to do this. You can either bind this plugin to a phase or you can add it to a profile. The goals [source:jar-no-fork](./jar-no-fork-mojo.html) and [source:test-jar-no-fork](./test-jar-no-fork-mojo.html) are preferred for binding the goal to the build lifecycle. + +#[[### Installing the sources using a phase binding]]# + +Here is how you would configure the plugin in your `pom.xml` to run automatically during the _verify_ phase: + +```xml + + ... + + + + org.apache.maven.plugins + maven-source-plugin + ${project.version} + + + attach-sources + verify + + jar-no-fork + + + + + + + ... + +``` + +We are using the _verify_ phase here because it is the phase that comes before the _install_ phase, thus making sure that the sources jar has been created **before** the install takes place. + +#[[### Installing the sources using a profile]]# + +If you want to install a jar of your sources along with your artifact during the release process, you can add this to your `pom.xml` file: + +```xml + + ... + + + release + + + + org.apache.maven.plugins + maven-source-plugin + ${project.version} + + + attach-sources + + jar-no-fork + + + + + + + + + ... + +```