Return-Path: Delivered-To: apmail-maven-commits-archive@www.apache.org Received: (qmail 82703 invoked from network); 10 Mar 2008 23:34:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Mar 2008 23:34:05 -0000 Received: (qmail 28166 invoked by uid 500); 10 Mar 2008 23:34:02 -0000 Delivered-To: apmail-maven-commits-archive@maven.apache.org Received: (qmail 28113 invoked by uid 500); 10 Mar 2008 23:34:02 -0000 Mailing-List: contact commits-help@maven.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@maven.apache.org Delivered-To: mailing list commits@maven.apache.org Received: (qmail 28100 invoked by uid 99); 10 Mar 2008 23:34:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Mar 2008 16:34:02 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Mar 2008 23:33:33 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 0AFE21A9832; Mon, 10 Mar 2008 16:33:44 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r635761 - in /maven/shared/trunk/maven-model-converter/src/site: ./ apt/ apt/index.apt site.xml Date: Mon, 10 Mar 2008 23:33:43 -0000 To: commits@maven.apache.org From: dennisl@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080310233344.0AFE21A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: dennisl Date: Mon Mar 10 16:33:41 2008 New Revision: 635761 URL: http://svn.apache.org/viewvc?rev=635761&view=rev Log: o Add a site. Added: maven/shared/trunk/maven-model-converter/src/site/ maven/shared/trunk/maven-model-converter/src/site/apt/ maven/shared/trunk/maven-model-converter/src/site/apt/index.apt (with props) maven/shared/trunk/maven-model-converter/src/site/site.xml (with props) Added: maven/shared/trunk/maven-model-converter/src/site/apt/index.apt URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-model-converter/src/site/apt/index.apt?rev=635761&view=auto ============================================================================== --- maven/shared/trunk/maven-model-converter/src/site/apt/index.apt (added) +++ maven/shared/trunk/maven-model-converter/src/site/apt/index.apt Mon Mar 10 16:33:41 2008 @@ -0,0 +1,78 @@ + ------ + Introduction + ------ + Dennis Lundberg + ------ + 2008-03-11 + ------ + + ~~ 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 + + +Maven Model Converter + + This shared component is used to convert Maven POMs between version 3 + (used by Maven 1.x) and version 4 (used by Maven 2.0). It is used by + {{{http://maven.apache.org/plugins/maven-one-plugin/}maven-one-plugin}} and + {{{http://maven.apache.org/archiva/}Archiva}}. + + Apart from the main conversion of the different elements in the pom, there + are a couple of extensions to handle plugins and their configurations. + Which plugins are avaliable and how they are configured is not specified in + the xml schema for version 4 POMs. The schema only has generic definitions + for plugins and it allows them to have a configuration. + + +* Plugin Configuration Converters + + In Maven 1 a plugin is configured in the file <<>>. In + Maven 2 on the other hand the configuration is done with xml elements within + the plugin's <<<\>>> element. The conversion between the two + is handled by Plexus components that implement the + <<>> + interface. + + This interface has one main method <<>> that takes + a Maven 1 model, a Maven 2 model and a Maven 1 <<>> object as + parameters. If you want to add a new plugin configuration converter it is + recommended that you extend <<>>. Have + a look at some of + {{{https://svn.apache.org/repos/asf/maven/shared/trunk/maven-model-converter/src/main/java/org/apache/maven/model/converter/plugins/}the other implementations}} + to get a feel for what is needed. You basically need to implement the method + <<>> to build a DOM configuration object. + + +* Plugin Relocators + + Another thing that needs to be taken care of, is that the plugins in Maven 2 + are not the same as they were in Maven 1. Some have changed names while + others have moved to other projects completely. This relocation of plugins is + handled by Plexus components that implement the + <<>> + interface. + + If you want to implement a new relocator you can extend the class + <<>> to make your work easier. You simply need to + specify the old and new groupId and artifactId. Read the + {{{apidocs/org/apache/maven/model/converter/relocators/AbstractPluginRelocator.html}Javadocs}} + for some important notes. You can also save yourself some work by studying + {{{https://svn.apache.org/repos/asf/maven/shared/trunk/maven-model-converter/src/main/java/org/apache/maven/model/converter/relocators/}the other implementations}} + and picking the best from them. Propchange: maven/shared/trunk/maven-model-converter/src/site/apt/index.apt ------------------------------------------------------------------------------ svn:eol-style = native Added: maven/shared/trunk/maven-model-converter/src/site/site.xml URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-model-converter/src/site/site.xml?rev=635761&view=auto ============================================================================== --- maven/shared/trunk/maven-model-converter/src/site/site.xml (added) +++ maven/shared/trunk/maven-model-converter/src/site/site.xml Mon Mar 10 16:33:41 2008 @@ -0,0 +1,26 @@ + + + + + + + + + Propchange: maven/shared/trunk/maven-model-converter/src/site/site.xml ------------------------------------------------------------------------------ svn:eol-style = native