You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ev...@apache.org on 2006/08/22 16:57:03 UTC

svn commit: r433654 [3/4] - in /maven/shared/trunk/maven-model-converter: ./ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/maven/ src/main/java/org/apache/maven/model/ src/main/java/org/apache/maven...

Added: maven/shared/trunk/maven-model-converter/src/main/java/org/apache/maven/model/converter/relocators/JdiffPluginRelocator.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-model-converter/src/main/java/org/apache/maven/model/converter/relocators/JdiffPluginRelocator.java?rev=433654&view=auto
==============================================================================
--- maven/shared/trunk/maven-model-converter/src/main/java/org/apache/maven/model/converter/relocators/JdiffPluginRelocator.java (added)
+++ maven/shared/trunk/maven-model-converter/src/main/java/org/apache/maven/model/converter/relocators/JdiffPluginRelocator.java Tue Aug 22 07:56:59 2006
@@ -0,0 +1,52 @@
+package org.apache.maven.model.converter.relocators;
+
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+/**
+ * A <code>PluginRelocator</code> for the maven-jdiff-plugin.
+ *
+ * @author Dennis Lundberg
+ * @version $Id$
+ * @plexus.component role="org.apache.maven.model.converter.relocators.PluginRelocator"
+ * role-hint="jdiff"
+ */
+public class JdiffPluginRelocator extends AbstractPluginRelocator
+{
+    /**
+     * @see AbstractPluginRelocator#getNewArtifactId()
+     */
+    public String getNewArtifactId()
+    {
+        return "jdiff-maven-plugin";
+    }
+
+    /**
+     * @see AbstractPluginRelocator#getNewGroupId()
+     */
+    public String getNewGroupId()
+    {
+        return "org.codehaus.mojo";
+    }
+
+    /**
+     * @see AbstractPluginRelocator#getOldArtifactId()
+     */
+    public String getOldArtifactId()
+    {
+        return "maven-jdiff-plugin";
+    }
+}

Propchange: maven/shared/trunk/maven-model-converter/src/main/java/org/apache/maven/model/converter/relocators/JdiffPluginRelocator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/shared/trunk/maven-model-converter/src/main/java/org/apache/maven/model/converter/relocators/JdiffPluginRelocator.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/shared/trunk/maven-model-converter/src/main/java/org/apache/maven/model/converter/relocators/JunitReportPluginRelocator.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-model-converter/src/main/java/org/apache/maven/model/converter/relocators/JunitReportPluginRelocator.java?rev=433654&view=auto
==============================================================================
--- maven/shared/trunk/maven-model-converter/src/main/java/org/apache/maven/model/converter/relocators/JunitReportPluginRelocator.java (added)
+++ maven/shared/trunk/maven-model-converter/src/main/java/org/apache/maven/model/converter/relocators/JunitReportPluginRelocator.java Tue Aug 22 07:56:59 2006
@@ -0,0 +1,52 @@
+package org.apache.maven.model.converter.relocators;
+
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+/**
+ * A <code>PluginRelocator</code> for the maven-junit-report-plugin.
+ *
+ * @author Dennis Lundberg
+ * @version $Id$
+ * @plexus.component role="org.apache.maven.model.converter.relocators.PluginRelocator"
+ * role-hint="junit-report"
+ */
+public class JunitReportPluginRelocator extends AbstractPluginRelocator
+{
+    /**
+     * @see org.apache.maven.model.converter.relocators.AbstractPluginRelocator#getNewArtifactId()
+     */
+    public String getNewArtifactId()
+    {
+        return "maven-surefire-report-plugin";
+    }
+
+    /**
+     * @see org.apache.maven.model.converter.relocators.AbstractPluginRelocator#getNewGroupId()
+     */
+    public String getNewGroupId()
+    {
+        return "org.apache.maven.plugins";
+    }
+
+    /**
+     * @see org.apache.maven.model.converter.relocators.AbstractPluginRelocator#getOldArtifactId()
+     */
+    public String getOldArtifactId()
+    {
+        return "maven-junit-report-plugin";
+    }
+}

Propchange: maven/shared/trunk/maven-model-converter/src/main/java/org/apache/maven/model/converter/relocators/JunitReportPluginRelocator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/shared/trunk/maven-model-converter/src/main/java/org/apache/maven/model/converter/relocators/JunitReportPluginRelocator.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/shared/trunk/maven-model-converter/src/main/java/org/apache/maven/model/converter/relocators/LicenseRelocator.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-model-converter/src/main/java/org/apache/maven/model/converter/relocators/LicenseRelocator.java?rev=433654&view=auto
==============================================================================
--- maven/shared/trunk/maven-model-converter/src/main/java/org/apache/maven/model/converter/relocators/LicenseRelocator.java (added)
+++ maven/shared/trunk/maven-model-converter/src/main/java/org/apache/maven/model/converter/relocators/LicenseRelocator.java Tue Aug 22 07:56:59 2006
@@ -0,0 +1,52 @@
+package org.apache.maven.model.converter.relocators;
+
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+/**
+ * A <code>PluginRelocator</code> for the maven-license-plugin.
+ *
+ * @author Dennis Lundberg
+ * @version $Id$
+ * @plexus.component role="org.apache.maven.model.converter.relocators.PluginRelocator"
+ * role-hint="license"
+ */
+public class LicenseRelocator extends AbstractPluginRelocator
+{
+    /**
+     * @see org.apache.maven.model.converter.relocators.AbstractPluginRelocator#getNewArtifactId()
+     */
+    public String getNewArtifactId()
+    {
+        return null;
+    }
+
+    /**
+     * @see org.apache.maven.model.converter.relocators.AbstractPluginRelocator#getNewGroupId()
+     */
+    public String getNewGroupId()
+    {
+        return null;
+    }
+
+    /**
+     * @see org.apache.maven.model.converter.relocators.AbstractPluginRelocator#getOldArtifactId()
+     */
+    public String getOldArtifactId()
+    {
+        return "maven-license-plugin";
+    }
+}

Propchange: maven/shared/trunk/maven-model-converter/src/main/java/org/apache/maven/model/converter/relocators/LicenseRelocator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/shared/trunk/maven-model-converter/src/main/java/org/apache/maven/model/converter/relocators/LicenseRelocator.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/shared/trunk/maven-model-converter/src/main/java/org/apache/maven/model/converter/relocators/NoSuchPluginRelocatorException.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-model-converter/src/main/java/org/apache/maven/model/converter/relocators/NoSuchPluginRelocatorException.java?rev=433654&view=auto
==============================================================================
--- maven/shared/trunk/maven-model-converter/src/main/java/org/apache/maven/model/converter/relocators/NoSuchPluginRelocatorException.java (added)
+++ maven/shared/trunk/maven-model-converter/src/main/java/org/apache/maven/model/converter/relocators/NoSuchPluginRelocatorException.java Tue Aug 22 07:56:59 2006
@@ -0,0 +1,38 @@
+package org.apache.maven.model.converter.relocators;
+
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+/**
+ * @author Dennis Lundberg
+ * @version $Id$
+ */
+public class NoSuchPluginRelocatorException extends Exception
+{
+    private final String pluginRelocatorId;
+
+    public NoSuchPluginRelocatorException( String pluginRelocatorId )
+    {
+        super( "No such plugin relocator '" + pluginRelocatorId + "'." );
+
+        this.pluginRelocatorId = pluginRelocatorId;
+    }
+
+    public String getPluginRelocatorId()
+    {
+        return pluginRelocatorId;
+    }
+}

