You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mk...@apache.org on 2007/10/17 21:12:53 UTC
svn commit: r585636 - in /maven/plugins/trunk/maven-toolchains-plugin: ./
src/site/ src/site/apt/ src/site/apt/index.apt src/site/apt/toolchains/
src/site/apt/toolchains/index.apt src/site/apt/toolchains/jdk.apt
src/site/apt/usage.apt src/site/site.xml
Author: mkleint
Date: Wed Oct 17 12:12:52 2007
New Revision: 585636
URL: http://svn.apache.org/viewvc?rev=585636&view=rev
Log:
initial batc of documentation to toolchains-plugin
Added:
maven/plugins/trunk/maven-toolchains-plugin/src/site/
maven/plugins/trunk/maven-toolchains-plugin/src/site/apt/
maven/plugins/trunk/maven-toolchains-plugin/src/site/apt/index.apt
maven/plugins/trunk/maven-toolchains-plugin/src/site/apt/toolchains/
maven/plugins/trunk/maven-toolchains-plugin/src/site/apt/toolchains/index.apt
maven/plugins/trunk/maven-toolchains-plugin/src/site/apt/toolchains/jdk.apt
maven/plugins/trunk/maven-toolchains-plugin/src/site/apt/usage.apt
maven/plugins/trunk/maven-toolchains-plugin/src/site/site.xml
Modified:
maven/plugins/trunk/maven-toolchains-plugin/ (props changed)
Propchange: maven/plugins/trunk/maven-toolchains-plugin/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Oct 17 12:12:52 2007
@@ -0,0 +1,2 @@
+nbproject
+target
Added: maven/plugins/trunk/maven-toolchains-plugin/src/site/apt/index.apt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-toolchains-plugin/src/site/apt/index.apt?rev=585636&view=auto
==============================================================================
--- maven/plugins/trunk/maven-toolchains-plugin/src/site/apt/index.apt (added)
+++ maven/plugins/trunk/maven-toolchains-plugin/src/site/apt/index.apt Wed Oct 17 12:12:52 2007
@@ -0,0 +1,43 @@
+~~ 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.
+
+ ------
+ Introduction
+ ------
+ Milos Kleint
+ ------
+ Oct 2007
+ ------
+
+Maven Toolchains Plugin
+
+ The Toolchains Plugins allows to share configuration across plugins. For example to make sure the plugins like compiler, surefire, javadoc, webstart etc. all use the same JDK for execution.
+Similarly to maven-enforcer-plugin, it allows to control enviromental constraints in the build.
+
+* Goals Overview
+
+ The Toolchains plugin has one goal:
+
+ *{{{toolchain-mojo.html}toolchain:toolchain}} The goal is typically to be attached to the "validate" phase of default lifecycle.
+
+
+* Usage
+
+ Instructions on how to use the toolchains plugin can be found {{{usage.html}here}}.
+
+
+
Added: maven/plugins/trunk/maven-toolchains-plugin/src/site/apt/toolchains/index.apt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-toolchains-plugin/src/site/apt/toolchains/index.apt?rev=585636&view=auto
==============================================================================
--- maven/plugins/trunk/maven-toolchains-plugin/src/site/apt/toolchains/index.apt (added)
+++ maven/plugins/trunk/maven-toolchains-plugin/src/site/apt/toolchains/index.apt Wed Oct 17 12:12:52 2007
@@ -0,0 +1,35 @@
+~~ 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.
+
+ ------
+ Standard Toolchains
+ ------
+ Milos Kleint
+ ------
+ Oct 2007
+ ------
+
+Standard Toolchains
+
+ The following standard toolchains are included by default with Maven.
+
+
+ * {{{jdk.html}JDK}} - Defines the Java Development Kit location and identification
+
+
+ []
+ You may also create and use your own custom toolchains by following the {{{http://maven.apache.org/}TBD}} instructions.
Added: maven/plugins/trunk/maven-toolchains-plugin/src/site/apt/toolchains/jdk.apt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-toolchains-plugin/src/site/apt/toolchains/jdk.apt?rev=585636&view=auto
==============================================================================
--- maven/plugins/trunk/maven-toolchains-plugin/src/site/apt/toolchains/jdk.apt (added)
+++ maven/plugins/trunk/maven-toolchains-plugin/src/site/apt/toolchains/jdk.apt Wed Oct 17 12:12:52 2007
@@ -0,0 +1,106 @@
+~~ 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.
+
+ ------
+ JDK Toolchain
+ ------
+ Milos Kleint
+ ------
+ October 2007
+ ------
+
+Toolchain Identification
+
+ The toolchain type id is "jdk".
+
+ Predefined identification tokens are:
+
+ * "version" marks the version of the jdk. Plugin can match against a single version or any version ranges.
+
+ * any other tokens will be accepted, but only exact matches are supported.
+
+Toolchain Configuration
+
+ There is only one configuration element named "jdkHome". It designates the root directory
+of JDK installation.
+
+
+Sample toolchains.xml Setup
+
++---+
+<toolchains>
+ <toolchain>
+ <type>jdk</type>
+ <provides>
+ <version>1.5</version>
+ <vendor>sun</vendor>
+ <id>for_mevenide</id>
+ </provides>
+ <configuration>
+ <jdkHome>/home/mkleint/javatools/jdk</jdkHome>
+ </configuration>
+ </toolchain>
+ [...]
+</toolchains>
++---+
+
+
+Plugin Configuration
+
+ For selection of toolchain for use by the project the following conditions are matched
+against the definitions in the toolchains.xml file.
+
+ * "version" which accepts any {{{http://maven.apache.org/plugins/maven-enforcer-plugin/rules/versionRanges.html}version range definitions}}.
+ Version declared by the toolchain needs to fit into the range.
+
+ * any other tokens needs exact match. Toolchain not providing such token will not be selected.
+
+ All conditions need to be satisfied in a sucessfully matched toolchain.
+
+
+Sample Plugin Configuration:
+
++---+
+<project>
+ [...]
+ <plugins>
+ <build>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-toolchains-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>validate</phase>
+ <goals>
+ <goal>toolchain</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <toolchains>
+ <jdk>
+ <version>[1.5,)</version>
+ </jdk>
+ </toolchains>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ [...]
+</project>
++---+
+
\ No newline at end of file
Added: maven/plugins/trunk/maven-toolchains-plugin/src/site/apt/usage.apt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-toolchains-plugin/src/site/apt/usage.apt?rev=585636&view=auto
==============================================================================
--- maven/plugins/trunk/maven-toolchains-plugin/src/site/apt/usage.apt (added)
+++ maven/plugins/trunk/maven-toolchains-plugin/src/site/apt/usage.apt Wed Oct 17 12:12:52 2007
@@ -0,0 +1,62 @@
+~~ 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
+ ------
+ Milos Kleint
+ ------
+ Oct 2007
+ ------
+
+Usage
+
+ Brief examples on how to use the toolchains plugin.
+
+* Generic Plugin configuration information
+
+ See the following links for information about including and configuring plugins in your project:
+
+ *{{{http://maven.apache.org/guides/mini/guide-configuring-plugins.html}Configuring Plugins}}
+
+ *{{{http://maven.apache.org/guides/plugin/guide-java-plugin-development.html}Plugin Development}}
+
+ *{{{http://maven.apache.org/guides/introduction/introduction-to-plugin-prefix-mapping.html}Plugin Prefix}}
+
+ []
+
+* What is a toolchain?
+
+ Toolchain is a preconfigured object that maven plugins can ask for tool location and other information.
+The toolchains-plugin can read the persisted toolchains on the user's computer
+and match it against the toolchain requirements of the project (as configured in pom.xml)
+If match is found, the toolchain instance is made available to other maven plugins.
+That way all plugins can use the same JDK instance for example without hardcoding absolute paths into the pom.xml
+and without configuring all plugins that require path to JDK tools.
+
+
+* The <<<toolchains:toolchain>>> mojo
+
+ This goal are meant to be bound to a lifecycle phase and configured in your
+ <<<pom.xml>>>. In order to function properly it shall be the first phase in the lifecycle, eg. the "validate" phase.
+
+ The available standard toolchains are described {{{toolchains/index.html}here}}.
+
+
+ []
+
+
\ No newline at end of file
Added: maven/plugins/trunk/maven-toolchains-plugin/src/site/site.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-toolchains-plugin/src/site/site.xml?rev=585636&view=auto
==============================================================================
--- maven/plugins/trunk/maven-toolchains-plugin/src/site/site.xml (added)
+++ maven/plugins/trunk/maven-toolchains-plugin/src/site/site.xml Wed Oct 17 12:12:52 2007
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ * 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>
+ <body>
+ <menu name="Overview">
+ <item name="Introduction" href="index.html"/>
+ <item name="Goals" href="plugin-info.html"/>
+ <item name="Usage" href="usage.html"/>
+ <item name="FAQ" href="faq.html"/>
+ <item name="Standard Toolchains" href="toolchains/index.html"/>
+ </menu>
+ <menu name="Custom Toolchains">
+ <item name="Writing a custom toolchain TBD" href="http://maven.apache.org/"/>
+ </menu>
+ <menu name="Resources">
+ <item name="Maven 2.0.x Version Range Syntax" href="http://maven.apache.org/plugins/maven-enforcer-plugin/rules/versionRanges.html" />
+ </menu>
+ </body>
+</project>