Skip to content

Commit ac740a7

Browse files
[MDEPLOY-319] Cleanup of test code
1 parent da2ad90 commit ac740a7

File tree

51 files changed

+580
-676
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+580
-676
lines changed

src/it/3rd-party-jar-with-extras/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ under the License.
2222
<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">
2323
<modelVersion>4.0.0</modelVersion>
2424

25-
<groupId>org.apache.maven.its.deploy.tpjwop</groupId>
25+
<groupId>org.apache.maven.its.deploy.tpjwop1</groupId>
2626
<artifactId>test</artifactId>
2727
<version>1.0</version>
2828
<packaging>jar</packaging>

src/it/skip/setup.bsh src/it/3rd-party-jar-with-extras/setup.groovy

+1-10
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,4 @@
1717
* under the License.
1818
*/
1919

20-
import java.io.*;
21-
import java.util.*;
22-
23-
import org.codehaus.plexus.util.*;
24-
25-
File file = new File( localRepositoryPath, "org/apache/maven/its/deploy/skip" );
26-
System.out.println( "Deleting " + file );
27-
FileUtils.deleteDirectory( file );
28-
29-
return true;
20+
assert new File(localRepositoryPath, 'org/apache/maven/its/deploy/tpjwop1').deleteDir()

src/it/3rd-party-jar-with-extras/test.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
file = test-0.1.jar
1919
url = file:target/repo
20-
groupId = org.apache.maven.its.deploy.tpjwop
20+
groupId = org.apache.maven.its.deploy.tpjwop1
2121
artifactId = test
2222
version = 1.0
2323
packaging = jar

src/it/3rd-party-jar-with-extras/verify.bsh

+6-6
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ import java.util.*;
2222

2323
String[] paths =
2424
{
25-
"org/apache/maven/its/deploy/tpjwop/test/maven-metadata.xml",
26-
"org/apache/maven/its/deploy/tpjwop/test/1.0/test-1.0.jar",
27-
"org/apache/maven/its/deploy/tpjwop/test/1.0/test-1.0.zip",
28-
"org/apache/maven/its/deploy/tpjwop/test/1.0/test-1.0-src.tar.gz",
29-
"org/apache/maven/its/deploy/tpjwop/test/1.0/test-1.0.tar.gz",
25+
"org/apache/maven/its/deploy/tpjwop1/test/maven-metadata.xml",
26+
"org/apache/maven/its/deploy/tpjwop1/test/1.0/test-1.0.jar",
27+
"org/apache/maven/its/deploy/tpjwop1/test/1.0/test-1.0.zip",
28+
"org/apache/maven/its/deploy/tpjwop1/test/1.0/test-1.0-src.tar.gz",
29+
"org/apache/maven/its/deploy/tpjwop1/test/1.0/test-1.0.tar.gz",
3030
};
3131

3232
for ( String path : paths )
@@ -41,7 +41,7 @@ for ( String path : paths )
4141

4242
String[] missing =
4343
{
44-
"org/apache/maven/its/deploy/tpjwop/test/1.0/test-1.0.pom",
44+
"org/apache/maven/its/deploy/tpjwop1/test/1.0/test-1.0.pom",
4545
};
4646

4747
for ( String path : missing )

src/it/3rd-party-jar-without-pom/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ under the License.
2222
<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">
2323
<modelVersion>4.0.0</modelVersion>
2424

25-
<groupId>org.apache.maven.its.deploy.tpjwop</groupId>
25+
<groupId>org.apache.maven.its.deploy.tpjwop2</groupId>
2626
<artifactId>test</artifactId>
2727
<version>1.0</version>
2828
<packaging>jar</packaging>

src/it/3rd-party-jar-without-pom/setup.bsh

-33
This file was deleted.

src/it/mdeploy-45-test/setup.bsh src/it/3rd-party-jar-without-pom/setup.groovy

+1-14
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,4 @@
1717
* under the License.
1818
*/
1919