Propchange: maven/shared/trunk/maven-model-converter/src/main/java/org/apache/maven/model/converter/relocators/NoSuchPluginRelocatorException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/shared/trunk/maven-model-converter/src/main/java/org/apache/maven/model/converter/relocators/NoSuchPluginRelocatorException.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/shared/trunk/maven-model-converter/src/main/java/org/apache/maven/model/converter/relocators/PluginRelocator.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-model-converter/src/main/java/org/apache/maven/model/converter/relocators/PluginRelocator.java?rev=433654&view=auto
==============================================================================
--- maven/shared/trunk/maven-model-converter/src/main/java/org/apache/maven/model/converter/relocators/PluginRelocator.java (added)
+++ maven/shared/trunk/maven-model-converter/src/main/java/org/apache/maven/model/converter/relocators/PluginRelocator.java Tue Aug 22 07:56:59 2006
@@ -0,0 +1,56 @@
+package org.apache.maven.model.converter.relocators;
+
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+import org.apache.maven.model.Model;
+import org.apache.maven.model.converter.ConverterListener;
+
+import java.util.List;
+
+/**
+ * A plugin relocator handles a plugin that has changed its groupId and/or
+ * artifactId between the Maven 1 version and the Maven 2 version. It changes
+ * the appropriate values in the v4 pom.
+ *
+ * @author Dennis Lundberg
+ * @version $Id$
+ */
+public interface PluginRelocator
+{
+    String ROLE = PluginRelocator.class.getName();
+
+    /**
+     * Relocate a plugin from one groupId/artifactId to another.
+     *
+     * @param v4Model The model where we look for the plugin
+     */
+    void relocate( Model v4Model );
+
+    /**
+     * Add a listener for all messages sended by the relocator.
+     *
+     * @param listener The listener that will receive messages
+     */
+    void addListener( ConverterListener listener );
+
+    /**
+     * Add a listeners list for all messages sended by the relocator.
+     *
+     * @param listeners The listeners list that will receive messages
+     */
+    void addListeners( List listeners );
+}

Propchange: maven/shared/trunk/maven-model-converter/src/main/java/org/apache/maven/model/converter/relocators/PluginRelocator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/shared/trunk/maven-model-converter/src/main/java/org/apache/maven/model/converter/relocators/PluginRelocator.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/shared/trunk/maven-model-converter/src/main/java/org/apache/maven/model/converter/relocators/PluginRelocatorManager.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-model-converter/src/main/java/org/apache/maven/model/converter/relocators/PluginRelocatorManager.java?rev=433654&view=auto
==============================================================================
--- maven/shared/trunk/maven-model-converter/src/main/java/org/apache/maven/model/converter/relocators/PluginRelocatorManager.java (added)
+++ maven/shared/trunk/maven-model-converter/src/main/java/org/apache/maven/model/converter/relocators/PluginRelocatorManager.java Tue Aug 22 07:56:59 2006
@@ -0,0 +1,47 @@
+package org.apache.maven.model.converter.relocators;
+
+import java.util.Collection;
+
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+/**
+ * A manager for plugin relocators.
+ *
+ * @author Dennis Lundberg
+ * @version $Id$
+ */
+public interface PluginRelocatorManager
+{
+    String ROLE = PluginRelocatorManager.class.getName();
+
+    /**
+     * Get a named plugin relocator.
+     *
+     * @param pluginRelocatorId The role-hint for the plexus component
+     * @return The named plugin relocator
+     * @throws NoSuchPluginRelocatorException If the named plugin relocator can not be found
+     */
+    PluginRelocator getPluginRelocator( String pluginRelocatorId )
+        throws NoSuchPluginRelocatorException;
+
+    /**
+     * Get all available plugin relocators.
+     *
+     * @return A <code>Collection</code> of <code>PluginRelocator</code> objects
+     */
+    Collection getPluginRelocators();
+}

Propchange: maven/shared/trunk/maven-model-converter/src/main/java/org/apache/maven/model/converter/relocators/PluginRelocatorManager.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/shared/trunk/maven-model-converter/src/main/java/org/apache/maven/model/converter/relocators/PluginRelocatorManager.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/shared/trunk/maven-model-converter/src/main/java/org/apache/maven/model/converter/relocators/SimianPluginRelocator.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-model-converter/src/main/java/org/apache/maven/model/converter/relocators/SimianPluginRelocator.java?rev=433654&view=auto
==============================================================================
--- maven/shared/trunk/maven-model-converter/src/main/java/org/apache/maven/model/converter/relocators/SimianPluginRelocator.java (added)
+++ maven/shared/trunk/maven-model-converter/src/main/java/org/apache/maven/model/converter/relocators/SimianPluginRelocator.java Tue Aug 22 07:56:59 2006
@@ -0,0 +1,52 @@
+package org.apache.maven.model.converter.relocators;
+
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+/**
+ * A <code>PluginRelocator</code> for the maven-simian-plugin.
+ *
+ * @author Dennis Lundberg
+ * @version $Id$
+ * @plexus.component role="org.apache.maven.model.converter.relocators.PluginRelocator"
+ * role-hint="simian"
+ */
+public class SimianPluginRelocator extends AbstractPluginRelocator
+{
+    /**
+     * @see AbstractPluginRelocator#getNewArtifactId()
+     */
+    public String getNewArtifactId()
+    {
+        return "simian-maven-plugin";
+    }
+
+    /**
+     * @see AbstractPluginRelocator#getNewGroupId()
+     */
+    public String getNewGroupId()
+    {
+        return "org.codehaus.mojo";
+    }
+
+    /**
+     * @see AbstractPluginRelocator#getOldArtifactId()
+     */
+    public String getOldArtifactId()
+    {
+        return "maven-simian-plugin";
+    }
+}

Propchange: maven/shared/trunk/maven-model-converter/src/main/java/org/apache/maven/model/converter/relocators/SimianPluginRelocator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/shared/trunk/maven-model-converter/src/main/java/org/apache/maven/model/converter/relocators/SimianPluginRelocator.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/shared/trunk/maven-model-converter/src/main/java/org/apache/maven/model/converter/relocators/TasklistPluginRelocator.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-model-converter/src/main/java/org/apache/maven/model/converter/relocators/TasklistPluginRelocator.java?rev=433654&view=auto
==============================================================================
--- maven/shared/trunk/maven-model-converter/src/main/java/org/apache/maven/model/converter/relocators/TasklistPluginRelocator.java (added)
+++ maven/shared/trunk/maven-model-converter/src/main/java/org/apache/maven/model/converter/relocators/TasklistPluginRelocator.java Tue Aug 22 07:56:59 2006
@@ -0,0 +1,52 @@
+package org.apache.maven.model.converter.relocators;
+
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+/**
+ * A <code>PluginRelocator</code> for the maven-tasklist-plugin.
+ *
+ * @author Dennis Lundberg
+ * @version $Id$
+ * @plexus.component role="org.apache.maven.model.converter.relocators.PluginRelocator"
+ * role-hint="tasklist"
+ */
+public class TasklistPluginRelocator extends AbstractPluginRelocator
+{
+    /**
+     * @see AbstractPluginRelocator#getNewArtifactId()
+     */
+    public String getNewArtifactId()
+    {
+        return "taglist-maven-plugin";
+    }
+
+    /**
+     * @see AbstractPluginRelocator#getNewGroupId()
+     */
+    public String getNewGroupId()
+    {
+        return "org.codehaus.mojo";
+    }
+
+    /**
+     * @see AbstractPluginRelocator#getOldArtifactId()
+     */
+    public String getOldArtifactId()
+    {
+        return "maven-tasklist-plugin";
+    }
+}

