You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by br...@apache.org on 2009/02/06 11:15:34 UTC
svn commit: r741501 - in
/maven/core-integration-testing/trunk/core-it-suite/src/test:
java/org/apache/maven/it/MavenITmng3288SystemScopeDirTest.java
resources/mng-3288/ resources/mng-3288/lib/ resources/mng-3288/lib/test.jar
resources/mng-3288/pom.xml
Author: brett
Date: Fri Feb 6 10:15:33 2009
New Revision: 741501
URL: http://svn.apache.org/viewvc?rev=741501&view=rev
Log:
[MNG-3288] add integration test
Submitted by: Benjamin Bentmann (via MNG-3768)
Added:
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3288SystemScopeDirTest.java (with props)
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3288/
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3288/lib/
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3288/lib/test.jar (with props)
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3288/pom.xml (with props)
Added: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3288SystemScopeDirTest.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3288SystemScopeDirTest.java?rev=741501&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3288SystemScopeDirTest.java (added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3288SystemScopeDirTest.java Fri Feb 6 10:15:33 2009
@@ -0,0 +1,60 @@
+package org.apache.maven.it;
+
+/*
+ * 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 org.apache.maven.it.Verifier;
+import org.apache.maven.it.VerificationException;
+import org.apache.maven.it.util.ResourceExtractor;
+
+import java.io.File;
+import java.util.List;
+
+/**
+ * This is a test for <a href="http://jira.codehaus.org/browse/MNG-3288">MNG-3288</a>.
+ *
+ * @author Benjamin Bentmann
+ */
+public class MavenITmng3288SystemScopeDirTest
+ extends AbstractMavenIntegrationTestCase
+{
+
+ /**
+ * Test the use of a system scoped dependency to a directory instead of a JAR which should fail early.
+ */
+ public void testitMNG3288()
+ throws Exception
+ {
+ File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-3288" );
+
+ Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+ verifier.setAutoclean( false );
+ try
+ {
+ verifier.executeGoal( "org.apache.maven.its.plugins:maven-it-plugin-dependency-resolution::compile" );
+ fail( "Usage of directory instead of file for system-scoped dependency did not fail dependency resolution" );
+ }
+ catch ( VerificationException e )
+ {
+ // expected, <systemPath> of a system-scoped dependency should be a file, not a directory
+ }
+ verifier.resetStreams();
+ }
+
+}
Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3288SystemScopeDirTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3288/lib/test.jar
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3288/lib/test.jar?rev=741501&view=auto
==============================================================================
Binary file - no diff available.
Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3288/lib/test.jar
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3288/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3288/pom.xml?rev=741501&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3288/pom.xml (added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3288/pom.xml Fri Feb 6 10:15:33 2009
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project>
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.maven.its.mng3288</groupId>
+ <artifactId>mng-3288</artifactId>
+ <version>1.0</version>
+ <packaging>jar</packaging>
+
+ <name>Maven Integration Test :: MNG-3288</name>
+ <description>
+ Test the use of a system scoped dependency to a directory instead of a JAR which should fail early.
+ </description>
+
+ <dependencies>
+ <dependency>
+ <groupId>it</groupId>
+ <artifactId>it</artifactId>
+ <version>1.0</version>
+ <scope>system</scope>
+ <systemPath>${basedir}/lib</systemPath>
+ </dependency>
+ </dependencies>
+</project>
Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3288/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native