You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sl...@apache.org on 2019/01/08 23:40:19 UTC

[maven-integration-testing] branch MNG-6256 updated (0aad02b -> ae200c3)

This is an automated email from the ASF dual-hosted git repository.

slachiewicz pushed a change to branch MNG-6256
in repository https://gitbox.apache.org/repos/asf/maven-integration-testing.git.


 discard 0aad02b  MNG-6265 Add integration test
     new ae200c3  MNG-6265 Add integration test

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (0aad02b)
            \
             N -- N -- N   refs/heads/MNG-6256 (ae200c3)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../apache/maven/it/MavenITmng6256SpecialCharsAlternatePOMLocation.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


[maven-integration-testing] 01/01: MNG-6265 Add integration test

Posted by sl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

slachiewicz pushed a commit to branch MNG-6256
in repository https://gitbox.apache.org/repos/asf/maven-integration-testing.git

commit ae200c3ac54dc61e84e29439fed7b0a87c4fa7cb
Author: Christoph Etzel <ch...@informatik.uni-augsburg.de>
AuthorDate: Fri Jul 14 10:43:58 2017 +0200

    MNG-6265 Add integration test
---
 .../org/apache/maven/it/IntegrationTestSuite.java  |  1 +
 ...nITmng6256SpecialCharsAlternatePOMLocation.java | 92 ++++++++++++++++++++++
 .../folder-with- -space/pom.xml                    |  8 ++
 .../folder-with-)-closing-bracket/pom.xml          |  8 ++
 4 files changed, 109 insertions(+)

diff --git a/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java b/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java
index 324bcf5..6ca0637 100644
--- a/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java
+++ b/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java
@@ -106,6 +106,7 @@ public class IntegrationTestSuite
         // -------------------------------------------------------------------------------------------------------------
         // suite.addTestSuite( MavenIT0108SnapshotUpdateTest.class ); -- MNG-3137
 
+        suite.addTestSuite( MavenITmng6256SpecialCharsAlternatePOMLocation.class );
         suite.addTestSuite( MavenITmng6386BaseUriPropertyTest.class );
         suite.addTestSuite( MavenITmng6330RelativePath.class );
         suite.addTestSuite( MavenITmng5965ParallelBuildMultipliesWorkTest.class );
diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6256SpecialCharsAlternatePOMLocation.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6256SpecialCharsAlternatePOMLocation.java
new file mode 100644
index 0000000..5038113
--- /dev/null
+++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6256SpecialCharsAlternatePOMLocation.java
@@ -0,0 +1,92 @@
+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 java.io.File;
+
+import org.apache.maven.it.util.ResourceExtractor;
+
+/**
+ * This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-6256">MNG-6256</a>: check that directories
+ * passed via <code>-f/--file</code> containing special characters do not break the script. E.g
+ * <code>-f "folderWithClosing)Bracket/pom.xml"</code>.
+ */
+public class MavenITmng6256SpecialCharsAlternatePOMLocation
+    extends AbstractMavenIntegrationTestCase
+{
+    public MavenITmng6256SpecialCharsAlternatePOMLocation()
+    {
+        super( "(3.6.0,)" );
+    }
+
+    protected MavenITmng6256SpecialCharsAlternatePOMLocation( String constraint )
+    {
+        super( constraint );
+    }
+
+    /**
+     * check script is working when path to POM is set to <code>folder-with- -space</code>
+     */
+    public void testFolderWithSpace()
+        throws Exception
+    {
+        runWithMvnFileLongOption( "folder-with- -space" );
+        runWithMvnFileShortOption( "folder-with- -space" );
+    }
+
+    /**
+     * check script is working when path to POM is set to <code>folder-with-)-closing-bracket</code>
+     */
+    public void testFolderWithClosingBracket()
+        throws Exception
+    {
+        runWithMvnFileLongOption( "folder-with-)-closing-bracket" );
+        runWithMvnFileShortOption( "folder-with-)-closing-bracket" );
+    }
+
+    private void runWithMvnFileLongOption( String subDir )
+        throws Exception
+    {
+        runCoreExtensionWithOption( "--file", subDir );
+    }
+
+    private void runWithMvnFileShortOption( String subDir )
+        throws Exception
+    {
+        runCoreExtensionWithOption( "-f", subDir );
+    }
+
+    private void runCoreExtensionWithOption( String option, String subDir )
+        throws Exception
+    {
+        File resourceDir =
+            ResourceExtractor.simpleExtractResources( getClass(), "/mng-6256-special-chars-alternate-pom-location" );
+
+        File testDir = new File( resourceDir, "../mng-6256-" + subDir );
+        testDir.mkdir();
+
+        Verifier verifier = newVerifier( testDir.getAbsolutePath() );
+        verifier.getCliOptions().add( option ); // -f/--file
+        verifier.getCliOptions().add( "\"" + new File( resourceDir, subDir ).getAbsolutePath() + "\"" ); // "<path>"
+        verifier.executeGoal( "validate" );
+        verifier.verifyErrorFreeLog();
+        verifier.resetStreams();
+    }
+}
diff --git a/core-it-suite/src/test/resources/mng-6256-special-chars-alternate-pom-location/folder-with- -space/pom.xml b/core-it-suite/src/test/resources/mng-6256-special-chars-alternate-pom-location/folder-with- -space/pom.xml
new file mode 100644
index 0000000..1faf517
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-6256-special-chars-alternate-pom-location/folder-with- -space/pom.xml	
@@ -0,0 +1,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/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>scratch</groupId>
+  <artifactId>scratch</artifactId>
+  <version>0.0.1-SNAPSHOT</version>
+  <build>
+  </build>
+</project>
diff --git a/core-it-suite/src/test/resources/mng-6256-special-chars-alternate-pom-location/folder-with-)-closing-bracket/pom.xml b/core-it-suite/src/test/resources/mng-6256-special-chars-alternate-pom-location/folder-with-)-closing-bracket/pom.xml
new file mode 100644
index 0000000..1faf517
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-6256-special-chars-alternate-pom-location/folder-with-)-closing-bracket/pom.xml
@@ -0,0 +1,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/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>scratch</groupId>
+  <artifactId>scratch</artifactId>
+  <version>0.0.1-SNAPSHOT</version>
+  <build>
+  </build>
+</project>