Propchange: maven/shared/trunk/maven-model-converter/src/main/java/org/apache/maven/model/converter/relocators/TasklistPluginRelocator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/shared/trunk/maven-model-converter/src/main/java/org/apache/maven/model/converter/relocators/TasklistPluginRelocator.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/shared/trunk/maven-model-converter/src/main/java/org/apache/maven/model/converter/relocators/XdocPluginRelocator.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-model-converter/src/main/java/org/apache/maven/model/converter/relocators/XdocPluginRelocator.java?rev=433654&view=auto
==============================================================================
--- maven/shared/trunk/maven-model-converter/src/main/java/org/apache/maven/model/converter/relocators/XdocPluginRelocator.java (added)
+++ maven/shared/trunk/maven-model-converter/src/main/java/org/apache/maven/model/converter/relocators/XdocPluginRelocator.java Tue Aug 22 07:56:59 2006
@@ -0,0 +1,52 @@
+package org.apache.maven.model.converter.relocators;
+
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+/**
+ * A <code>PluginRelocator</code> for the maven-xdoc-plugin.
+ *
+ * @author Dennis Lundberg
+ * @version $Id$
+ * @plexus.component role="org.apache.maven.model.converter.relocators.PluginRelocator"
+ * role-hint="xdoc"
+ */
+public class XdocPluginRelocator extends AbstractPluginRelocator
+{
+    /**
+     * @see AbstractPluginRelocator#getNewArtifactId()
+     */
+    public String getNewArtifactId()
+    {
+        return null;
+    }
+
+    /**
+     * @see AbstractPluginRelocator#getNewGroupId()
+     */
+    public String getNewGroupId()
+    {
+        return null;
+    }
+
+    /**
+     * @see AbstractPluginRelocator#getOldArtifactId()
+     */
+    public String getOldArtifactId()
+    {
+        return "maven-xdoc-plugin";
+    }
+}

Propchange: maven/shared/trunk/maven-model-converter/src/main/java/org/apache/maven/model/converter/relocators/XdocPluginRelocator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/shared/trunk/maven-model-converter/src/main/java/org/apache/maven/model/converter/relocators/XdocPluginRelocator.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/PomV3ToV4TranslatorTest.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/PomV3ToV4TranslatorTest.java?rev=433654&view=auto
==============================================================================
--- maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/PomV3ToV4TranslatorTest.java (added)
+++ maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/PomV3ToV4TranslatorTest.java Tue Aug 22 07:56:59 2006
@@ -0,0 +1,165 @@
+package org.apache.maven.model.converter;
+
+/*
+ * Copyright 2001-2005 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+import junit.framework.Assert;
+import org.apache.maven.model.Build;
+import org.apache.maven.model.Dependency;
+import org.apache.maven.model.Model;
+import org.apache.maven.model.Plugin;
+import org.apache.maven.model.Resource;
+import org.codehaus.plexus.PlexusTestCase;
+
+import java.util.Arrays;
+
+public class PomV3ToV4TranslatorTest
+    extends PlexusTestCase
+{
+
+    private ModelConverter translator;
+
+    private org.apache.maven.model.v3_0_0.Dependency v3Dep;
+
+    private org.apache.maven.model.v3_0_0.Model v3Model;
+
+    protected void setUp()
+        throws Exception
+    {
+        super.setUp();
+        translator = (ModelConverter) lookup( ModelConverter.ROLE );
+
+        v3Dep = new org.apache.maven.model.v3_0_0.Dependency();
+        v3Dep.setGroupId( "testGroup" );
+        v3Dep.setArtifactId( "testArtifact" );
+        v3Dep.setVersion( "1.0" );
+
+        v3Model = new org.apache.maven.model.v3_0_0.Model();
+        v3Model.setBuild( new org.apache.maven.model.v3_0_0.Build() );
+    }
+
+    public void testConvertedEmptyResourceDirectory()
+        throws PomTranslationException
+    {
+        org.apache.maven.model.v3_0_0.Resource v3Resource = new org.apache.maven.model.v3_0_0.Resource();
+        v3Resource.setIncludes( Arrays.asList( new String[]{"**/*.properties"} ) );
+        v3Model.getBuild().addResource( v3Resource );
+
+        Model result = translator.translate( v3Model );
+        Resource resource = (Resource) result.getBuild().getResources().get( 0 );
+        Assert.assertEquals( "check directory of v3Resource", ".", resource.getDirectory() );
+    }
+
+    public void testShouldConvertScopePropertyToDependencyScope()
+        throws Exception
+    {
+        v3Dep.addProperty( "scope", "test" );
+
+        v3Model.addDependency( v3Dep );
+
+        Model result = translator.translate( v3Model );
+        Assert.assertEquals( "test", ( (Dependency) result.getDependencies().get( 0 ) ).getScope() );
+
+    }
+
+    public void testShouldConvertOptionalPropertyToDependencyOptional()
+        throws Exception
+    {
+        v3Dep.addProperty( "optional", "true" );
+
+        v3Model.addDependency( v3Dep );
+
+        Model result = translator.translate( v3Model );
+        Assert.assertTrue( ( (Dependency) result.getDependencies().get( 0 ) ).isOptional() );
+
+        v3Dep.addProperty( "optional", "TRUE" );
+
+        v3Model.addDependency( v3Dep );
+
+        result = translator.translate( v3Model );
+        Assert.assertTrue( ( (Dependency) result.getDependencies().get( 0 ) ).isOptional() );
+    }
+
+    public void testDontBreakWithMalformedOptionalProperty()
+        throws Exception
+    {
+        v3Dep.addProperty( "optional", "xxx" );
+
+        v3Model.addDependency( v3Dep );
+
+        Model result = translator.translate( v3Model );
+        Assert.assertFalse( ( (Dependency) result.getDependencies().get( 0 ) ).isOptional() );
+
+        v3Dep.addProperty( "optional", "" );
+
+        v3Model.addDependency( v3Dep );
+
+        result = translator.translate( v3Model );
+        Assert.assertFalse( ( (Dependency) result.getDependencies().get( 0 ) ).isOptional() );
+    }
+
+    public void testShouldConvertDependencyWithTypePluginToBuildPluginEntry()
+        throws Exception
+    {
+        v3Dep.setType( "plugin" );
+
+        v3Model.addDependency( v3Dep );
+
+        Model result = translator.translate( v3Model );
+
+        Build build = result.getBuild();
+
+        Plugin plugin = (Plugin) build.getPlugins().get( 0 );
+
+        Assert.assertEquals( "testGroup", plugin.getGroupId() );
+        Assert.assertEquals( "testArtifact", plugin.getArtifactId() );
+        Assert.assertEquals( "1.0", plugin.getVersion() );
+
+        Assert.assertEquals( "check one dependency", 1, result.getDependencies().size() );
+        Dependency dep = (Dependency) result.getDependencies().get( 0 );
+        Assert.assertEquals( "junit", dep.getGroupId() );
+        Assert.assertEquals( "junit", dep.getArtifactId() );
+        Assert.assertEquals( "3.8.2", dep.getVersion() );
+        Assert.assertEquals( "test", dep.getScope() );
+    }
+
+    public void testShouldConvertDependencyWithTypePluginAndGroupMavenToBuildPluginEntryWithOAMPluginsGroup()
+        throws Exception
+    {
+        v3Dep.setGroupId( "maven" );
+        v3Dep.setType( "plugin" );
+
+        v3Model.addDependency( v3Dep );
+
+        Model result = translator.translate( v3Model );
+
+        Build build = result.getBuild();
+
+        Plugin plugin = (Plugin) build.getPlugins().get( 0 );
+
+        Assert.assertEquals( "org.apache.maven.plugins", plugin.getGroupId() );
+        Assert.assertEquals( "testArtifact", plugin.getArtifactId() );
+        Assert.assertEquals( "1.0", plugin.getVersion() );
+
+        Assert.assertEquals( "check one dependencies", 1, result.getDependencies().size() );
+        Dependency dep = (Dependency) result.getDependencies().get( 0 );
+        Assert.assertEquals( "junit", dep.getGroupId() );
+        Assert.assertEquals( "junit", dep.getArtifactId() );
+        Assert.assertEquals( "3.8.2", dep.getVersion() );
+        Assert.assertEquals( "test", dep.getScope() );
+    }
+
+}