20-
import java.io.*;
21-
import java.util.*;
22-
23-
import org.codehaus.plexus.util.*;
24-
25-
File file = new File( localRepositoryPath, "org/apache/maven/its/deploy/45" );
26-
System.out.println( "Deleting " + file );
27-
FileUtils.deleteDirectory( file );
28-
29-
file = new File( basedir, "target/repo" );
30-
System.out.println( "Deleting " + file );
31-
FileUtils.deleteDirectory( file );
32-
33-
return true;
20+
assert new File(localRepositoryPath, 'org/apache/maven/its/deploy/tpjwop2').deleteDir()

src/it/3rd-party-jar-without-pom/test.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
file = test-0.1.jar
1919
url = file:target/repo
20-
groupId = org.apache.maven.its.deploy.tpjwop
20+
groupId = org.apache.maven.its.deploy.tpjwop2
2121
artifactId = test
2222
version = 1.0
2323
packaging = jar

src/it/3rd-party-jar-without-pom/verify.bsh

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ import java.util.*;
2222

2323
String[] paths =
2424
{
25-
"org/apache/maven/its/deploy/tpjwop/test/maven-metadata.xml",
26-
"org/apache/maven/its/deploy/tpjwop/test/1.0/test-1.0.jar",
25+
"org/apache/maven/its/deploy/tpjwop2/test/maven-metadata.xml",
26+
"org/apache/maven/its/deploy/tpjwop2/test/1.0/test-1.0.jar",
2727
};
2828

2929
for ( String path : paths )
@@ -38,7 +38,7 @@ for ( String path : paths )
3838

3939
String[] missing =
4040
{
41-
"org/apache/maven/its/deploy/tpjwop/test/1.0/test-1.0.pom",
41+
"org/apache/maven/its/deploy/tpjwop2/test/1.0/test-1.0.pom",
4242
};
4343

4444
for ( String path : missing )
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
invoker.goals = clean jar:jar deploy:deploy
+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
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+
<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">
23+
<modelVersion>4.0.0</modelVersion>
24+
25+
<groupId>org.apache.maven.its.deploy.invalid-pom</groupId>
26+
<artifactId>test</artifactId>
27+
<version>1.0</version>
28+
<packaging>pom</packaging>
29+
30+
<description>
31+
Tests the deployment of a simple release POM.
32+
</description>
33+
34+
<properties>
35+
<maven.test.skip>true</maven.test.skip>
36+
</properties>
37+
38+
<distributionManagement>
39+
<repository>
40+
<id>it</id>
41+
<url>file:///${basedir}/target/repo</url>
42+
</repository>
43+
</distributionManagement>
44+
45+
<build>
46+
<plugins>
47+
<plugin>
48+
<groupId>org.apache.maven.plugins</groupId>
49+
<artifactId>maven-compiler-plugin</artifactId>
50+
<version>@mavenCompilerPluginVersion@</version>
51+
</plugin>
52+
<plugin>
53+
<groupId>org.apache.maven.plugins</groupId>
54+
<artifactId>maven-deploy-plugin</artifactId>
55+
<version>@project.version@</version>
56+
</plugin>
57+
<plugin>
58+
<groupId>org.apache.maven.plugins</groupId>
59+
<artifactId>maven-install-plugin</artifactId>
60+
<version>@mavenInstallPluginVersion@</version>
61+
</plugin>
62+
<plugin>
63+
<groupId>org.apache.maven.plugins</groupId>
64+
<artifactId>maven-resources-plugin</artifactId>
65+
<version>@mavenResourcesPluginVersion@</version>
66+
</plugin>
67+
<plugin>
68+
<groupId>org.apache.maven.plugins</groupId>
69+
<artifactId>maven-surefire-plugin</artifactId>
70+
<version>@mavenSurefirePluginVersion@</version>
71+
</plugin>
72+
</plugins>
73+
</build>
74+
75+
</project>

src/it/alt-deploy-repo-with-dist-mgmt-snapshot/setup.bsh

-33
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
assert new File(localRepositoryPath, 'org/apache/maven/its/deploy/adrwdms').deleteDir()

src/it/alt-deploy-repo-with-dist-mgmt/setup.bsh

-33
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
assert new File(localRepositoryPath, 'org/apache/maven/its/deploy/adrwdm').deleteDir()

src/it/alt-deploy-repo-without-dist-mgmt/setup.bsh

-33
This file was deleted.

0 commit comments

Comments
 (0)