From d973a5c846b79fe85285e1cb98182f2c56979cab Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Wed, 4 Dec 2024 14:40:17 -0500 Subject: [PATCH 1/3] test should fail --- .../projects/mdep-839-list/invoker.properties | 18 +++++++ src/it/projects/mdep-839-list/pom.xml | 54 +++++++++++++++++++ src/it/projects/mdep-839-list/test.properties | 19 +++++++ src/it/projects/mdep-839-list/verify.groovy | 28 ++++++++++ 4 files changed, 119 insertions(+) create mode 100644 src/it/projects/mdep-839-list/invoker.properties create mode 100644 src/it/projects/mdep-839-list/pom.xml create mode 100644 src/it/projects/mdep-839-list/test.properties create mode 100644 src/it/projects/mdep-839-list/verify.groovy diff --git a/src/it/projects/mdep-839-list/invoker.properties b/src/it/projects/mdep-839-list/invoker.properties new file mode 100644 index 0000000000..55afe77c19 --- /dev/null +++ b/src/it/projects/mdep-839-list/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 = ${project.groupId}:${project.artifactId}:${project.version}:list diff --git a/src/it/projects/mdep-839-list/pom.xml b/src/it/projects/mdep-839-list/pom.xml new file mode 100644 index 0000000000..f6cd860692 --- /dev/null +++ b/src/it/projects/mdep-839-list/pom.xml @@ -0,0 +1,54 @@ + + + + + 4.0.0 + + org.apache.maven.its.dependency + test + 1.0-SNAPSHOT + + Test + + Test dependency:list-repositories + + + + UTF-8 + + + + + fake-remote-repository + http://localhost:2345 + + + + + + org.apache.maven + maven-core + 3.9.9 + + + + \ No newline at end of file diff --git a/src/it/projects/mdep-839-list/test.properties b/src/it/projects/mdep-839-list/test.properties new file mode 100644 index 0000000000..406dd9abac --- /dev/null +++ b/src/it/projects/mdep-839-list/test.properties @@ -0,0 +1,19 @@ +# 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. + +outputFile = classpath.txt + diff --git a/src/it/projects/mdep-839-list/verify.groovy b/src/it/projects/mdep-839-list/verify.groovy new file mode 100644 index 0000000000..11e5f395e7 --- /dev/null +++ b/src/it/projects/mdep-839-list/verify.groovy @@ -0,0 +1,28 @@ +/* + * 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. + */ + +File file = new File( basedir, "classpath.txt" ) +assert file.exists() : "output file $file does not exist" + +String output = file.getText( "UTF-8" ) +assert output.contains( 'The following files have been resolved:') +// no escape codes +assert !output.contains( '\u001B' ) + + From d6745bb5b025a043e443c8d0819209cbfe2ed9e7 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Fri, 6 Dec 2024 07:40:18 -0500 Subject: [PATCH 2/3] wip --- src/it/projects/mdep-839-list/pom.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/it/projects/mdep-839-list/pom.xml b/src/it/projects/mdep-839-list/pom.xml index f6cd860692..e9d535ac33 100644 --- a/src/it/projects/mdep-839-list/pom.xml +++ b/src/it/projects/mdep-839-list/pom.xml @@ -49,6 +49,12 @@ maven-core 3.9.9 + + org.apache.maven + maven-artifact + 3.6.3 + provided + \ No newline at end of file From bf6c87e868b32c490f5cce168651faf256f3ed6b Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Sun, 26 Jan 2025 21:03:56 -0600 Subject: [PATCH 3/3] startsWith --- src/it/projects/mdep-839-list/verify.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/it/projects/mdep-839-list/verify.groovy b/src/it/projects/mdep-839-list/verify.groovy index 11e5f395e7..50cd4ea0fc 100644 --- a/src/it/projects/mdep-839-list/verify.groovy +++ b/src/it/projects/mdep-839-list/verify.groovy @@ -21,7 +21,7 @@ File file = new File( basedir, "classpath.txt" ) assert file.exists() : "output file $file does not exist" String output = file.getText( "UTF-8" ) -assert output.contains( 'The following files have been resolved:') +assert output.startsWith( 'The following files have been resolved:') // no escape codes assert !output.contains( '\u001B' )