Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MDEPLOY-319] Cleanup of test code #58

Merged
merged 1 commit into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/it/3rd-party-jar-with-extras/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ under the License.
<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>org.apache.maven.its.deploy.tpjwop</groupId>
<groupId>org.apache.maven.its.deploy.tpjwop1</groupId>
<artifactId>test</artifactId>
<version>1.0</version>
<packaging>jar</packaging>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,4 @@
* under the License.
*/

import java.io.*;
import java.util.*;

import org.codehaus.plexus.util.*;

File file = new File( localRepositoryPath, "org/apache/maven/its/deploy/skip" );
System.out.println( "Deleting " + file );
FileUtils.deleteDirectory( file );

return true;
assert new File(localRepositoryPath, 'org/apache/maven/its/deploy/tpjwop1').deleteDir()
2 changes: 1 addition & 1 deletion src/it/3rd-party-jar-with-extras/test.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

file = test-0.1.jar
url = file:target/repo
groupId = org.apache.maven.its.deploy.tpjwop
groupId = org.apache.maven.its.deploy.tpjwop1
artifactId = test
version = 1.0
packaging = jar
Expand Down
12 changes: 6 additions & 6 deletions src/it/3rd-party-jar-with-extras/verify.bsh
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ import java.util.*;

String[] paths =
{
"org/apache/maven/its/deploy/tpjwop/test/maven-metadata.xml",
"org/apache/maven/its/deploy/tpjwop/test/1.0/test-1.0.jar",
"org/apache/maven/its/deploy/tpjwop/test/1.0/test-1.0.zip",
"org/apache/maven/its/deploy/tpjwop/test/1.0/test-1.0-src.tar.gz",
"org/apache/maven/its/deploy/tpjwop/test/1.0/test-1.0.tar.gz",
"org/apache/maven/its/deploy/tpjwop1/test/maven-metadata.xml",
"org/apache/maven/its/deploy/tpjwop1/test/1.0/test-1.0.jar",
"org/apache/maven/its/deploy/tpjwop1/test/1.0/test-1.0.zip",
"org/apache/maven/its/deploy/tpjwop1/test/1.0/test-1.0-src.tar.gz",
"org/apache/maven/its/deploy/tpjwop1/test/1.0/test-1.0.tar.gz",
};

for ( String path : paths )
Expand All @@ -41,7 +41,7 @@ for ( String path : paths )

String[] missing =
{
"org/apache/maven/its/deploy/tpjwop/test/1.0/test-1.0.pom",
"org/apache/maven/its/deploy/tpjwop1/test/1.0/test-1.0.pom",
};

for ( String path : missing )
Expand Down
2 changes: 1 addition & 1 deletion src/it/3rd-party-jar-without-pom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ under the License.
<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>org.apache.maven.its.deploy.tpjwop</groupId>
<groupId>org.apache.maven.its.deploy.tpjwop2</groupId>
<artifactId>test</artifactId>
<version>1.0</version>
<packaging>jar</packaging>
Expand Down
33 changes: 0 additions & 33 deletions src/it/3rd-party-jar-without-pom/setup.bsh

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,4 @@
* under the License.
*/

import java.io.*;
import java.util.*;

import org.codehaus.plexus.util.*;

File file = new File( localRepositoryPath, "org/apache/maven/its/deploy/45" );
System.out.println( "Deleting " + file );
FileUtils.deleteDirectory( file );

file = new File( basedir, "target/repo" );
System.out.println( "Deleting " + file );
FileUtils.deleteDirectory( file );

return true;
assert new File(localRepositoryPath, 'org/apache/maven/its/deploy/tpjwop2').deleteDir()
2 changes: 1 addition & 1 deletion src/it/3rd-party-jar-without-pom/test.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

file = test-0.1.jar
url = file:target/repo
groupId = org.apache.maven.its.deploy.tpjwop
groupId = org.apache.maven.its.deploy.tpjwop2
artifactId = test
version = 1.0
packaging = jar
Expand Down
6 changes: 3 additions & 3 deletions src/it/3rd-party-jar-without-pom/verify.bsh
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import java.util.*;

String[] paths =
{
"org/apache/maven/its/deploy/tpjwop/test/maven-metadata.xml",
"org/apache/maven/its/deploy/tpjwop/test/1.0/test-1.0.jar",
"org/apache/maven/its/deploy/tpjwop2/test/maven-metadata.xml",
"org/apache/maven/its/deploy/tpjwop2/test/1.0/test-1.0.jar",
};

for ( String path : paths )
Expand All @@ -38,7 +38,7 @@ for ( String path : paths )

String[] missing =
{
"org/apache/maven/its/deploy/tpjwop/test/1.0/test-1.0.pom",
"org/apache/maven/its/deploy/tpjwop2/test/1.0/test-1.0.pom",
};

for ( String path : missing )
Expand Down
18 changes: 18 additions & 0 deletions src/it/MDEPLOY-318-invalid-pom/invoker.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# 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.

invoker.goals = clean jar:jar deploy:deploy
75 changes: 75 additions & 0 deletions src/it/MDEPLOY-318-invalid-pom/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<?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 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>org.apache.maven.its.deploy.invalid-pom</groupId>
<artifactId>test</artifactId>
<version>1.0</version>
<packaging>pom</packaging>

<description>
Tests the deployment of a simple release POM.
</description>

<properties>
<maven.test.skip>true</maven.test.skip>
</properties>

<distributionManagement>
<repository>
<id>it</id>
<url>file:///${basedir}/target/repo</url>
</repository>
</distributionManagement>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>@mavenCompilerPluginVersion@</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>@project.version@</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>@mavenInstallPluginVersion@</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>@mavenResourcesPluginVersion@</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>@mavenSurefirePluginVersion@</version>
</plugin>
</plugins>
</build>

</project>
33 changes: 0 additions & 33 deletions src/it/alt-deploy-repo-with-dist-mgmt-snapshot/setup.bsh

This file was deleted.

20 changes: 20 additions & 0 deletions src/it/alt-deploy-repo-with-dist-mgmt-snapshot/setup.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* 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.
*/

assert new File(localRepositoryPath, 'org/apache/maven/its/deploy/adrwdms').deleteDir()
33 changes: 0 additions & 33 deletions src/it/alt-deploy-repo-with-dist-mgmt/setup.bsh

This file was deleted.

20 changes: 20 additions & 0 deletions src/it/alt-deploy-repo-with-dist-mgmt/setup.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* 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.
*/

assert new File(localRepositoryPath, 'org/apache/maven/its/deploy/adrwdm').deleteDir()
33 changes: 0 additions & 33 deletions src/it/alt-deploy-repo-without-dist-mgmt/setup.bsh

This file was deleted.

Loading