You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by jd...@apache.org on 2008/07/02 23:16:50 UTC
svn commit: r673501 - in
/maven/core-integration-testing/trunk/core-integration-tests/src/test:
java/org/apache/maven/integrationtests/MavenITmng3645POMSyntaxErrorTest.java
resources/mng-3645-pomSyntaxError/ resources/mng-3645-pomSyntaxError/pom.xml
Author: jdcasey
Date: Wed Jul 2 14:16:50 2008
New Revision: 673501
URL: http://svn.apache.org/viewvc?rev=673501&view=rev
Log:
[MNG-3645] Adding integration test.
Added:
maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng3645POMSyntaxErrorTest.java (with props)
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-3645-pomSyntaxError/
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-3645-pomSyntaxError/pom.xml (with props)
Added: maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng3645POMSyntaxErrorTest.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng3645POMSyntaxErrorTest.java?rev=673501&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng3645POMSyntaxErrorTest.java (added)
+++ maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng3645POMSyntaxErrorTest.java Wed Jul 2 14:16:50 2008
@@ -0,0 +1,67 @@
+/*
+ * 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.
+ */
+
+package org.apache.maven.integrationtests;
+
+import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException;
+import org.apache.maven.it.VerificationException;
+import org.apache.maven.it.Verifier;
+import org.apache.maven.it.util.ResourceExtractor;
+
+import java.io.File;
+
+/**
+ * This is a test set for <a href="http://jira.codehaus.org/browse/MNG-xxxx">MNG-xxxx</a>.
+ *
+ * @todo Fill in a better description of what this test verifies!
+ *
+ * @author <a href="mailto:brianf@apache.org">Brian Fox</a>
+ * @author jdcasey
+ *
+ */
+public class MavenITmng3645POMSyntaxErrorTest
+ extends AbstractMavenIntegrationTestCase
+{
+ public MavenITmng3645POMSyntaxErrorTest()
+ throws InvalidVersionSpecificationException
+ {
+ super( "(2.0.10,)" ); // only test in 2.0.10+
+ }
+
+ public void testitMNG3645 ()
+ throws Exception
+ {
+ // The testdir is computed from the location of this
+ // file.
+ File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-3645-pomSyntaxError" );
+
+ Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+
+ try
+ {
+ verifier.executeGoal( "validate" );
+
+ fail( "Should fail to validate the POM syntax due to missing dependency element inside dependencyManagement section." );
+ }
+ catch ( VerificationException e )
+ {
+ // expect this.
+ }
+ }
+}
Propchange: maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng3645POMSyntaxErrorTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng3645POMSyntaxErrorTest.java
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-3645-pomSyntaxError/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-3645-pomSyntaxError/pom.xml?rev=673501&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-3645-pomSyntaxError/pom.xml (added)
+++ maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-3645-pomSyntaxError/pom.xml Wed Jul 2 14:16:50 2008
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<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">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.maven.its.mngxxxx</groupId>
+ <artifactId>consumer</artifactId>
+ <packaging>jar</packaging>
+ <version>1</version>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.its.mngxxxx</groupId>
+ <artifactId>directdep</artifactId>
+ <version>1</version>
+ </dependency>
+ </dependencies>
+ <dependencyManagement>
+ <dependencies>
+ <groupId>org.apache.maven.its.mngxxxx</groupId>
+ <artifactId>transdep</artifactId>
+ <version>2</version>
+ </dependencies>
+ </dependencyManagement>
+</project>
Propchange: maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-3645-pomSyntaxError/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-3645-pomSyntaxError/pom.xml
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"