Propchange: maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/PomV3ToV4TranslatorTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/PomV3ToV4TranslatorTest.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/V3PomRewriterTest.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/V3PomRewriterTest.java?rev=433654&view=auto
==============================================================================
--- maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/V3PomRewriterTest.java (added)
+++ maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/V3PomRewriterTest.java Tue Aug 22 07:56:59 2006
@@ -0,0 +1,60 @@
+package org.apache.maven.model.converter;
+
+/*
+ * Copyright 2005-2005 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+import org.codehaus.plexus.PlexusTestCase;
+import org.codehaus.plexus.util.xml.Xpp3Dom;
+import org.codehaus.plexus.util.xml.Xpp3DomBuilder;
+
+import java.io.StringReader;
+import java.io.StringWriter;
+import java.io.Writer;
+
+/**
+ * Test rewriter.
+ *
+ * @author <a href="mailto:brett@apache.org">Brett Porter</a>
+ * @version $Id$
+ */
+public class V3PomRewriterTest
+    extends PlexusTestCase
+{
+    private V3PomRewriter rewriter;
+
+    protected void setUp()
+        throws Exception
+    {
+        super.setUp();
+
+        rewriter = (V3PomRewriter) lookup( V3PomRewriter.ROLE );
+    }
+
+    public void testCurrentVersionExpressionConversion()
+        throws Exception
+    {
+        String pom =
+            "<project><dependencies><dependency><groupId>g</groupId><artifactId>a</artifactId><version>${pom.currentVersion}</version></dependency></dependencies></project>";
+
+        Writer to = new StringWriter();
+        rewriter.rewrite( new StringReader( pom ), to, false, null, null, null, null );
+
+        Xpp3Dom dom = Xpp3DomBuilder.build( new StringReader( to.toString() ) );
+        String version = dom.getChild( "dependencies" ).getChild( 0 ).getChild( "version" ).getValue();
+        assertEquals( "check new version expression", "${project.version}", version );
+    }
+
+}

Propchange: maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/V3PomRewriterTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/V3PomRewriterTest.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/AbstractPCCTest.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/AbstractPCCTest.java?rev=433654&view=auto
==============================================================================
--- maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/AbstractPCCTest.java (added)
+++ maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/AbstractPCCTest.java Tue Aug 22 07:56:59 2006
@@ -0,0 +1,47 @@
+package org.apache.maven.model.converter.plugins;
+
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+import org.codehaus.plexus.PlexusTestCase;
+import org.codehaus.plexus.util.xml.Xpp3Dom;
+
+import java.util.Properties;
+
+/**
+ * @author Dennis Lundberg
+ * @version $Id$
+ */
+public class AbstractPCCTest extends PlexusTestCase
+{
+    protected Xpp3Dom configuration;
+    protected AbstractPluginConfigurationConverter pluginConfigurationConverter;
+    protected Properties projectProperties;
+    protected org.apache.maven.model.v3_0_0.Model v3Model;
+
+    protected void setUp()
+        throws Exception
+    {
+        super.setUp();
+
+        configuration = new Xpp3Dom( "configuration" );
+
+        projectProperties = new Properties();
+
+        v3Model = new org.apache.maven.model.v3_0_0.Model();
+        v3Model.setBuild( new org.apache.maven.model.v3_0_0.Build() );
+    }
+}

Propchange: maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/AbstractPCCTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/AbstractPCCTest.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/PCCChangelogTest.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/PCCChangelogTest.java?rev=433654&view=auto
==============================================================================
--- maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/PCCChangelogTest.java (added)
+++ maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/PCCChangelogTest.java Tue Aug 22 07:56:59 2006
@@ -0,0 +1,139 @@
+package org.apache.maven.model.converter.plugins;
+
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+import junit.framework.Assert;
+import org.apache.maven.model.converter.ProjectConverterException;
+import org.codehaus.plexus.util.xml.Xpp3Dom;
+
+import java.io.IOException;
+
+/**
+ * @author Dennis Lundberg
+ * @version $Id$
+ */
+public class PCCChangelogTest
+    extends AbstractPCCTest
+{
+    protected void setUp()
+        throws Exception
+    {
+        super.setUp();
+
+        pluginConfigurationConverter = new PCCChangelog();
+    }
+
+    public void testBuildConfiguration1()
+    {
+        try
+        {
+            projectProperties.load( getClassLoader().getResourceAsStream( "PCCChangelogTest1.properties" ) );
+
+            pluginConfigurationConverter.buildConfiguration( configuration, v3Model, projectProperties );
+
+            String value = configuration.getChild( "commentFormat" ).getValue();
+            Assert.assertEquals( "check commentFormat value", "%Sn - %c - Activity: %[activity]p", value );
+
+            value = configuration.getChild( "dateFormat" ).getValue();
+            Assert.assertEquals( "check dateFormat value", "yyyy-MM-dd", value );
+
+            value = configuration.getChild( "outputEncoding" ).getValue();
+            Assert.assertEquals( "check outputEncoding value", "ISO-8859-1", value );
+
+            value = configuration.getChild( "tagBase" ).getValue();
+            Assert.assertEquals( "check tagBase value", "http://svn.apache.org/repos/asf/maven/plugins/", value );
+
+            value = configuration.getChild( "type" ).getValue();
+            Assert.assertEquals( "check type value", "date", value );
+
+            Xpp3Dom dates = configuration.getChild( "dates" );
+            if ( dates.getChildCount() == 1 )
+            {
+                Xpp3Dom date = dates.getChild( 0 );
+                Assert.assertEquals( "check dates/date value", "2005-01-01", date.getValue() );
+            }
+            else
+            {
+                Assert.fail( "Wrong number of date elements" );
+            }
+        }
+        catch ( ProjectConverterException e )
+        {
+            Assert.fail( e.getMessage() );
+        }
+        catch ( IOException e )
+        {
+            Assert.fail( "Unable to find the requested resource." );
+        }
+    }
+
+    public void testBuildConfiguration2()
+    {
+        try
+        {
+            projectProperties.load( getClassLoader().getResourceAsStream( "PCCChangelogTest2.properties" ) );
+
+            pluginConfigurationConverter.buildConfiguration( configuration, v3Model, projectProperties );
+
+            String value = configuration.getChild( "type" ).getValue();
+            Assert.assertEquals( "check type value", "range", value );
+
+            value = configuration.getChild( "range" ).getValue();
+            Assert.assertEquals( "check range value", "120", value );
+        }
+        catch ( ProjectConverterException e )
+        {
+            Assert.fail( e.getMessage() );
+        }
+        catch ( IOException e )
+        {
+            Assert.fail( "Unable to find the requested resource." );
+        }
+    }
+
+    public void testBuildConfiguration3()
+    {
+        try
+        {
+            projectProperties.load( getClassLoader().getResourceAsStream( "PCCChangelogTest3.properties" ) );
+
+            pluginConfigurationConverter.buildConfiguration( configuration, v3Model, projectProperties );
+
+            String value = configuration.getChild( "type" ).getValue();
+            Assert.assertEquals( "check type value", "tag", value );
+
+            Xpp3Dom tags = configuration.getChild( "tags" );
+            if ( tags.getChildCount() == 1 )
+            {
+                Xpp3Dom tag = tags.getChild( 0 );
+                Assert.assertEquals( "check tags/tag value", "RELEASE-1_0", tag.getValue() );
+            }
+            else
+            {
+                Assert.fail( "Wrong number of tag elements" );
+            }
+        }
+        catch ( ProjectConverterException e )
+        {
+            Assert.fail( e.getMessage() );
+        }
+        catch ( IOException e )
+        {
+            Assert.fail( "Unable to find the requested resource." );
+        }
+    }
+}

