Author: nicolas
Date: Mon Mar  3 01:55:18 2008
New Revision: 633012

URL: http://svn.apache.org/viewvc?rev=633012&view=rev
Log:
test case for MNG-3426

Added:
    
maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng3426PluginsClasspathOverrideTest.java
   (with props)
    
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/MNG-3426/
    
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/MNG-3426/pom.xml
   (with props)
    
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/MNG-3426/src/
    
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/MNG-3426/src/main/
    
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/MNG-3426/src/main/castor/
    
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/MNG-3426/src/main/castor/castorbuilder.properties
   (with props)
    
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/MNG-3426/src/main/castor/test.xsd
   (with props)
Modified:
    
maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/IntegrationTestSuite.java

Modified: 
maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/IntegrationTestSuite.java
URL: 
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/IntegrationTestSuite.java?rev=633012&r1=633011&r2=633012&view=diff
==============================================================================
--- 
maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/IntegrationTestSuite.java
 (original)
+++ 
maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/IntegrationTestSuite.java
 Mon Mar  3 01:55:18 2008
@@ -176,6 +176,7 @@
         suite.addTestSuite( MavenITmng3331ModulePathNormalization.class );
         suite.addTestSuite( MavenITmng1493NonStandardModulePomNames.class );
         suite.addTestSuite( MavenITmng1491ReactorArtifactIdCollision.class );
+        suite.addTestSuite( MavenITmng3426PluginsClasspathOverrideTest.class );
 
         // 
----------------------------------------------------------------------------------------------------
         // Tests that need to be fixed.
@@ -190,6 +191,7 @@
         // suite.addTestSuite( 
MavenIT0124PomExtensionComponentOverrideTest.class ); -- MNG-2771
         // suite.addTestSuite( MavenIT0126TestJarDependency.class ); // 
MJAR-75 / MNG-3160
         // suite.addTestSuite( MavenIT0120EjbClientDependency.class ); // -- 
not passing for 2.0.7 either, looks to be 2.1+ ?
+
         return suite;
     }
 }

Added: 
maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng3426PluginsClasspathOverrideTest.java
URL: 
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng3426PluginsClasspathOverrideTest.java?rev=633012&view=auto
==============================================================================
--- 
maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng3426PluginsClasspathOverrideTest.java
 (added)
+++ 
maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng3426PluginsClasspathOverrideTest.java
 Mon Mar  3 01:55:18 2008
@@ -0,0 +1,65 @@
+package org.apache.maven.integrationtests;
+
+/*
+ * 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.
+ */
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+import junit.framework.Assert;
+
+import 
org.apache.maven.artifact.versioning.InvalidVersionSpecificationException;
+import org.apache.maven.it.Verifier;
+import org.apache.maven.it.util.FileUtils;
+import org.apache.maven.it.util.ResourceExtractor;
+
+/**
+ * @author <a href="mailto:[EMAIL PROTECTED]">Nicolas De Loof</a>
+ *
+ */
+public class MavenITmng3426PluginsClasspathOverrideTest
+    extends AbstractMavenIntegrationTestCase
+{
+    public MavenITmng3426PluginsClasspathOverrideTest()
+        throws InvalidVersionSpecificationException
+    {
+        super( "(2.0.8,)" ); // 2.0.8+
+    }
+
+    public void testitMNG3426 ()
+        throws Exception
+    {
+
+        // The testdir is computed from the location of this
+        // file.
+        File testDir = ResourceExtractor.simpleExtractResources( getClass(), 
"/MNG-3426" );
+
+        Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+        List cliOptions = new ArrayList();
+        verifier.executeGoal( "org.codehaus.mojo:castor-maven-plugin:generate" 
);
+        verifier.verifyErrorFreeLog();
+
+        // The generated file header contains the castor version used for code 
generation
+        // "This class was automatically generated with <a 
href="http://www.castor.org";>Castor 1.1.1</a> ..."
+        File generated = new File( testDir, 
"target/generated-sources/castor/Test.java" );
+        String file = FileUtils.fileRead( generated );
+        Assert.assertTrue( file.indexOf( "Castor 1.1.1" ) > 0 );
+    }
+}

Propchange: 
maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng3426PluginsClasspathOverrideTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng3426PluginsClasspathOverrideTest.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: 
maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng3426PluginsClasspathOverrideTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: 
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/MNG-3426/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/MNG-3426/pom.xml?rev=633012&view=auto
==============================================================================
--- 
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/MNG-3426/pom.xml
 (added)
+++ 
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/MNG-3426/pom.xml
 Mon Mar  3 01:55:18 2008
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+    xmlns="http://maven.apache.org/POM/4.0.0";
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
+
+       <groupId>org.apache.maven.its.mgn3426</groupId>
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>mng-issue-3426</artifactId>
+    <packaging>jar</packaging>
+    <name>Issue 3426</name>
+    <version>SNAPSHOT</version>
+    <description><![CDATA[Demonstration of issue 3426.]]></description>
+    
+    <build>
+         <plugins>
+           <!-- Castor code generator includes in generated files Header the 
version of castor used
+                    during code generation. With the following configuration 
we expect castor 1.1.1 to
+                        generate code. On maven 2.0.8 plugin uses castor 
1.1.2.1 as specified in plugin POM
+               -->
+           <plugin>
+                 <groupId>org.codehaus.mojo</groupId>
+                 <artifactId>castor-maven-plugin</artifactId>    
+                 <version>2.0-alpha1</version>
+                 <dependencies>
+                   <dependency>
+                         <groupId>org.codehaus.castor</groupId>
+                         <artifactId>castor-codegen</artifactId>
+              <version>1.1.1</version> 
+                       </dependency>
+                 </dependencies>
+               </plugin>               
+         </plugins>
+       </build>
+    
+</project>

Propchange: 
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/MNG-3426/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/MNG-3426/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: 
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/MNG-3426/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: 
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/MNG-3426/src/main/castor/castorbuilder.properties
URL: 
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/MNG-3426/src/main/castor/castorbuilder.properties?rev=633012&view=auto
==============================================================================
    (empty)

Propchange: 
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/MNG-3426/src/main/castor/castorbuilder.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/MNG-3426/src/main/castor/castorbuilder.properties
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: 
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/MNG-3426/src/main/castor/castorbuilder.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: 
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/MNG-3426/src/main/castor/test.xsd
URL: 
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/MNG-3426/src/main/castor/test.xsd?rev=633012&view=auto
==============================================================================
--- 
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/MNG-3426/src/main/castor/test.xsd
 (added)
+++ 
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/MNG-3426/src/main/castor/test.xsd
 Mon Mar  3 01:55:18 2008
@@ -0,0 +1,14 @@
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";>
+
+<xs:element name="test">
+  <xs:complexType>
+    <xs:attribute name="name" type="xs:string" use ="required"/>
+  </xs:complexType>
+</xs:element>
+
+</xs:schema>
+
+  
+  
+  
+

Propchange: 
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/MNG-3426/src/main/castor/test.xsd
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/MNG-3426/src/main/castor/test.xsd
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: 
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/MNG-3426/src/main/castor/test.xsd
------------------------------------------------------------------------------
    svn:mime-type = text/xml


Reply via email to