1 package org.apache.maven.it;
2
3 /*
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements. See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership. The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the
9 * "License"); you may not use this file except in compliance
10 * with the License. You may obtain a copy of the License at
11 *
12 * http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing,
15 * software distributed under the License is distributed on an
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 * KIND, either express or implied. See the License for the
18 * specific language governing permissions and limitations
19 * under the License.
20 */
21
22 import java.io.File;
23
24 import org.apache.maven.it.util.ResourceExtractor;
25
26 /**
27 * This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-3331">MNG-3331</a>.
28 *
29 * @author <a href="mailto:brianf@apache.org">Brian Fox</a>
30 *
31 */
32 public class MavenITmng3331ModulePathNormalizationTest
33 extends AbstractMavenIntegrationTestCase
34 {
35 public MavenITmng3331ModulePathNormalizationTest()
36 {
37 super( ALL_MAVEN_VERSIONS );
38 }
39
40 public void testitMNG3331a ()
41 throws Exception
42 {
43 //testMNG3331ModuleWithSpaces
44 File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-3331/with-spaces" );
45
46 Verifier verifier;
47
48 verifier = newVerifier( testDir.getAbsolutePath() );
49
50 verifier.executeGoal( "initialize" );
51
52 /*
53 * This is the simplest way to check a build
54 * succeeded. It is also the simplest way to create
55 * an IT test: make the build pass when the test
56 * should pass, and make the build fail when the
57 * test should fail. There are other methods
58 * supported by the verifier. They can be seen here:
59 * http://maven.apache.org/shared/maven-verifier/apidocs/index.html
60 */
61 verifier.verifyErrorFreeLog();
62
63 /*
64 * Reset the streams before executing the verifier
65 * again.
66 */
67 verifier.resetStreams();
68 }
69
70 public void testitMNG3331b ()
71 throws Exception
72 {
73 //testMNG3331ModuleWithRelativeParentDirRef
74 File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-3331/with-relative-parentDir-ref" );
75
76 Verifier verifier;
77
78 verifier = newVerifier( new File( testDir, "parent" ).getAbsolutePath() );
79
80 verifier.executeGoal( "initialize" );
81
82 /*
83 * This is the simplest way to check a build
84 * succeeded. It is also the simplest way to create
85 * an IT test: make the build pass when the test
86 * should pass, and make the build fail when the
87 * test should fail. There are other methods
88 * supported by the verifier. They can be seen here:
89 * http://maven.apache.org/shared/maven-verifier/apidocs/index.html
90 */
91 verifier.verifyErrorFreeLog();
92
93 /*
94 * Reset the streams before executing the verifier
95 * again.
96 */
97 verifier.resetStreams();
98 }
99
100 }