Propchange: maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/PCCChangelogTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/PCCChangelogTest.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/PCCChangesTest.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/PCCChangesTest.java?rev=433654&view=auto
==============================================================================
--- maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/PCCChangesTest.java (added)
+++ maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/PCCChangesTest.java Tue Aug 22 07:56:59 2006
@@ -0,0 +1,59 @@
+package org.apache.maven.model.converter.plugins;
+
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+import junit.framework.Assert;
+import org.apache.maven.model.converter.ProjectConverterException;
+
+import java.io.IOException;
+
+/**
+ * @author Dennis Lundberg
+ * @version $Id$
+ */
+public class PCCChangesTest
+    extends AbstractPCCTest
+{
+    protected void setUp()
+        throws Exception
+    {
+        super.setUp();
+
+        pluginConfigurationConverter = new PCCChanges();
+    }
+
+    public void testBuildConfiguration()
+    {
+        try
+        {
+            projectProperties.load( getClassLoader().getResourceAsStream( "PCCChangesTest.properties" ) );
+
+            pluginConfigurationConverter.buildConfiguration( configuration, v3Model, projectProperties );
+
+            String value = configuration.getChild( "link_template" ).getValue();
+            Assert.assertEquals( "check link_template value", "%URL%/browse/%ISSUE%", value );
+        }
+        catch ( ProjectConverterException e )
+        {
+            Assert.fail( e.getMessage() );
+        }
+        catch ( IOException e )
+        {
+            Assert.fail( "Unable to find the requested resource." );
+        }
+    }
+}

Propchange: maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/PCCChangesTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/PCCChangesTest.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/PCCCheckstyleTest.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/PCCCheckstyleTest.java?rev=433654&view=auto
==============================================================================
--- maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/PCCCheckstyleTest.java (added)
+++ maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/PCCCheckstyleTest.java Tue Aug 22 07:56:59 2006
@@ -0,0 +1,136 @@
+package org.apache.maven.model.converter.plugins;
+
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+import junit.framework.Assert;
+import org.apache.maven.model.converter.ProjectConverterException;
+
+import java.io.IOException;
+
+/**
+ * @author Dennis Lundberg
+ * @version $Id$
+ */
+public class PCCCheckstyleTest
+    extends AbstractPCCTest
+{
+    protected void setUp()
+        throws Exception
+    {
+        super.setUp();
+
+        pluginConfigurationConverter = new PCCCheckstyle();
+    }
+
+    public void testBuildConfiguration1()
+    {
+        try
+        {
+            projectProperties.load( getClassLoader().getResourceAsStream( "PCCCheckstyleTest1.properties" ) );
+
+            pluginConfigurationConverter.buildConfiguration( configuration, v3Model, projectProperties );
+
+            String value = configuration.getChild( "cacheFile" ).getValue();
+            Assert.assertEquals( "check cacheFile value", "target/checkstyle/myCachefile", value );
+
+            value = configuration.getChild( "configLocation" ).getValue();
+            Assert.assertEquals( "check configLocation value", "config/sun_checks.xml", value );
+
+            value = configuration.getChild( "excludes" ).getValue();
+            Assert.assertEquals( "check excludes value", "**/*.html", value );
+
+            value = configuration.getChild( "failsOnError" ).getValue();
+            Assert.assertEquals( "check failsOnError value", "true", value );
+
+            value = configuration.getChild( "headerLocation" ).getValue();
+            Assert.assertEquals( "check headerLocation value", "src/main/resources/HEADER.txt", value );
+
+            value = configuration.getChild( "includes" ).getValue();
+            Assert.assertEquals( "check includes value", "**/*.java", value );
+
+            value = configuration.getChild( "outputFile" ).getValue();
+            Assert.assertEquals( "check outputFile value", "target/checkstyle/checkstyle-raw-report.txt", value );
+
+            value = configuration.getChild( "outputFileFormat" ).getValue();
+            Assert.assertEquals( "check outputFileFormat value", "plain", value );
+
+            value = configuration.getChild( "suppressionsLocation" ).getValue();
+            Assert.assertEquals( "check suppressionsLocation value", "src/main/resources/mySuppressions.xml", value );
+
+            value = configuration.getChild( "useFile" ).getValue();
+            Assert.assertEquals( "check useFile value", "true", value );
+        }
+        catch ( ProjectConverterException e )
+        {
+            Assert.fail( e.getMessage() );
+        }
+        catch ( IOException e )
+        {
+            Assert.fail( "Unable to find the requested resource." );
+        }
+    }
+
+    public void testBuildConfiguration2()
+    {
+        try
+        {
+            projectProperties.load( getClassLoader().getResourceAsStream( "PCCCheckstyleTest2.properties" ) );
+
+            pluginConfigurationConverter.buildConfiguration( configuration, v3Model, projectProperties );
+
+            String value = configuration.getChild( "configLocation" ).getValue();
+            Assert.assertEquals( "check configLocation value",
+                                 "http://svn.apache.org/repos/asf/maven/plugins/trunk/maven-checkstyle-plugin/src/main/resources/config/avalon_checks.xml",
+                                 value );
+
+            value = configuration.getChild( "outputFile" ).getValue();
+            Assert.assertEquals( "check outputFile value", "target/checkstyle/checkstyle-raw-report.xml", value );
+
+            value = configuration.getChild( "outputFileFormat" ).getValue();
+            Assert.assertEquals( "check outputFileFormat value", "xml", value );
+        }
+        catch ( ProjectConverterException e )
+        {
+            Assert.fail( e.getMessage() );
+        }
+        catch ( IOException e )
+        {
+            Assert.fail( "Unable to find the requested resource." );
+        }
+    }
+
+    public void testBuildConfiguration3()
+    {
+        try
+        {
+            projectProperties.load( getClassLoader().getResourceAsStream( "PCCCheckstyleTest3.properties" ) );
+
+            pluginConfigurationConverter.buildConfiguration( configuration, v3Model, projectProperties );
+
+            String value = configuration.getChild( "configLocation" ).getValue();
+            Assert.assertEquals( "check configLocation value", "checkstyle.xml", value );
+        }
+        catch ( ProjectConverterException e )
+        {
+            Assert.fail( e.getMessage() );
+        }
+        catch ( IOException e )
+        {
+            Assert.fail( "Unable to find the requested resource." );
+        }
+    }
+}

