From d50e75f0acaf3953a1c946aad7c776b5205ac470 Mon Sep 17 00:00:00 2001 From: Slawomir Jaranowski Date: Fri, 14 Jun 2024 00:08:03 +0200 Subject: [PATCH] [MDEPLOY-319] Cleanup of test code --- src/it/3rd-party-jar-with-extras/pom.xml | 2 +- .../setup.groovy} | 11 +-- .../3rd-party-jar-with-extras/test.properties | 2 +- src/it/3rd-party-jar-with-extras/verify.bsh | 12 +-- src/it/3rd-party-jar-without-pom/pom.xml | 2 +- src/it/3rd-party-jar-without-pom/setup.bsh | 33 -------- .../setup.groovy} | 15 +--- .../3rd-party-jar-without-pom/test.properties | 2 +- src/it/3rd-party-jar-without-pom/verify.bsh | 6 +- .../invoker.properties | 18 +++++ src/it/MDEPLOY-318-invalid-pom/pom.xml | 75 +++++++++++++++++++ .../setup.bsh | 33 -------- .../setup.groovy | 20 +++++ .../alt-deploy-repo-with-dist-mgmt/setup.bsh | 33 -------- .../setup.groovy | 20 +++++ .../setup.bsh | 33 -------- .../setup.groovy | 20 +++++ src/it/attach-release-jar/setup.bsh | 33 -------- src/it/attach-release-jar/setup.groovy | 20 +++++ src/it/deploy-bom/invoker.properties | 18 +++++ src/it/deploy-bom/pom.xml | 67 +++++++++++++++++ .../setup.bsh => deploy-bom/setup.groovy} | 6 +- .../setup.bsh => deploy-bom/verify.groovy} | 18 ++--- src/it/external-release-jar/setup.bsh | 33 -------- .../setup.groovy} | 7 +- src/it/gav-validation/setup.bsh | 33 -------- src/it/gav-validation/setup.groovy | 20 +++++ src/it/mdeploy-45-test/setup.groovy | 20 +++++ src/it/no-main-artifact-1/setup.bsh | 33 -------- src/it/no-main-artifact-1/setup.groovy | 20 +++++ src/it/no-main-artifact-2/setup.bsh | 33 -------- src/it/no-main-artifact-2/setup.groovy | 20 +++++ src/it/non-default-pom/setup.bsh | 33 -------- src/it/non-default-pom/setup.groovy | 20 +++++ src/it/offline/setup.bsh | 33 -------- src/it/offline/setup.groovy | 20 +++++ src/it/release-jar/setup.bsh | 33 -------- src/it/release-jar/setup.groovy | 20 +++++ src/it/release-pom/setup.bsh | 33 -------- src/it/release-pom/setup.groovy | 20 +++++ src/it/skip-release-jar/setup.bsh | 33 -------- src/it/skip-release-jar/setup.groovy | 20 +++++ src/it/skip-snapshot-jar/setup.bsh | 33 -------- src/it/skip-snapshot-jar/setup.groovy | 20 +++++ src/it/skip/setup.groovy | 20 +++++ src/it/snapshot-jar/setup.bsh | 33 -------- src/it/snapshot-jar/setup.groovy | 20 +++++ src/it/snapshot-pom/setup.bsh | 33 -------- src/it/snapshot-pom/setup.groovy | 20 +++++ .../plugins/deploy/DeployFileMojoTest.java | 30 ++++---- .../maven/plugins/deploy/DeployMojoTest.java | 64 ++++++---------- 51 files changed, 580 insertions(+), 676 deletions(-) rename src/it/{skip/setup.bsh => 3rd-party-jar-with-extras/setup.groovy} (76%) delete mode 100644 src/it/3rd-party-jar-without-pom/setup.bsh rename src/it/{mdeploy-45-test/setup.bsh => 3rd-party-jar-without-pom/setup.groovy} (68%) create mode 100644 src/it/MDEPLOY-318-invalid-pom/invoker.properties create mode 100644 src/it/MDEPLOY-318-invalid-pom/pom.xml delete mode 100644 src/it/alt-deploy-repo-with-dist-mgmt-snapshot/setup.bsh create mode 100644 src/it/alt-deploy-repo-with-dist-mgmt-snapshot/setup.groovy delete mode 100644 src/it/alt-deploy-repo-with-dist-mgmt/setup.bsh create mode 100644 src/it/alt-deploy-repo-with-dist-mgmt/setup.groovy delete mode 100644 src/it/alt-deploy-repo-without-dist-mgmt/setup.bsh create mode 100644 src/it/alt-deploy-repo-without-dist-mgmt/setup.groovy delete mode 100644 src/it/attach-release-jar/setup.bsh create mode 100644 src/it/attach-release-jar/setup.groovy create mode 100644 src/it/deploy-bom/invoker.properties create mode 100644 src/it/deploy-bom/pom.xml rename src/it/{deploy-attached-sources/setup.bsh => deploy-bom/setup.groovy} (88%) rename src/it/{3rd-party-jar-with-extras/setup.bsh => deploy-bom/verify.groovy} (67%) delete mode 100644 src/it/external-release-jar/setup.bsh rename src/it/{deploy-default-packaging/setup.bsh => external-release-jar/setup.groovy} (88%) delete mode 100644 src/it/gav-validation/setup.bsh create mode 100644 src/it/gav-validation/setup.groovy create mode 100644 src/it/mdeploy-45-test/setup.groovy delete mode 100644 src/it/no-main-artifact-1/setup.bsh create mode 100644 src/it/no-main-artifact-1/setup.groovy delete mode 100644 src/it/no-main-artifact-2/setup.bsh create mode 100644 src/it/no-main-artifact-2/setup.groovy delete mode 100644 src/it/non-default-pom/setup.bsh create mode 100644 src/it/non-default-pom/setup.groovy delete mode 100644 src/it/offline/setup.bsh create mode 100644 src/it/offline/setup.groovy delete mode 100644 src/it/release-jar/setup.bsh create mode 100644 src/it/release-jar/setup.groovy delete mode 100644 src/it/release-pom/setup.bsh create mode 100644 src/it/release-pom/setup.groovy delete mode 100644 src/it/skip-release-jar/setup.bsh create mode 100644 src/it/skip-release-jar/setup.groovy delete mode 100644 src/it/skip-snapshot-jar/setup.bsh create mode 100644 src/it/skip-snapshot-jar/setup.groovy create mode 100644 src/it/skip/setup.groovy delete mode 100644 src/it/snapshot-jar/setup.bsh create mode 100644 src/it/snapshot-jar/setup.groovy delete mode 100644 src/it/snapshot-pom/setup.bsh create mode 100644 src/it/snapshot-pom/setup.groovy diff --git a/src/it/3rd-party-jar-with-extras/pom.xml b/src/it/3rd-party-jar-with-extras/pom.xml index ad91bea2..6b79b510 100644 --- a/src/it/3rd-party-jar-with-extras/pom.xml +++ b/src/it/3rd-party-jar-with-extras/pom.xml @@ -22,7 +22,7 @@ under the License. 4.0.0 - org.apache.maven.its.deploy.tpjwop + org.apache.maven.its.deploy.tpjwop1 test 1.0 jar diff --git a/src/it/skip/setup.bsh b/src/it/3rd-party-jar-with-extras/setup.groovy similarity index 76% rename from src/it/skip/setup.bsh rename to src/it/3rd-party-jar-with-extras/setup.groovy index 6456ca5e..b9468e59 100644 --- a/src/it/skip/setup.bsh +++ b/src/it/3rd-party-jar-with-extras/setup.groovy @@ -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() diff --git a/src/it/3rd-party-jar-with-extras/test.properties b/src/it/3rd-party-jar-with-extras/test.properties index 6fd20939..09d58705 100644 --- a/src/it/3rd-party-jar-with-extras/test.properties +++ b/src/it/3rd-party-jar-with-extras/test.properties @@ -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 diff --git a/src/it/3rd-party-jar-with-extras/verify.bsh b/src/it/3rd-party-jar-with-extras/verify.bsh index 6c5f4c50..348e5f34 100644 --- a/src/it/3rd-party-jar-with-extras/verify.bsh +++ b/src/it/3rd-party-jar-with-extras/verify.bsh @@ -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 ) @@ -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 ) diff --git a/src/it/3rd-party-jar-without-pom/pom.xml b/src/it/3rd-party-jar-without-pom/pom.xml index ad91bea2..da4e8ab3 100644 --- a/src/it/3rd-party-jar-without-pom/pom.xml +++ b/src/it/3rd-party-jar-without-pom/pom.xml @@ -22,7 +22,7 @@ under the License. 4.0.0 - org.apache.maven.its.deploy.tpjwop + org.apache.maven.its.deploy.tpjwop2 test 1.0 jar diff --git a/src/it/3rd-party-jar-without-pom/setup.bsh b/src/it/3rd-party-jar-without-pom/setup.bsh deleted file mode 100644 index abd2b2cb..00000000 --- a/src/it/3rd-party-jar-without-pom/setup.bsh +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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.*; -import java.util.*; - -import org.codehaus.plexus.util.*; - -File file = new File( localRepositoryPath, "org/apache/maven/its/deploy/tpjwop" ); -System.out.println( "Deleting " + file ); -FileUtils.deleteDirectory( file ); - -file = new File( basedir, "target/repo" ); -System.out.println( "Deleting " + file ); -FileUtils.deleteDirectory( file ); - -return true; diff --git a/src/it/mdeploy-45-test/setup.bsh b/src/it/3rd-party-jar-without-pom/setup.groovy similarity index 68% rename from src/it/mdeploy-45-test/setup.bsh rename to src/it/3rd-party-jar-without-pom/setup.groovy index 08a516af..36a8f778 100644 --- a/src/it/mdeploy-45-test/setup.bsh +++ b/src/it/3rd-party-jar-without-pom/setup.groovy @@ -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() diff --git a/src/it/3rd-party-jar-without-pom/test.properties b/src/it/3rd-party-jar-without-pom/test.properties index 269719d4..e0bfbe2b 100644 --- a/src/it/3rd-party-jar-without-pom/test.properties +++ b/src/it/3rd-party-jar-without-pom/test.properties @@ -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 diff --git a/src/it/3rd-party-jar-without-pom/verify.bsh b/src/it/3rd-party-jar-without-pom/verify.bsh index 2e742227..36ec6964 100644 --- a/src/it/3rd-party-jar-without-pom/verify.bsh +++ b/src/it/3rd-party-jar-without-pom/verify.bsh @@ -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 ) @@ -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 ) diff --git a/src/it/MDEPLOY-318-invalid-pom/invoker.properties b/src/it/MDEPLOY-318-invalid-pom/invoker.properties new file mode 100644 index 00000000..c32d7bb5 --- /dev/null +++ b/src/it/MDEPLOY-318-invalid-pom/invoker.properties @@ -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 diff --git a/src/it/MDEPLOY-318-invalid-pom/pom.xml b/src/it/MDEPLOY-318-invalid-pom/pom.xml new file mode 100644 index 00000000..2ac4f83c --- /dev/null +++ b/src/it/MDEPLOY-318-invalid-pom/pom.xml @@ -0,0 +1,75 @@ + + + + + + 4.0.0 + + org.apache.maven.its.deploy.invalid-pom + test + 1.0 + pom + + + Tests the deployment of a simple release POM. + + + + true + + + + + it + file:///${basedir}/target/repo + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + @mavenCompilerPluginVersion@ + + + org.apache.maven.plugins + maven-deploy-plugin + @project.version@ + + + org.apache.maven.plugins + maven-install-plugin + @mavenInstallPluginVersion@ + + + org.apache.maven.plugins + maven-resources-plugin + @mavenResourcesPluginVersion@ + + + org.apache.maven.plugins + maven-surefire-plugin + @mavenSurefirePluginVersion@ + + + + + diff --git a/src/it/alt-deploy-repo-with-dist-mgmt-snapshot/setup.bsh b/src/it/alt-deploy-repo-with-dist-mgmt-snapshot/setup.bsh deleted file mode 100644 index 60ba9eb7..00000000 --- a/src/it/alt-deploy-repo-with-dist-mgmt-snapshot/setup.bsh +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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.*; -import java.util.*; - -import org.codehaus.plexus.util.*; - -File file = new File( localRepositoryPath, "org/apache/maven/its/deploy/adrwdms" ); -System.out.println( "Deleting " + file ); -FileUtils.deleteDirectory( file ); - -file = new File( basedir, "target/repo" ); -System.out.println( "Deleting " + file ); -FileUtils.deleteDirectory( file ); - -return true; diff --git a/src/it/alt-deploy-repo-with-dist-mgmt-snapshot/setup.groovy b/src/it/alt-deploy-repo-with-dist-mgmt-snapshot/setup.groovy new file mode 100644 index 00000000..c27a8584 --- /dev/null +++ b/src/it/alt-deploy-repo-with-dist-mgmt-snapshot/setup.groovy @@ -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() diff --git a/src/it/alt-deploy-repo-with-dist-mgmt/setup.bsh b/src/it/alt-deploy-repo-with-dist-mgmt/setup.bsh deleted file mode 100644 index eb93de93..00000000 --- a/src/it/alt-deploy-repo-with-dist-mgmt/setup.bsh +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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.*; -import java.util.*; - -import org.codehaus.plexus.util.*; - -File file = new File( localRepositoryPath, "org/apache/maven/its/deploy/adrwdm" ); -System.out.println( "Deleting " + file ); -FileUtils.deleteDirectory( file ); - -file = new File( basedir, "target/repo" ); -System.out.println( "Deleting " + file ); -FileUtils.deleteDirectory( file ); - -return true; diff --git a/src/it/alt-deploy-repo-with-dist-mgmt/setup.groovy b/src/it/alt-deploy-repo-with-dist-mgmt/setup.groovy new file mode 100644 index 00000000..8f00f5c1 --- /dev/null +++ b/src/it/alt-deploy-repo-with-dist-mgmt/setup.groovy @@ -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() diff --git a/src/it/alt-deploy-repo-without-dist-mgmt/setup.bsh b/src/it/alt-deploy-repo-without-dist-mgmt/setup.bsh deleted file mode 100644 index 09481636..00000000 --- a/src/it/alt-deploy-repo-without-dist-mgmt/setup.bsh +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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.*; -import java.util.*; - -import org.codehaus.plexus.util.*; - -File file = new File( localRepositoryPath, "org/apache/maven/its/deploy/adrwodm" ); -System.out.println( "Deleting " + file ); -FileUtils.deleteDirectory( file ); - -file = new File( basedir, "target/repo" ); -System.out.println( "Deleting " + file ); -FileUtils.deleteDirectory( file ); - -return true; diff --git a/src/it/alt-deploy-repo-without-dist-mgmt/setup.groovy b/src/it/alt-deploy-repo-without-dist-mgmt/setup.groovy new file mode 100644 index 00000000..f3b5b942 --- /dev/null +++ b/src/it/alt-deploy-repo-without-dist-mgmt/setup.groovy @@ -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/adrwodm').deleteDir() diff --git a/src/it/attach-release-jar/setup.bsh b/src/it/attach-release-jar/setup.bsh deleted file mode 100644 index b5382415..00000000 --- a/src/it/attach-release-jar/setup.bsh +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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.*; -import java.util.*; - -import org.codehaus.plexus.util.*; - -File file = new File( localRepositoryPath, "org/apache/maven/its/deploy/arj" ); -System.out.println( "Deleting " + file ); -FileUtils.deleteDirectory( file ); - -file = new File( basedir, "target/repo" ); -System.out.println( "Deleting " + file ); -FileUtils.deleteDirectory( file ); - -return true; diff --git a/src/it/attach-release-jar/setup.groovy b/src/it/attach-release-jar/setup.groovy new file mode 100644 index 00000000..385b11c1 --- /dev/null +++ b/src/it/attach-release-jar/setup.groovy @@ -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/arj').deleteDir() diff --git a/src/it/deploy-bom/invoker.properties b/src/it/deploy-bom/invoker.properties new file mode 100644 index 00000000..dd6ac481 --- /dev/null +++ b/src/it/deploy-bom/invoker.properties @@ -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.maven.version=4+ \ No newline at end of file diff --git a/src/it/deploy-bom/pom.xml b/src/it/deploy-bom/pom.xml new file mode 100644 index 00000000..c0aee9bb --- /dev/null +++ b/src/it/deploy-bom/pom.xml @@ -0,0 +1,67 @@ + + + + + + 4.0.0 + + org.apache.maven.its.deploy.bom + test + 1.0 + bom + + + Tests the deployment of bom packaging. + + + + + it + file:///${basedir}/target/repo + + + + + + + org.junit.jupiter + junit-jupiter-api + 5.10.2 + test + + + + + + + + org.apache.maven.plugins + maven-install-plugin + @version.maven-install-plugin@ + + + org.apache.maven.plugins + maven-deploy-plugin + @project.version@ + + + + + diff --git a/src/it/deploy-attached-sources/setup.bsh b/src/it/deploy-bom/setup.groovy similarity index 88% rename from src/it/deploy-attached-sources/setup.bsh rename to src/it/deploy-bom/setup.groovy index c2a9d19d..ca56db9e 100644 --- a/src/it/deploy-attached-sources/setup.bsh +++ b/src/it/deploy-bom/setup.groovy @@ -17,10 +17,6 @@ * under the License. */ -import java.io.*; -import java.util.*; -file = new File( basedir, "target/repo" ); -file.mkdirs(); +assert new File(localRepositoryPath, 'org/apache/maven/its/deploy/bom').deleteDir() -return true; diff --git a/src/it/3rd-party-jar-with-extras/setup.bsh b/src/it/deploy-bom/verify.groovy similarity index 67% rename from src/it/3rd-party-jar-with-extras/setup.bsh rename to src/it/deploy-bom/verify.groovy index abd2b2cb..2b314e99 100644 --- a/src/it/3rd-party-jar-with-extras/setup.bsh +++ b/src/it/deploy-bom/verify.groovy @@ -17,17 +17,15 @@ * under the License. */ -import java.io.*; -import java.util.*; +def expectedDeploys = [ + 'org/apache/maven/its/deploy/bom/test/1.0/test-1.0-build.pom', + 'org/apache/maven/its/deploy/bom/test/1.0/test-1.0.pom', + 'org/apache/maven/its/deploy/bom/test/maven-metadata.xml', +] -import org.codehaus.plexus.util.*; +def repoDir = new File ( basedir, 'target/repo') -File file = new File( localRepositoryPath, "org/apache/maven/its/deploy/tpjwop" ); -System.out.println( "Deleting " + file ); -FileUtils.deleteDirectory( file ); +def missingDeploys = expectedDeploys.findAll { ! new File(repoDir, it).isFile() } -file = new File( basedir, "target/repo" ); -System.out.println( "Deleting " + file ); -FileUtils.deleteDirectory( file ); +assert missingDeploys.size() == 0 -return true; diff --git a/src/it/external-release-jar/setup.bsh b/src/it/external-release-jar/setup.bsh deleted file mode 100644 index 5f69d968..00000000 --- a/src/it/external-release-jar/setup.bsh +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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.*; -import java.util.*; - -import org.codehaus.plexus.util.*; - -File file = new File( localRepositoryPath, "org/apache/maven/its/deploy/erj" ); -System.out.println( "Deleting " + file ); -FileUtils.deleteDirectory( file ); - -file = new File( basedir, "target/repo" ); -System.out.println( "Deleting " + file ); -FileUtils.deleteDirectory( file ); - -return true; diff --git a/src/it/deploy-default-packaging/setup.bsh b/src/it/external-release-jar/setup.groovy similarity index 88% rename from src/it/deploy-default-packaging/setup.bsh rename to src/it/external-release-jar/setup.groovy index c2a9d19d..cb31bfeb 100644 --- a/src/it/deploy-default-packaging/setup.bsh +++ b/src/it/external-release-jar/setup.groovy @@ -17,10 +17,5 @@ * under the License. */ -import java.io.*; -import java.util.*; +assert new File(localRepositoryPath, 'org/apache/maven/its/deploy/erj').deleteDir() -file = new File( basedir, "target/repo" ); -file.mkdirs(); - -return true; diff --git a/src/it/gav-validation/setup.bsh b/src/it/gav-validation/setup.bsh deleted file mode 100644 index 90152f04..00000000 --- a/src/it/gav-validation/setup.bsh +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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.*; -import java.util.*; - -import org.codehaus.plexus.util.*; - -File file = new File( localRepositoryPath, "org/apache/maven/its/deploy/gv" ); -System.out.println( "Deleting " + file ); -FileUtils.deleteDirectory( file ); - -file = new File( basedir, "target/repo" ); -System.out.println( "Deleting " + file ); -FileUtils.deleteDirectory( file ); - -return true; diff --git a/src/it/gav-validation/setup.groovy b/src/it/gav-validation/setup.groovy new file mode 100644 index 00000000..2f2cab79 --- /dev/null +++ b/src/it/gav-validation/setup.groovy @@ -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/gv').deleteDir() diff --git a/src/it/mdeploy-45-test/setup.groovy b/src/it/mdeploy-45-test/setup.groovy new file mode 100644 index 00000000..71d4f68c --- /dev/null +++ b/src/it/mdeploy-45-test/setup.groovy @@ -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/45').deleteDir() diff --git a/src/it/no-main-artifact-1/setup.bsh b/src/it/no-main-artifact-1/setup.bsh deleted file mode 100644 index dcdb7b4c..00000000 --- a/src/it/no-main-artifact-1/setup.bsh +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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.*; -import java.util.*; - -import org.codehaus.plexus.util.*; - -File file = new File( localRepositoryPath, "org/apache/maven/its/deploy/nma1" ); -System.out.println( "Deleting " + file ); -FileUtils.deleteDirectory( file ); - -file = new File( basedir, "target/repo" ); -System.out.println( "Deleting " + file ); -FileUtils.deleteDirectory( file ); - -return true; diff --git a/src/it/no-main-artifact-1/setup.groovy b/src/it/no-main-artifact-1/setup.groovy new file mode 100644 index 00000000..13803705 --- /dev/null +++ b/src/it/no-main-artifact-1/setup.groovy @@ -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/nma1').deleteDir() diff --git a/src/it/no-main-artifact-2/setup.bsh b/src/it/no-main-artifact-2/setup.bsh deleted file mode 100644 index 34b9183b..00000000 --- a/src/it/no-main-artifact-2/setup.bsh +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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.*; -import java.util.*; - -import org.codehaus.plexus.util.*; - -File file = new File( localRepositoryPath, "org/apache/maven/its/deploy/nma2" ); -System.out.println( "Deleting " + file ); -FileUtils.deleteDirectory( file ); - -file = new File( basedir, "target/repo" ); -System.out.println( "Deleting " + file ); -FileUtils.deleteDirectory( file ); - -return true; diff --git a/src/it/no-main-artifact-2/setup.groovy b/src/it/no-main-artifact-2/setup.groovy new file mode 100644 index 00000000..0da49721 --- /dev/null +++ b/src/it/no-main-artifact-2/setup.groovy @@ -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/nma2').deleteDir() diff --git a/src/it/non-default-pom/setup.bsh b/src/it/non-default-pom/setup.bsh deleted file mode 100644 index 3e47a745..00000000 --- a/src/it/non-default-pom/setup.bsh +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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.*; -import java.util.*; - -import org.codehaus.plexus.util.*; - -File file = new File( localRepositoryPath, "org/apache/maven/its/deploy/ndp" ); -System.out.println( "Deleting " + file ); -FileUtils.deleteDirectory( file ); - -file = new File( basedir, "target/repo" ); -System.out.println( "Deleting " + file ); -FileUtils.deleteDirectory( file ); - -return true; diff --git a/src/it/non-default-pom/setup.groovy b/src/it/non-default-pom/setup.groovy new file mode 100644 index 00000000..5cae918f --- /dev/null +++ b/src/it/non-default-pom/setup.groovy @@ -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/ndp').deleteDir() diff --git a/src/it/offline/setup.bsh b/src/it/offline/setup.bsh deleted file mode 100644 index 979af0e4..00000000 --- a/src/it/offline/setup.bsh +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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.*; -import java.util.*; - -import org.codehaus.plexus.util.*; - -File file = new File( localRepositoryPath, "org/apache/maven/its/deploy/om" ); -System.out.println( "Deleting " + file ); -FileUtils.deleteDirectory( file ); - -file = new File( basedir, "target/repo" ); -System.out.println( "Deleting " + file ); -FileUtils.deleteDirectory( file ); - -return true; diff --git a/src/it/offline/setup.groovy b/src/it/offline/setup.groovy new file mode 100644 index 00000000..3297c59d --- /dev/null +++ b/src/it/offline/setup.groovy @@ -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/om').deleteDir() diff --git a/src/it/release-jar/setup.bsh b/src/it/release-jar/setup.bsh deleted file mode 100644 index d3bb1229..00000000 --- a/src/it/release-jar/setup.bsh +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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.*; -import java.util.*; - -import org.codehaus.plexus.util.*; - -File file = new File( localRepositoryPath, "org/apache/maven/its/deploy/rj" ); -System.out.println( "Deleting " + file ); -FileUtils.deleteDirectory( file ); - -file = new File( basedir, "target/repo" ); -System.out.println( "Deleting " + file ); -FileUtils.deleteDirectory( file ); - -return true; diff --git a/src/it/release-jar/setup.groovy b/src/it/release-jar/setup.groovy new file mode 100644 index 00000000..ace45ddb --- /dev/null +++ b/src/it/release-jar/setup.groovy @@ -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/rj').deleteDir() diff --git a/src/it/release-pom/setup.bsh b/src/it/release-pom/setup.bsh deleted file mode 100644 index e8e3dfb3..00000000 --- a/src/it/release-pom/setup.bsh +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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.*; -import java.util.*; - -import org.codehaus.plexus.util.*; - -File file = new File( localRepositoryPath, "org/apache/maven/its/deploy/rp" ); -System.out.println( "Deleting " + file ); -FileUtils.deleteDirectory( file ); - -file = new File( basedir, "target/repo" ); -System.out.println( "Deleting " + file ); -FileUtils.deleteDirectory( file ); - -return true; diff --git a/src/it/release-pom/setup.groovy b/src/it/release-pom/setup.groovy new file mode 100644 index 00000000..36c5d49f --- /dev/null +++ b/src/it/release-pom/setup.groovy @@ -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/rp').deleteDir() diff --git a/src/it/skip-release-jar/setup.bsh b/src/it/skip-release-jar/setup.bsh deleted file mode 100644 index bb1b4e86..00000000 --- a/src/it/skip-release-jar/setup.bsh +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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.*; -import java.util.*; - -import org.codehaus.plexus.util.*; - -File file = new File( localRepositoryPath, "org/apache/maven/its/deploy/srj" ); -System.out.println( "Deleting " + file ); -FileUtils.deleteDirectory( file ); - -file = new File( basedir, "target/repo" ); -System.out.println( "Deleting " + file ); -FileUtils.deleteDirectory( file ); - -return true; diff --git a/src/it/skip-release-jar/setup.groovy b/src/it/skip-release-jar/setup.groovy new file mode 100644 index 00000000..c038f5c7 --- /dev/null +++ b/src/it/skip-release-jar/setup.groovy @@ -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/srj').deleteDir() diff --git a/src/it/skip-snapshot-jar/setup.bsh b/src/it/skip-snapshot-jar/setup.bsh deleted file mode 100644 index f35751bf..00000000 --- a/src/it/skip-snapshot-jar/setup.bsh +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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.*; -import java.util.*; - -import org.codehaus.plexus.util.*; - -File file = new File( localRepositoryPath, "org/apache/maven/its/deploy/ssj" ); -System.out.println( "Deleting " + file ); -FileUtils.deleteDirectory( file ); - -file = new File( basedir, "target/repo" ); -System.out.println( "Deleting " + file ); -FileUtils.deleteDirectory( file ); - -return true; diff --git a/src/it/skip-snapshot-jar/setup.groovy b/src/it/skip-snapshot-jar/setup.groovy new file mode 100644 index 00000000..bdd26cf5 --- /dev/null +++ b/src/it/skip-snapshot-jar/setup.groovy @@ -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/ssj').deleteDir() diff --git a/src/it/skip/setup.groovy b/src/it/skip/setup.groovy new file mode 100644 index 00000000..21ab3a35 --- /dev/null +++ b/src/it/skip/setup.groovy @@ -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/skip').deleteDir() diff --git a/src/it/snapshot-jar/setup.bsh b/src/it/snapshot-jar/setup.bsh deleted file mode 100644 index fae73ffc..00000000 --- a/src/it/snapshot-jar/setup.bsh +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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.*; -import java.util.*; - -import org.codehaus.plexus.util.*; - -File file = new File( localRepositoryPath, "org/apache/maven/its/deploy/sj" ); -System.out.println( "Deleting " + file ); -FileUtils.deleteDirectory( file ); - -file = new File( basedir, "target/repo" ); -System.out.println( "Deleting " + file ); -FileUtils.deleteDirectory( file ); - -return true; diff --git a/src/it/snapshot-jar/setup.groovy b/src/it/snapshot-jar/setup.groovy new file mode 100644 index 00000000..54c80615 --- /dev/null +++ b/src/it/snapshot-jar/setup.groovy @@ -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/sj').deleteDir() diff --git a/src/it/snapshot-pom/setup.bsh b/src/it/snapshot-pom/setup.bsh deleted file mode 100644 index 37c17e70..00000000 --- a/src/it/snapshot-pom/setup.bsh +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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.*; -import java.util.*; - -import org.codehaus.plexus.util.*; - -File file = new File( localRepositoryPath, "org/apache/maven/its/deploy/sp" ); -System.out.println( "Deleting " + file ); -FileUtils.deleteDirectory( file ); - -file = new File( basedir, "target/repo" ); -System.out.println( "Deleting " + file ); -FileUtils.deleteDirectory( file ); - -return true; diff --git a/src/it/snapshot-pom/setup.groovy b/src/it/snapshot-pom/setup.groovy new file mode 100644 index 00000000..0a996d5a --- /dev/null +++ b/src/it/snapshot-pom/setup.groovy @@ -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/sp').deleteDir() diff --git a/src/test/java/org/apache/maven/plugins/deploy/DeployFileMojoTest.java b/src/test/java/org/apache/maven/plugins/deploy/DeployFileMojoTest.java index 572d8e48..b1083cb3 100644 --- a/src/test/java/org/apache/maven/plugins/deploy/DeployFileMojoTest.java +++ b/src/test/java/org/apache/maven/plugins/deploy/DeployFileMojoTest.java @@ -26,7 +26,6 @@ import org.apache.maven.execution.MavenSession; import org.apache.maven.model.Model; import org.apache.maven.plugin.testing.AbstractMojoTestCase; -import org.apache.maven.project.ProjectBuildingRequest; import org.eclipse.aether.DefaultRepositorySystemSession; import org.eclipse.aether.internal.impl.DefaultLocalPathComposer; import org.eclipse.aether.internal.impl.SimpleLocalRepositoryManagerFactory; @@ -35,7 +34,6 @@ import org.mockito.Mock; import org.mockito.MockitoAnnotations; -import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; /** @@ -50,6 +48,8 @@ public class DeployFileMojoTest extends AbstractMojoTestCase { private File remoteRepo; + private AutoCloseable openMocks; + @Mock private MavenSession session; @@ -66,6 +66,14 @@ public void setUp() throws Exception { } } + @Override + public void tearDown() throws Exception { + super.tearDown(); + if (openMocks != null) { + openMocks.close(); + } + } + public void testDeployTestEnvironment() throws Exception { File testPom = new File(getBasedir(), "target/test-classes/unit/deploy-file-test/plugin-config.xml"); @@ -79,18 +87,14 @@ public void testBasicDeployFile() throws Exception { mojo = (DeployFileMojo) lookupMojo("deploy-file", testPom); - MockitoAnnotations.initMocks(this); + openMocks = MockitoAnnotations.openMocks(this); assertNotNull(mojo); - ProjectBuildingRequest buildingRequest = mock(ProjectBuildingRequest.class); - when(buildingRequest.getRepositoryMerging()).thenReturn(ProjectBuildingRequest.RepositoryMerging.POM_DOMINANT); - when(session.getProjectBuildingRequest()).thenReturn(buildingRequest); DefaultRepositorySystemSession repositorySession = new DefaultRepositorySystemSession(); repositorySession.setLocalRepositoryManager( new SimpleLocalRepositoryManagerFactory(new DefaultLocalPathComposer()) .newInstance(repositorySession, new LocalRepository(LOCAL_REPO))); - when(buildingRequest.getRepositorySession()).thenReturn(repositorySession); when(session.getRepositorySession()).thenReturn(repositorySession); String groupId = (String) getVariableValueFromObject(mojo, "groupId"); @@ -188,18 +192,14 @@ public void testDeployIfClassifierIsSet() throws Exception { mojo = (DeployFileMojo) lookupMojo("deploy-file", testPom); - MockitoAnnotations.initMocks(this); + openMocks = MockitoAnnotations.openMocks(this); assertNotNull(mojo); - ProjectBuildingRequest buildingRequest = mock(ProjectBuildingRequest.class); - when(buildingRequest.getRepositoryMerging()).thenReturn(ProjectBuildingRequest.RepositoryMerging.POM_DOMINANT); - when(session.getProjectBuildingRequest()).thenReturn(buildingRequest); DefaultRepositorySystemSession repositorySession = new DefaultRepositorySystemSession(); repositorySession.setLocalRepositoryManager( new SimpleLocalRepositoryManagerFactory(new DefaultLocalPathComposer()) .newInstance(repositorySession, new LocalRepository(LOCAL_REPO))); - when(buildingRequest.getRepositorySession()).thenReturn(repositorySession); when(session.getRepositorySession()).thenReturn(repositorySession); String classifier = (String) getVariableValueFromObject(mojo, "classifier"); @@ -243,18 +243,14 @@ public void testDeployIfArtifactIsNotJar() throws Exception { mojo = (DeployFileMojo) lookupMojo("deploy-file", testPom); - MockitoAnnotations.initMocks(this); + openMocks = MockitoAnnotations.openMocks(this); assertNotNull(mojo); - ProjectBuildingRequest buildingRequest = mock(ProjectBuildingRequest.class); - when(buildingRequest.getRepositoryMerging()).thenReturn(ProjectBuildingRequest.RepositoryMerging.POM_DOMINANT); - when(session.getProjectBuildingRequest()).thenReturn(buildingRequest); DefaultRepositorySystemSession repositorySession = new DefaultRepositorySystemSession(); repositorySession.setLocalRepositoryManager( new SimpleLocalRepositoryManagerFactory(new DefaultLocalPathComposer()) .newInstance(repositorySession, new LocalRepository(LOCAL_REPO))); - when(buildingRequest.getRepositorySession()).thenReturn(repositorySession); when(session.getRepositorySession()).thenReturn(repositorySession); String groupId = (String) getVariableValueFromObject(mojo, "groupId"); diff --git a/src/test/java/org/apache/maven/plugins/deploy/DeployMojoTest.java b/src/test/java/org/apache/maven/plugins/deploy/DeployMojoTest.java index 5884ae11..52964cc5 100644 --- a/src/test/java/org/apache/maven/plugins/deploy/DeployMojoTest.java +++ b/src/test/java/org/apache/maven/plugins/deploy/DeployMojoTest.java @@ -34,7 +34,6 @@ import org.apache.maven.plugins.deploy.stubs.ArtifactRepositoryStub; import org.apache.maven.plugins.deploy.stubs.DeployArtifactStub; import org.apache.maven.project.MavenProject; -import org.apache.maven.project.ProjectBuildingRequest; import org.codehaus.plexus.util.FileUtils; import org.eclipse.aether.DefaultRepositorySystemSession; import org.eclipse.aether.RepositorySystem; @@ -66,6 +65,8 @@ public class DeployMojoTest extends AbstractMojoTestCase { final MavenProjectStub project = new MavenProjectStub(); + private AutoCloseable openMocks; + private MavenSession session; @InjectMocks @@ -104,12 +105,16 @@ public void tearDown() throws Exception { if (remoteRepo.exists()) { // FileUtils.deleteDirectory( remoteRepo ); } + + if (openMocks != null) { + openMocks.close(); + } } public void testDeployTestEnvironment() throws Exception { File testPom = new File(getBasedir(), "target/test-classes/unit/basic-deploy-test/plugin-config.xml"); - DeployMojo mojo = (DeployMojo) lookupMojo("deploy", testPom); + mojo = (DeployMojo) lookupMojo("deploy", testPom); assertNotNull(mojo); } @@ -119,17 +124,14 @@ public void testBasicDeploy() throws Exception { mojo = (DeployMojo) lookupMojo("deploy", testPom); - MockitoAnnotations.initMocks(this); + openMocks = MockitoAnnotations.openMocks(this); assertNotNull(mojo); - ProjectBuildingRequest buildingRequest = mock(ProjectBuildingRequest.class); - when(session.getProjectBuildingRequest()).thenReturn(buildingRequest); DefaultRepositorySystemSession repositorySession = new DefaultRepositorySystemSession(); repositorySession.setLocalRepositoryManager( new SimpleLocalRepositoryManagerFactory(new DefaultLocalPathComposer()) .newInstance(repositorySession, new LocalRepository(LOCAL_REPO))); - when(buildingRequest.getRepositorySession()).thenReturn(repositorySession); when(session.getRepositorySession()).thenReturn(repositorySession); File file = new File( @@ -238,7 +240,7 @@ public void testBasicDeploy() throws Exception { public void testSkippingDeploy() throws Exception { File testPom = new File(getBasedir(), "target/test-classes/unit/basic-deploy-test/plugin-config.xml"); - DeployMojo mojo = (DeployMojo) lookupMojo("deploy", testPom); + mojo = (DeployMojo) lookupMojo("deploy", testPom); assertNotNull(mojo); @@ -296,17 +298,14 @@ public void testBasicDeployWithPackagingAsPom() throws Exception { mojo = (DeployMojo) lookupMojo("deploy", testPom); - MockitoAnnotations.initMocks(this); + openMocks = MockitoAnnotations.openMocks(this); assertNotNull(mojo); - ProjectBuildingRequest buildingRequest = mock(ProjectBuildingRequest.class); - when(session.getProjectBuildingRequest()).thenReturn(buildingRequest); DefaultRepositorySystemSession repositorySession = new DefaultRepositorySystemSession(); repositorySession.setLocalRepositoryManager( new SimpleLocalRepositoryManagerFactory(new DefaultLocalPathComposer()) .newInstance(repositorySession, new LocalRepository(LOCAL_REPO))); - when(buildingRequest.getRepositorySession()).thenReturn(repositorySession); when(session.getRepositorySession()).thenReturn(repositorySession); File pomFile = new File( @@ -372,17 +371,14 @@ public void testBasicDeployWithPackagingAsBom() throws Exception { mojo = (DeployMojo) lookupMojo("deploy", testPom); - MockitoAnnotations.initMocks(this); + openMocks = MockitoAnnotations.openMocks(this); assertNotNull(mojo); - ProjectBuildingRequest buildingRequest = mock(ProjectBuildingRequest.class); - when(session.getProjectBuildingRequest()).thenReturn(buildingRequest); DefaultRepositorySystemSession repositorySession = new DefaultRepositorySystemSession(); repositorySession.setLocalRepositoryManager( new SimpleLocalRepositoryManagerFactory(new DefaultLocalPathComposer()) .newInstance(repositorySession, new LocalRepository(LOCAL_REPO))); - when(buildingRequest.getRepositorySession()).thenReturn(repositorySession); when(session.getRepositorySession()).thenReturn(repositorySession); File pomFile = new File( @@ -446,12 +442,9 @@ public void testBasicDeployWithPackagingAsBom() throws Exception { public void testDeployIfArtifactFileIsNull() throws Exception { File testPom = new File(getBasedir(), "target/test-classes/unit/basic-deploy-test/plugin-config.xml"); - DeployMojo mojo = (DeployMojo) lookupMojo("deploy", testPom); - - MockitoAnnotations.initMocks(this); + mojo = (DeployMojo) lookupMojo("deploy", testPom); - ProjectBuildingRequest buildingRequest = mock(ProjectBuildingRequest.class); - when(session.getProjectBuildingRequest()).thenReturn(buildingRequest); + openMocks = MockitoAnnotations.openMocks(this); setVariableValueToObject(mojo, "session", session); @@ -485,12 +478,9 @@ public void testDeployIfArtifactFileIsNull() throws Exception { public void testDeployIfProjectFileIsNull() throws Exception { File testPom = new File(getBasedir(), "target/test-classes/unit/basic-deploy-test/plugin-config.xml"); - DeployMojo mojo = (DeployMojo) lookupMojo("deploy", testPom); - - MockitoAnnotations.initMocks(this); + mojo = (DeployMojo) lookupMojo("deploy", testPom); - ProjectBuildingRequest buildingRequest = mock(ProjectBuildingRequest.class); - when(session.getProjectBuildingRequest()).thenReturn(buildingRequest); + openMocks = MockitoAnnotations.openMocks(this); setVariableValueToObject(mojo, "session", session); @@ -522,17 +512,14 @@ public void testDeployWithAttachedArtifacts() throws Exception { mojo = (DeployMojo) lookupMojo("deploy", testPom); - MockitoAnnotations.initMocks(this); + openMocks = MockitoAnnotations.openMocks(this); assertNotNull(mojo); - ProjectBuildingRequest buildingRequest = mock(ProjectBuildingRequest.class); - when(session.getProjectBuildingRequest()).thenReturn(buildingRequest); DefaultRepositorySystemSession repositorySession = new DefaultRepositorySystemSession(); repositorySession.setLocalRepositoryManager( new SimpleLocalRepositoryManagerFactory(new DefaultLocalPathComposer()) .newInstance(repositorySession, new LocalRepository(LOCAL_REPO))); - when(buildingRequest.getRepositorySession()).thenReturn(repositorySession); when(session.getRepositorySession()).thenReturn(repositorySession); MavenProject project = (MavenProject) getVariableValueFromObject(mojo, "project"); @@ -613,13 +600,10 @@ public void testNonPomDeployWithAttachedArtifactsOnly() throws Exception { mojo = (DeployMojo) lookupMojo("deploy", testPom); - MockitoAnnotations.initMocks(this); + openMocks = MockitoAnnotations.openMocks(this); assertNotNull(mojo); - ProjectBuildingRequest buildingRequest = mock(ProjectBuildingRequest.class); - when(session.getProjectBuildingRequest()).thenReturn(buildingRequest); - MavenProject project = (MavenProject) getVariableValueFromObject(mojo, "project"); project.setGroupId("org.apache.maven.test"); project.setArtifactId("maven-deploy-test"); @@ -708,7 +692,7 @@ public void _testBasicDeployWithScpAsProtocol() throws Exception { } public void testLegacyAltDeploymentRepositoryWithDefaultLayout() throws Exception { - DeployMojo mojo = new DeployMojo(); + mojo = new DeployMojo(); setVariableValueToObject(mojo, "project", project); setVariableValueToObject(mojo, "session", session); @@ -723,7 +707,7 @@ public void testLegacyAltDeploymentRepositoryWithDefaultLayout() throws Exceptio } public void testLegacyAltDeploymentRepositoryWithLegacyLayout() throws Exception { - DeployMojo mojo = new DeployMojo(); + mojo = new DeployMojo(); setVariableValueToObject(mojo, "project", project); setVariableValueToObject(mojo, "session", session); @@ -742,7 +726,7 @@ public void testLegacyAltDeploymentRepositoryWithLegacyLayout() throws Exception } public void testInsaneAltDeploymentRepository() throws Exception { - DeployMojo mojo = new DeployMojo(); + mojo = new DeployMojo(); setVariableValueToObject(mojo, "project", project); setVariableValueToObject(mojo, "session", session); @@ -763,7 +747,7 @@ public void testInsaneAltDeploymentRepository() throws Exception { } public void testDefaultScmSvnAltDeploymentRepository() throws Exception { - DeployMojo mojo = new DeployMojo(); + mojo = new DeployMojo(); setVariableValueToObject(mojo, "project", project); setVariableValueToObject(mojo, "session", session); @@ -779,7 +763,7 @@ public void testDefaultScmSvnAltDeploymentRepository() throws Exception { } public void testLegacyScmSvnAltDeploymentRepository() throws Exception { - DeployMojo mojo = new DeployMojo(); + mojo = new DeployMojo(); setVariableValueToObject(mojo, "project", project); setVariableValueToObject( @@ -799,7 +783,7 @@ public void testLegacyScmSvnAltDeploymentRepository() throws Exception { } public void testAltSnapshotDeploymentRepository() throws Exception { - DeployMojo mojo = new DeployMojo(); + mojo = new DeployMojo(); setVariableValueToObject(mojo, "project", project); setVariableValueToObject(mojo, "session", session); @@ -814,7 +798,7 @@ public void testAltSnapshotDeploymentRepository() throws Exception { } public void testAltReleaseDeploymentRepository() throws Exception { - DeployMojo mojo = new DeployMojo(); + mojo = new DeployMojo(); setVariableValueToObject(mojo, "project", project); setVariableValueToObject(mojo, "session", session);