diff --git a/src/site/apt/index.apt.vm b/src/site/apt/index.apt.vm deleted file mode 100644 index be96b86..0000000 --- a/src/site/apt/index.apt.vm +++ /dev/null @@ -1,57 +0,0 @@ - ------ - Introduction - ------ - Dennis Lundberg - ------ - 2015-01-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. - -${project.name} - - This is a collection of templates that are specific to the Maven project. They - are probably not of interest to projects other than Apache Maven. - - Below you will find a listing of the resources that can be found in the - current version (${project.version}) of Maven Shared Resources. They are - listed by which plugin they are meant to be used with. - -* Maven Checkstyle Plugin - -** <<>> - - This is a license header template that can be used by Maven Checkstyle Plugin - to verify that all files are using this license header. - -** {{{./maven_checks.html}<<>>}} - - This is a Checkstyle configuration file for - {{{/developers/conventions/code.html}Maven coding conventions}} that can be - used in Maven Checkstyle Plugin. - -* IntelliJ IDEA code formater - -** <<>> - - This is IntelliJ IDEA code formater which can be imported into IDE. - -* Usage - - General instructions on how to use the Maven Shared Resources can be found on - the {{{./usage.html}usage page}}. diff --git a/src/site/apt/maven_checks.apt.vm b/src/site/apt/maven_checks.apt.vm deleted file mode 100644 index 098a95e..0000000 --- a/src/site/apt/maven_checks.apt.vm +++ /dev/null @@ -1,36 +0,0 @@ - ------ - config/maven_checks.xml - ------ - Hervé Boutemy - ------ - 2015-01-18 - ------ - -~~ 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 - - -<<>> - - This is a predefined ruleset for - {{{/developers/conventions/code.html}Maven coding conventions}} that can be - used in Maven Checkstyle Plugin: - -%{snippet|file=${project.basedir}/src/main/resources/config/maven_checks.xml} diff --git a/src/site/apt/usage.apt.vm b/src/site/apt/usage.apt.vm deleted file mode 100644 index 250b4bd..0000000 --- a/src/site/apt/usage.apt.vm +++ /dev/null @@ -1,110 +0,0 @@ - ------ - Usage - ------ - Dennis Lundberg - ------ - 2011-05-01 - ------ - -~~ 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. - -Usage - - There are a couple of things you need to do to use Maven Shared Resources. First - you need to give the plugin that will use the resources access to them. After - that you configure the plugin to actually use the resources. - - -* Add the resources to the plugin - - First you add maven-shared-resources as a dependency to a plugin in your - <<>>. This is done to give the plugin access to the resources within - the maven-shared-resources JAR file. In this example we will use the resources - in Maven Checkstyle Plugin. - -+----------+ - - ... - - - - org.apache.maven.plugins - maven-checkstyle-plugin - 3.2.0 - - ... - - - - ${project.groupId} - ${project.artifactId} - ${project.version} - - - - ... - - - - - ... - -+----------+ - - -* Configure the plugin to use the resources - - Now you can use the resources in the plugin. You can use them as if they - existed in your own project, like this: - -+----------+ - - ... - - - - org.apache.maven.plugins - maven-checkstyle-plugin - 3.2.0 - - config/maven_checks.xml - config/maven-header.txt - - - ... - - - ... - - - - - ... - -+----------+ - - -* Execute the plugin - - All is now set up to make use of the resources in the plugin for your project. - Execute the plugin like you would normally do, to see the resources put to - practical use. - -+----------+ -mvn checkstyle:check -+----------+ diff --git a/src/site/markdown/index.md.vm b/src/site/markdown/index.md.vm new file mode 100644 index 0000000..1476f30 --- /dev/null +++ b/src/site/markdown/index.md.vm @@ -0,0 +1,47 @@ + + +# ${project.name} + +This is a collection of templates that are specific to the Maven project. They are probably not of interest to projects other than Apache Maven. + +Below you will find a listing of the resources that can be found in the current version (${project.version}) of Maven Shared Resources. They are listed by which plugin they are meant to be used with. + +Maven Checkstyle Plugin +----------------------- + +#[[### `config/maven-header.txt`]]# + +This is a license header template that can be used by Maven Checkstyle Plugin to verify that all files are using this license header. + +#[[### [`config/maven_checks.xml`](./maven_checks.html)]]# + +This is a Checkstyle configuration file for [Maven coding conventions](/developers/conventions/code.html) that can be used in Maven Checkstyle Plugin. + +IntelliJ IDEA code formater +--------------------------- + +#[[### `config/maven-idea-codestyle-2022.xml`]]# + +This is IntelliJ IDEA code formater which can be imported into IDE. + +Usage +----- + +General instructions on how to use the Maven Shared Resources can be found on the [usage page](./usage.html). diff --git a/src/site/markdown/maven_checks.md.vm b/src/site/markdown/maven_checks.md.vm new file mode 100644 index 0000000..d2ab2d0 --- /dev/null +++ b/src/site/markdown/maven_checks.md.vm @@ -0,0 +1,24 @@ + + +# `config/maven_checks.xml` + +This is a predefined ruleset for [Maven coding conventions](/developers/conventions/code.html) that can be used in Maven Checkstyle Plugin: + + diff --git a/src/site/markdown/usage.md.vm b/src/site/markdown/usage.md.vm new file mode 100644 index 0000000..20e014d --- /dev/null +++ b/src/site/markdown/usage.md.vm @@ -0,0 +1,96 @@ + + +# Usage + +There are a couple of things you need to do to use Maven Shared Resources. First you need to give the plugin that will use the resources access to them. After that you configure the plugin to actually use the resources. + +Add the resources to the plugin +------------------------------- + +First you add maven-shared-resources as a dependency to a plugin in your `pom.xml`. This is done to give the plugin access to the resources within the maven-shared-resources JAR file. In this example we will use the resources in Maven Checkstyle Plugin. + +```xml + + ... + + + + org.apache.maven.plugins + maven-checkstyle-plugin + 3.2.0 + + ... + + + + ${project.groupId} + ${project.artifactId} + ${project.version} + + + + ... + + + + + ... + +``` + +Configure the plugin to use the resources +----------------------------------------- + +Now you can use the resources in the plugin. You can use them as if they existed in your own project, like this: + +```xml + + ... + + + + org.apache.maven.plugins + maven-checkstyle-plugin + 3.2.0 + + config/maven_checks.xml + config/maven-header.txt + + + ... + + + ... + + + + + ... + +``` + +Execute the plugin +------------------ + +All is now set up to make use of the resources in the plugin for your project. Execute the plugin like you would normally do, to see the resources put to practical use. + +```shell +mvn checkstyle:check +```