Propchange: maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/PCCCheckstyleTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/PCCCheckstyleTest.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/PCCCompilerTest.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/PCCCompilerTest.java?rev=433654&view=auto
==============================================================================
--- maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/PCCCompilerTest.java (added)
+++ maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/PCCCompilerTest.java Tue Aug 22 07:56:59 2006
@@ -0,0 +1,92 @@
+package org.apache.maven.model.converter.plugins;
+
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+import junit.framework.Assert;
+import org.apache.maven.model.converter.ProjectConverterException;
+
+import java.io.IOException;
+
+/**
+ * @author Dennis Lundberg
+ * @version $Id$
+ */
+public class PCCCompilerTest
+    extends AbstractPCCTest
+{
+    protected void setUp()
+        throws Exception
+    {
+        super.setUp();
+
+        pluginConfigurationConverter = new PCCCompiler();
+    }
+
+    public void testBuildConfiguration()
+    {
+        try
+        {
+            projectProperties.load( getClassLoader().getResourceAsStream( "PCCCompilerTest.properties" ) );
+
+            pluginConfigurationConverter.buildConfiguration( configuration, v3Model, projectProperties );
+
+            String value = configuration.getChild( "debug" ).getValue();
+            Assert.assertEquals( "check debug value", "true", value );
+
+            value = configuration.getChild( "showDeprecation" ).getValue();
+            Assert.assertEquals( "check deprecation value", "false", value );
+
+            value = configuration.getChild( "encoding" ).getValue();
+            Assert.assertEquals( "check encoding value", "UTF-8", value );
+
+            value = configuration.getChild( "executable" ).getValue();
+            Assert.assertEquals( "check executable value", "/usr/java/bin/javac-2", value );
+
+            value = configuration.getChild( "fork" ).getValue();
+            Assert.assertEquals( "check fork value", "true", value );
+
+            value = configuration.getChild( "meminitial" ).getValue();
+            Assert.assertEquals( "check meminitial value", "10m", value );
+
+            value = configuration.getChild( "maxmem" ).getValue();
+            Assert.assertEquals( "check maxmem value", "20m", value );
+
+            value = configuration.getChild( "optimize" ).getValue();
+            Assert.assertEquals( "check optimize value", "false", value );
+
+            value = configuration.getChild( "showWarnings" ).getValue();
+            Assert.assertEquals( "check showWarnings value", "false", value );
+
+            value = configuration.getChild( "source" ).getValue();
+            Assert.assertEquals( "check source value", "1.3", value );
+
+            value = configuration.getChild( "target" ).getValue();
+            Assert.assertEquals( "check target value", "1.1", value );
+
+            value = configuration.getChild( "verbose" ).getValue();
+            Assert.assertEquals( "check verbose value", "false", value );
+        }
+        catch ( ProjectConverterException e )
+        {
+            Assert.fail( e.getMessage() );
+        }
+        catch ( IOException e )
+        {
+            Assert.fail( "Unable to find the requested resource." );
+        }
+    }
+}

Propchange: maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/PCCCompilerTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/PCCCompilerTest.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/PCCJarTest.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/PCCJarTest.java?rev=433654&view=auto
==============================================================================
--- maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/PCCJarTest.java (added)
+++ maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/PCCJarTest.java Tue Aug 22 07:56:59 2006
@@ -0,0 +1,98 @@
+package org.apache.maven.model.converter.plugins;
+
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+import junit.framework.Assert;
+import org.apache.maven.model.converter.ProjectConverterException;
+import org.codehaus.plexus.util.xml.Xpp3Dom;
+
+import java.io.IOException;
+
+/**
+ * @author Dennis Lundberg
+ * @version $Id$
+ */
+public class PCCJarTest
+    extends AbstractPCCTest
+{
+    protected void setUp()
+        throws Exception
+    {
+        super.setUp();
+
+        pluginConfigurationConverter = new PCCJar();
+    }
+
+    public void testBuildConfiguration()
+    {
+        String value;
+
+        try
+        {
+            projectProperties.load( getClassLoader().getResourceAsStream( "PCCJarTest.properties" ) );
+
+            pluginConfigurationConverter.buildConfiguration( configuration, v3Model, projectProperties );
+
+            Xpp3Dom archive = configuration.getChild( "archive" );
+            if ( archive.getChildCount() > 0 )
+            {
+                value = archive.getChild( "compress" ).getValue();
+                Assert.assertEquals( "check compress value", "false", value );
+
+                value = archive.getChild( "index" ).getValue();
+                Assert.assertEquals( "check index value", "true", value );
+
+                Xpp3Dom manifest = archive.getChild( "manifest" );
+                if ( manifest.getChildCount() > 0 )
+                {
+                    value = manifest.getChild( "addClasspath" ).getValue();
+                    Assert.assertEquals( "check addClasspath value", "true", value );
+
+                    value = manifest.getChild( "addExtensions" ).getValue();
+                    Assert.assertEquals( "check addExtensions value", "true", value );
+
+                    value = manifest.getChild( "mainClass" ).getValue();
+                    Assert.assertEquals( "check mainClass value", "MyClass", value );
+                }
+
+                Xpp3Dom manifestEntries = archive.getChild( "manifestEntries" );
+                if ( manifestEntries.getChildCount() > 0 )
+                {
+                    value = manifestEntries.getChild( "Bar-Attribute" ).getValue();
+                    Assert.assertEquals( "check Bar-Attribute value", "I like toast and jam", value );
+
+                    value = manifestEntries.getChild( "Foo-Attribute" ).getValue();
+                    Assert.assertEquals( "check Foo-Attribute value", "I like bread and butter", value );
+                }
+
+                value = archive.getChild( "manifestFile" ).getValue();
+                Assert.assertEquals( "check manifestFile value", "manifest.mf", value );
+            }
+
+            value = configuration.getChild( "finalName" ).getValue();
+            Assert.assertEquals( "check finalName value", "my.jar", value );
+        }
+        catch ( ProjectConverterException e )
+        {
+            Assert.fail( e.getMessage() );
+        }
+        catch ( IOException e )
+        {
+            Assert.fail( "Unable to find the requested resource." );
+        }
+    }
+}

Propchange: maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/PCCJarTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/PCCJarTest.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/PCCJavadocTest.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/PCCJavadocTest.java?rev=433654&view=auto
==============================================================================
--- maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/PCCJavadocTest.java (added)
+++ maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/PCCJavadocTest.java Tue Aug 22 07:56:59 2006
@@ -0,0 +1,228 @@
+package org.apache.maven.model.converter.plugins;
+
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+import junit.framework.Assert;
+import org.apache.maven.model.converter.ProjectConverterException;
+import org.codehaus.plexus.util.xml.Xpp3Dom;
+
+import java.io.IOException;
+
+/**
+ * @author Dennis Lundberg
+ * @version $Id$
+ */
+public class PCCJavadocTest
+    extends AbstractPCCTest
+{
+    protected void setUp()
+        throws Exception
+    {
+        super.setUp();
+
+        pluginConfigurationConverter = new PCCJavadoc();
+    }
+
+    public void testBuildConfiguration()
+    {
+        try
+        {
+            projectProperties.load( getClassLoader().getResourceAsStream( "PCCJavadocTest1.properties" ) );
+
+            pluginConfigurationConverter.buildConfiguration( configuration, v3Model, projectProperties );
+
+            String value = configuration.getChild( "additionalparam" ).getValue();
+            Assert.assertEquals( "check additionalparam value", "-J-showversion", value );
+
+            value = configuration.getChild( "author" ).getValue();
+            Assert.assertEquals( "check author value", "false", value );
+
+            value = configuration.getChild( "bottom" ).getValue();
+            Assert.assertEquals( "check bottom value", "Copyright", value );
+
+            value = configuration.getChild( "destDir" ).getValue();
+            Assert.assertEquals( "check destDir value", "apidocs", value );
+
+            value = configuration.getChild( "docencoding" ).getValue();
+            Assert.assertEquals( "check docencoding value", "UTF-8", value );
+
+            value = configuration.getChild( "doclet" ).getValue();
+            Assert.assertEquals( "check doclet value", "org.apache.MyDoclet", value );
+
+            value = configuration.getChild( "docletPath" ).getValue();
+            Assert.assertEquals( "check docletPath value", "/path/to/doclet", value );
+
+            value = configuration.getChild( "doctitle" ).getValue();
+            Assert.assertEquals( "check doctitle value", "The title", value );
+
+            value = configuration.getChild( "encoding" ).getValue();
+            Assert.assertEquals( "check encoding value", "ISO-8859-1", value );
+
+            value = configuration.getChild( "excludePackageNames" ).getValue();
+            Assert.assertEquals( "check excludePackageNames value", "org.apache.internal,org.apache.test", value );
+
+            value = configuration.getChild( "footer" ).getValue();
+            Assert.assertEquals( "check footer value", "The footer", value );
+
+            value = configuration.getChild( "header" ).getValue();
+            Assert.assertEquals( "check header value", "The header", value );
+
+            value = configuration.getChild( "isOffline" ).getValue();
+            Assert.assertEquals( "check isOffline value", "false", value );
+
+            value = configuration.getChild( "links" ).getValue();
+            Assert.assertEquals( "check links value", "http://java.sun.com/j2se/1.4/docs/api/", value );
+
+            value = configuration.getChild( "locale" ).getValue();
+            Assert.assertEquals( "check locale value", "en_US", value );
+
+            value = configuration.getChild( "maxmemory" ).getValue();
+            Assert.assertEquals( "check maxmemory value", "1024m", value );
+
+            value = configuration.getChild( "offlineLinks" ).getValue();
+            Assert.assertEquals( "check offlineLinks value", "/opt/java-apidoc/j2sdk1.4.2/docs/api/", value );
+
+            value = configuration.getChild( "overview" ).getValue();
+            Assert.assertEquals( "check overview value", "src/main/java/org/apache/overview.html", value );
+
+            value = configuration.getChild( "source" ).getValue();
+            Assert.assertEquals( "check source value", "1.3", value );
+
+            value = configuration.getChild( "stylesheetfile" ).getValue();
+            Assert.assertEquals( "check stylesheetfile value", "myStylesheet.css", value );
+
+            value = configuration.getChild( "subpackages" ).getValue();
+            Assert.assertEquals( "check subpackages value", "org.apache.maven", value );
+
+            value = configuration.getChild( "taglet" ).getValue();
+            Assert.assertEquals( "check taglet value", "org.apache.MyTaglet", value );
+
+            value = configuration.getChild( "tagletpath" ).getValue();
+            Assert.assertEquals( "check tagletpath value", "/path/to/taglet", value );
+
+            Xpp3Dom tags = configuration.getChild( "tags" );
+            if ( tags.getChildCount() == 2 )
+            {
+                Xpp3Dom tagOne = tags.getChild( 0 );
+
+                value = tagOne.getChild( "head" ).getValue();
+                Assert.assertEquals( "check tags/tag/head value", "To Do:", value );
+
+                value = tagOne.getChild( "name" ).getValue();
+                Assert.assertEquals( "check tags/tag/name value", "todo", value );
+
+                value = tagOne.getChild( "placement" ).getValue();
+                Assert.assertEquals( "check tags/tag/placement value", "a", value );
+
+                Xpp3Dom tagTwo = tags.getChild( 1 );
+
+                value = tagTwo.getChild( "head" ).getValue();
+                Assert.assertEquals( "check tags/tag/head value", "Task:", value );
+
+                value = tagTwo.getChild( "name" ).getValue();
+                Assert.assertEquals( "check tags/tag/name value", "task", value );
+
+                value = tagTwo.getChild( "placement" ).getValue();
+                Assert.assertEquals( "check tags/tag/placement value", "Xa", value );
+            }
+            else
+            {
+                Assert.fail( "Wrong number of tag elements" );
+            }
+
+            value = configuration.getChild( "use" ).getValue();
+            Assert.assertEquals( "check use value", "true", value );
+
+            value = configuration.getChild( "version" ).getValue();
+            Assert.assertEquals( "check version value", "true", value );
+
+            value = configuration.getChild( "windowtitle" ).getValue();
+            Assert.assertEquals( "check windowtitle value", "The title", value );
+        }
+        catch ( ProjectConverterException e )
+        {
+            Assert.fail( e.getMessage() );
+        }
+        catch ( IOException e )
+        {
+            Assert.fail( "Unable to find the requested resource." );
+        }
+    }
+
+    public void testBuildConfigurationShow1()
+    {
+        try
+        {
+            projectProperties.load( getClassLoader().getResourceAsStream( "PCCJavadocTest1.properties" ) );
+
+            pluginConfigurationConverter.buildConfiguration( configuration, v3Model, projectProperties );
+
+            String value = configuration.getChild( "show" ).getValue();
+            Assert.assertEquals( "check show value", "package", value );
+        }
+        catch ( ProjectConverterException e )
+        {
+            Assert.fail( e.getMessage() );
+        }
+        catch ( IOException e )
+        {
+            Assert.fail( "Unable to find the requested resource." );
+        }
+    }
+
+    public void testBuildConfigurationShow2()
+    {
+        try
+        {
+            projectProperties.load( getClassLoader().getResourceAsStream( "PCCJavadocTest2.properties" ) );
+
+            pluginConfigurationConverter.buildConfiguration( configuration, v3Model, projectProperties );
+
+            String value = configuration.getChild( "show" ).getValue();
+            Assert.assertEquals( "check show value", "private", value );
+        }
+        catch ( ProjectConverterException e )
+        {
+            Assert.fail( e.getMessage() );
+        }
+        catch ( IOException e )
+        {
+            Assert.fail( "Unable to find the requested resource." );
+        }
+    }
+
+    public void testBuildConfigurationShow3()
+    {
+        try
+        {
+            projectProperties.load( getClassLoader().getResourceAsStream( "PCCJavadocTest3.properties" ) );
+
+            pluginConfigurationConverter.buildConfiguration( configuration, v3Model, projectProperties );
+
+            String value = configuration.getChild( "show" ).getValue();
+            Assert.assertEquals( "check show value", "public", value );
+        }
+        catch ( ProjectConverterException e )
+        {
+            Assert.fail( e.getMessage() );
+        }
+        catch ( IOException e )
+        {
+            Assert.fail( "Unable to find the requested resource." );
+        }
+    }
+}

Propchange: maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/PCCJavadocTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/PCCJavadocTest.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/PCCPmdTest.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/PCCPmdTest.java?rev=433654&view=auto
==============================================================================
--- maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/PCCPmdTest.java (added)
+++ maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/PCCPmdTest.java Tue Aug 22 07:56:59 2006
@@ -0,0 +1,87 @@
+package org.apache.maven.model.converter.plugins;
+
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+import junit.framework.Assert;
+import org.apache.maven.model.converter.ProjectConverterException;
+import org.codehaus.plexus.util.xml.Xpp3Dom;
+
+import java.io.IOException;
+
+/**
+ * @author Dennis Lundberg
+ * @version $Id$
+ */
+public class PCCPmdTest
+    extends AbstractPCCTest
+{
+    protected void setUp()
+        throws Exception
+    {
+        super.setUp();
+
+        pluginConfigurationConverter = new PCCPmd();
+    }
+
+    public void testBuildConfiguration()
+    {
+        try
+        {
+            projectProperties.load( getClassLoader().getResourceAsStream( "PCCPmdTest.properties" ) );
+
+            pluginConfigurationConverter.buildConfiguration( configuration, v3Model, projectProperties );
+
+            String value = configuration.getChild( "excludes" ).getValue();
+            Assert.assertEquals( "check excludes value", "**/*PropertyListParser*", value );
+
+            value = configuration.getChild( "failOnViolation" ).getValue();
+            Assert.assertEquals( "check failOnViolation value", "true", value );
+
+            value = configuration.getChild( "minimumTokens" ).getValue();
+            Assert.assertEquals( "check minimumTokens value", "50", value );
+
+            Xpp3Dom rulesets = configuration.getChild( "rulesets" );
+            if ( rulesets.getChildCount() == 3 )
+            {
+                Xpp3Dom rulesetOne = rulesets.getChild( 0 );
+                Assert.assertEquals( "check rulesets/ruleset value", "fileupload_basic.xml", rulesetOne.getValue() );
+
+                Xpp3Dom rulesetTwo = rulesets.getChild( 1 );
+                Assert.assertEquals( "check rulesets/ruleset value", "/rulesets/unusedcode.xml",
+                                     rulesetTwo.getValue() );
+
+                Xpp3Dom rulesetThree = rulesets.getChild( 2 );
+                Assert.assertEquals( "check rulesets/ruleset value", "/rulesets/imports.xml", rulesetThree.getValue() );
+            }
+            else
+            {
+                Assert.fail( "Wrong number of ruleset elements" );
+            }
+
+            value = configuration.getChild( "targetJdk" ).getValue();
+            Assert.assertEquals( "check targetJdk value", "1.4", value );
+        }
+        catch ( ProjectConverterException e )
+        {
+            Assert.fail( e.getMessage() );
+        }
+        catch ( IOException e )
+        {
+            Assert.fail( "Unable to find the requested resource." );
+        }
+    }
+}

Propchange: maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/PCCPmdTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/PCCPmdTest.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/PCCSurefireTest.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/PCCSurefireTest.java?rev=433654&view=auto
==============================================================================
--- maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/PCCSurefireTest.java (added)
+++ maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/PCCSurefireTest.java Tue Aug 22 07:56:59 2006
@@ -0,0 +1,157 @@
+package org.apache.maven.model.converter.plugins;
+
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+import junit.framework.Assert;
+import org.apache.maven.model.converter.ProjectConverterException;
+import org.codehaus.plexus.util.xml.Xpp3Dom;
+
+import java.io.IOException;
+
+/**
+ * @author Dennis Lundberg
+ * @version $Id$
+ */
+public class PCCSurefireTest
+    extends AbstractPCCTest
+{
+    protected void setUp()
+        throws Exception
+    {
+        super.setUp();
+
+        pluginConfigurationConverter = new PCCSurefire();
+    }
+
+    public void testBuildConfiguration()
+    {
+        try
+        {
+            projectProperties.load( getClassLoader().getResourceAsStream( "PCCSureFireTest1.properties" ) );
+
+            pluginConfigurationConverter.buildConfiguration( configuration, v3Model, projectProperties );
+
+            String value = configuration.getChild( "reportFormat" ).getValue();
+            Assert.assertEquals( "check reportFormat value", "xml", value );
+
+            value = configuration.getChild( "jvm" ).getValue();
+            Assert.assertEquals( "check jvm value", "java", value );
+
+            value = configuration.getChild( "argLine" ).getValue();
+            Assert.assertEquals( "check argLine value", "-Xmx160m -verbose", value );
+
+            value = configuration.getChild( "printSummary" ).getValue();
+            Assert.assertEquals( "check printSummary value", "false", value );
+
+            Xpp3Dom systemProperties = configuration.getChild( "systemProperties" );
+            if ( systemProperties.getChildCount() == 2 )
+            {
+                Xpp3Dom systemPropertyOne = systemProperties.getChild( 0 );
+                Assert.assertEquals( "check systemProperties/prop1 name", "prop1", systemPropertyOne.getName() );
+                Assert.assertEquals( "check systemProperties/prop1 value", "your value", systemPropertyOne.getValue() );
+
+                Xpp3Dom systemPropertyTwo = systemProperties.getChild( 1 );
+                Assert.assertEquals( "check systemProperties/prop2 name", "basedir", systemPropertyTwo.getName() );
+                Assert.assertEquals( "check systemProperties/prop2 value", "${basedir}", systemPropertyTwo.getValue() );
+            }
+            else
+            {
+                Assert.fail( "Wrong number of system properties" );
+            }
+
+            value = configuration.getChild( "useFile" ).getValue();
+            Assert.assertEquals( "check useFile value", "false", value );
+
+            value = configuration.getChild( "testFailureIgnore" ).getValue();
+            Assert.assertEquals( "check testFailureIgnore value", "true", value );
+
+            value = configuration.getChild( "skip" ).getValue();
+            Assert.assertEquals( "check skip value", "true", value );
+        }
+        catch ( ProjectConverterException e )
+        {
+            Assert.fail();
+        }
+        catch ( IOException e )
+        {
+            Assert.fail( "Unable to find the requested resource." );
+        }
+    }
+
+    public void testBuildConfigurationFork1()
+    {
+        try
+        {
+            projectProperties.load( getClassLoader().getResourceAsStream( "PCCSureFireTest1.properties" ) );
+
+            pluginConfigurationConverter.buildConfiguration( configuration, v3Model, projectProperties );
+
+            String value = configuration.getChild( "forkMode" ).getValue();
+            Assert.assertEquals( "check forkMode value", "once", value );
+        }
+        catch ( ProjectConverterException e )
+        {
+            Assert.fail();
+        }
+        catch ( IOException e )
+        {
+            Assert.fail( "Unable to find the requested resource." );
+        }
+    }
+
+    public void testBuildConfigurationFork2()
+    {
+        try
+        {
+            projectProperties.load( getClassLoader().getResourceAsStream( "PCCSureFireTest2.properties" ) );
+
+            pluginConfigurationConverter.buildConfiguration( configuration, v3Model, projectProperties );
+
+            String value = configuration.getChild( "forkMode" ).getValue();
+            Assert.assertEquals( "check forkMode value", "once", value );
+        }
+        catch ( ProjectConverterException e )
+        {
+            Assert.fail();
+        }
+        catch ( IOException e )
+        {
+            Assert.fail( "Unable to find the requested resource." );
+        }
+    }
+
+    public void testBuildConfigurationFork3()
+    {
+        try
+        {
+            projectProperties.load( getClassLoader().getResourceAsStream( "PCCSureFireTest3.properties" ) );
+
+            pluginConfigurationConverter.buildConfiguration( configuration, v3Model, projectProperties );
+
+            String value = configuration.getChild( "forkMode" ).getValue();
+            Assert.assertEquals( "check forkMode value", "perTest", value );
+        }
+        catch ( ProjectConverterException e )
+        {
+            Assert.fail();
+        }
+        catch ( IOException e )
+        {
+            Assert.fail( "Unable to find the requested resource." );
+        }
+    }
+}

Propchange: maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/PCCSurefireTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/PCCSurefireTest.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/PCCTaglistTest.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/PCCTaglistTest.java?rev=433654&view=auto
==============================================================================
--- maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/PCCTaglistTest.java (added)
+++ maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/PCCTaglistTest.java Tue Aug 22 07:56:59 2006
@@ -0,0 +1,59 @@
+package org.apache.maven.model.converter.plugins;
+
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+import junit.framework.Assert;
+import org.apache.maven.model.converter.ProjectConverterException;
+
+import java.io.IOException;
+
+/**
+ * @author Dennis Lundberg
+ * @version $Id$
+ */
+public class PCCTaglistTest
+    extends AbstractPCCTest
+{
+    protected void setUp()
+        throws Exception
+    {
+        super.setUp();
+
+        pluginConfigurationConverter = new PCCTaglist();
+    }
+
+    public void testBuildConfiguration()
+    {
+        try
+        {
+            projectProperties.load( getClassLoader().getResourceAsStream( "PCCTaglistTest.properties" ) );
+
+            pluginConfigurationConverter.buildConfiguration( configuration, v3Model, projectProperties );
+
+            String value = configuration.getChild( "tags" ).getValue();
+            Assert.assertEquals( "check tags value", "@fixme", value );
+        }
+        catch ( ProjectConverterException e )
+        {
+            Assert.fail();
+        }
+        catch ( IOException e )
+        {
+            Assert.fail( "Unable to find the requested resource." );
+        }
+    }
+}

Propchange: maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/PCCTaglistTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/shared/trunk/maven-model-converter/src/test/java/org/apache/maven/model/converter/plugins/PCCTaglistTest.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"