This is an automated email from the ASF dual-hosted git repository. slachiewicz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/maven-dependency-plugin.git
commit 2905116679801b84f9fafffc8aaeb52059c9cbad Author: Sylwester Lachiewicz <[email protected]> AuthorDate: Wed Nov 4 21:58:18 2026 +0000 Add verify scripts to collect and resolve ITs and merge CLI ITs collect, resolve and resolve-sources wrote an output file nobody read. The tree and copy ITs now run one Maven build: one goal keeps its -D user properties, the other cases are executions that set every parameter explicitly, because user properties also apply to bound executions. --- src/it/projects/collect/verify.groovy | 28 ++++++++++++++++++ src/it/projects/copy-cli/pom.xml | 32 -------------------- src/it/projects/copy-cli/test.properties | 18 ------------ src/it/projects/copy-cli/verify.groovy | 20 ------------- .../cli.properties} | 3 +- .../copy-maven-coordinates/invoker.properties | 6 ++-- src/it/projects/copy-maven-coordinates/pom.xml | 32 ++++++++++++++++++++ src/it/projects/resolve-sources/verify.groovy | 30 +++++++++++++++++++ .../projects/{unpack-cli => resolve}/verify.groovy | 27 +++++------------ src/it/projects/tree-excluded/invoker.properties | 11 ++----- src/it/projects/tree-excluded/pom.xml | 34 ++++++++++++++++++++++ .../test-included-excluded.properties | 20 ------------- .../test-included-survives.properties | 20 ------------- src/it/projects/tree-scope/invoker.properties | 8 ++--- src/it/projects/tree-scope/pom.xml | 21 +++++++++++++ src/it/projects/tree-scope/test2.properties | 19 ------------ .../projects/tree-verbose-json/invoker.properties | 8 ++--- src/it/projects/tree-verbose-json/plain.properties | 19 ------------ src/it/projects/tree-verbose-json/pom.xml | 22 ++++++++++++++ src/it/projects/unpack-cli/invoker.properties | 19 ------------ src/it/projects/unpack-cli/pom.xml | 32 -------------------- .../test.properties => unpack/cli.properties} | 2 +- src/it/projects/unpack/invoker.properties | 5 +++- src/it/projects/unpack/verify.groovy | 25 ++++++++-------- 24 files changed, 207 insertions(+), 254 deletions(-) diff --git a/src/it/projects/collect/verify.groovy b/src/it/projects/collect/verify.groovy new file mode 100644 index 00000000..c1d2723a --- /dev/null +++ b/src/it/projects/collect/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. + */ +def lines = new File(basedir, "target/collected.txt").readLines()*.trim() + +assert lines[0] == "The following files have been resolved:" : "Unexpected header in " + lines +def artifacts = lines.findAll { it.contains(":jar:") } +// the direct dependency and one that only the POM chain knows about +assert artifacts.contains("org.apache.maven:maven-project:jar:2.0.6:compile") : "Expected the dependency in " + lines +assert artifacts.contains("org.apache.maven:maven-model:jar:2.0.6:compile") : "Expected a transitive dependency in " + lines +assert !lines.any { it.startsWith("The following files have NOT been resolved") } : "Nothing may be unresolved in " + lines +// collect reads POMs only, so no jar is resolved and no module name can be read from one +assert !artifacts.any { it.contains(" -- module ") } : "collect must not resolve jars: " + lines diff --git a/src/it/projects/copy-cli/pom.xml b/src/it/projects/copy-cli/pom.xml deleted file mode 100644 index b867ca6f..00000000 --- a/src/it/projects/copy-cli/pom.xml +++ /dev/null @@ -1,32 +0,0 @@ -<?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.plugins.dependency.its</groupId> - <artifactId>mdep-381-copy</artifactId> - <version>1.0-SNAPSHOT</version> - -</project> \ No newline at end of file diff --git a/src/it/projects/copy-cli/test.properties b/src/it/projects/copy-cli/test.properties deleted file mode 100644 index 8af858c2..00000000 --- a/src/it/projects/copy-cli/test.properties +++ /dev/null @@ -1,18 +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. - -artifact=org.apache.maven.its.dependency:a1:1.0.0 diff --git a/src/it/projects/copy-cli/verify.groovy b/src/it/projects/copy-cli/verify.groovy deleted file mode 100644 index 37dc0192..00000000 --- a/src/it/projects/copy-cli/verify.groovy +++ /dev/null @@ -1,20 +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. - */ - -assert new File( basedir, 'target/dependency/a1-1.0.0.jar' ).isFile(); diff --git a/src/it/projects/copy-cli/invoker.properties b/src/it/projects/copy-maven-coordinates/cli.properties similarity index 88% rename from src/it/projects/copy-cli/invoker.properties rename to src/it/projects/copy-maven-coordinates/cli.properties index c8bd0f7f..8ac11be2 100644 --- a/src/it/projects/copy-cli/invoker.properties +++ b/src/it/projects/copy-maven-coordinates/cli.properties @@ -15,4 +15,5 @@ # specific language governing permissions and limitations # under the License. -invoker.goals = ${project.groupId}:${project.artifactId}:${project.version}:copy +artifact=org.apache.maven.its.dependency:ResourceArtifact:jar:1.0 +outputDirectory=target/type-version diff --git a/src/it/projects/copy-maven-coordinates/invoker.properties b/src/it/projects/copy-maven-coordinates/invoker.properties index faab1973..9adc899f 100644 --- a/src/it/projects/copy-maven-coordinates/invoker.properties +++ b/src/it/projects/copy-maven-coordinates/invoker.properties @@ -15,6 +15,6 @@ # specific language governing permissions and limitations # under the License. -invoker.goals.1 = ${project.groupId}:${project.artifactId}:${project.version}:copy -Dartifact=org.apache.maven.its.dependency:ResourceArtifact:jar:1.0 -DoutputDirectory=target/type-version -invoker.goals.2 = ${project.groupId}:${project.artifactId}:${project.version}:copy -Dartifact=org.apache.maven.its.dependency:ResourceArtifact:test-jar:tests:1.0:test -DoutputDirectory=target/type-classifier-version-scope -invoker.goals.3 = ${project.groupId}:${project.artifactId}:${project.version}:copy -Dartifact=org.apache.maven.its.dependency:ResourceArtifact:1.0:jar:client -DoutputDirectory=target/legacy +# the first form comes from the command line (-Dartifact), the other two from executions of the POM +invoker.goals = process-sources ${project.groupId}:${project.artifactId}:${project.version}:copy +invoker.userPropertiesFile = cli.properties diff --git a/src/it/projects/copy-maven-coordinates/pom.xml b/src/it/projects/copy-maven-coordinates/pom.xml index d228f12c..4f9eb81a 100644 --- a/src/it/projects/copy-maven-coordinates/pom.xml +++ b/src/it/projects/copy-maven-coordinates/pom.xml @@ -25,4 +25,36 @@ <description> dependency:copy takes the artifact in the form that Maven and dependency:list print. </description> + <build> + <plugins> + <plugin> + <artifactId>maven-dependency-plugin</artifactId> + <version>@project.version@</version> + <executions> + <execution> + <id>type-classifier-version-scope</id> + <phase>process-sources</phase> + <goals> + <goal>copy</goal> + </goals> + <configuration> + <artifact>org.apache.maven.its.dependency:ResourceArtifact:test-jar:tests:1.0:test</artifact> + <outputDirectory>target/type-classifier-version-scope</outputDirectory> + </configuration> + </execution> + <execution> + <id>legacy</id> + <phase>process-sources</phase> + <goals> + <goal>copy</goal> + </goals> + <configuration> + <artifact>org.apache.maven.its.dependency:ResourceArtifact:1.0:jar:client</artifact> + <outputDirectory>target/legacy</outputDirectory> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> </project> diff --git a/src/it/projects/resolve-sources/verify.groovy b/src/it/projects/resolve-sources/verify.groovy new file mode 100644 index 00000000..9448e602 --- /dev/null +++ b/src/it/projects/resolve-sources/verify.groovy @@ -0,0 +1,30 @@ +/* + * 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. + */ +def lines = new File(basedir, "target/resolved.txt").readLines()*.trim() +def notResolved = lines.findIndexOf { it.startsWith("The following files have NOT been resolved") } +def resolved = notResolved < 0 ? lines : lines.subList(0, notResolved) +def missing = notResolved < 0 ? [] : lines.subList(notResolved, lines.size()) + +assert lines[0] == "The following files have been resolved:" : "Unexpected header in " + lines +assert resolved.any { it.startsWith("org.apache.maven:maven-project:jar:sources:2.0.8") } : "Expected the sources of the dependency in " + lines +assert resolved.any { it.startsWith("org.apache.maven:maven-model:jar:sources:2.0.8") } : "Expected the sources of a transitive dependency in " + lines +// some old dependencies have no sources (which ones differs between Maven 3 and 4); they are listed instead of failing the build +def missingSources = missing.drop(1).findAll { it } +assert !missingSources.isEmpty() : "Expected the missing sources to be listed in " + lines +assert missingSources.every { it.contains(":jar:sources:") } : "Expected only sources jars among the missing in " + lines diff --git a/src/it/projects/unpack-cli/verify.groovy b/src/it/projects/resolve/verify.groovy similarity index 54% rename from src/it/projects/unpack-cli/verify.groovy rename to src/it/projects/resolve/verify.groovy index 9fcebfe3..8f4033b0 100644 --- a/src/it/projects/unpack-cli/verify.groovy +++ b/src/it/projects/resolve/verify.groovy @@ -6,9 +6,9 @@ * 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 @@ -16,21 +16,10 @@ * specific language governing permissions and limitations * under the License. */ +def lines = new File(basedir, "target/resolved.txt").readLines()*.trim() -import java.io.*; - - -File file = new File( basedir, "target/output spaces directory" ); -assert file.isDirectory() : "Missing " + file; - -file = new File( file, "qdox-1.5" ); -assert file.isDirectory() : "Missing " + file; - -file = new File( file, "build.xml" ); -assert file.isFile() : "Missing " + file; - -//until MDEP-242 is fixed, the next test will passed -file = new File( file.getParent(), "src" ); -assert file.isDirectory() : "Missing " + file; - -return true; +assert lines[0] == "The following files have been resolved:" : "Unexpected header in " + lines +assert lines.any { it.startsWith("org.apache.maven:maven-project:jar:2.0.6:compile") } : "Expected the dependency in " + lines +assert lines.any { it.startsWith("org.apache.maven:maven-model:jar:2.0.6:compile") } : "Expected a transitive dependency in " + lines +assert lines.any { it.startsWith("junit:junit:jar:3.8.1:compile") } : "Expected a transitive dependency in " + lines +assert !lines.any { it.startsWith("The following files have NOT been resolved") } : "Nothing may be unresolved in " + lines diff --git a/src/it/projects/tree-excluded/invoker.properties b/src/it/projects/tree-excluded/invoker.properties index 476a9d5e..30245346 100644 --- a/src/it/projects/tree-excluded/invoker.properties +++ b/src/it/projects/tree-excluded/invoker.properties @@ -15,11 +15,6 @@ # specific language governing permissions and limitations # under the License. -invoker.goals.1 = ${project.groupId}:${project.artifactId}:${project.version}:tree -invoker.userPropertiesFile.1 = test.properties - -invoker.goals.2 = ${project.groupId}:${project.artifactId}:${project.version}:tree -invoker.userPropertiesFile.2 = test-included-excluded.properties - -invoker.goals.3 = ${project.groupId}:${project.artifactId}:${project.version}:tree -invoker.userPropertiesFile.3 = test-included-survives.properties +# test.properties feeds the command line tree goal; the two executions configure includes and excludes explicitly +invoker.goals = process-sources ${project.groupId}:${project.artifactId}:${project.version}:tree +invoker.userPropertiesFile = test.properties diff --git a/src/it/projects/tree-excluded/pom.xml b/src/it/projects/tree-excluded/pom.xml index dac11a5b..216b708b 100644 --- a/src/it/projects/tree-excluded/pom.xml +++ b/src/it/projects/tree-excluded/pom.xml @@ -44,4 +44,38 @@ </dependency> </dependencies> + <build> + <plugins> + <plugin> + <artifactId>maven-dependency-plugin</artifactId> + <version>@project.version@</version> + <executions> + <execution> + <id>included-excluded</id> + <phase>process-sources</phase> + <goals> + <goal>tree</goal> + </goals> + <configuration> + <outputFile>target/included-excluded.txt</outputFile> + <includes>junit:junit</includes> + <excludes>org.codehaus.plexus:*</excludes> + </configuration> + </execution> + <execution> + <id>included-survives</id> + <phase>process-sources</phase> + <goals> + <goal>tree</goal> + </goals> + <configuration> + <outputFile>target/included-survives.txt</outputFile> + <includes>:wagon*</includes> + <excludes>org.codehaus.plexus:*</excludes> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> </project> diff --git a/src/it/projects/tree-excluded/test-included-excluded.properties b/src/it/projects/tree-excluded/test-included-excluded.properties deleted file mode 100644 index fad197e3..00000000 --- a/src/it/projects/tree-excluded/test-included-excluded.properties +++ /dev/null @@ -1,20 +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. - -outputFile = target/included-excluded.txt -includes = junit:junit -excludes = org.codehaus.plexus:* diff --git a/src/it/projects/tree-excluded/test-included-survives.properties b/src/it/projects/tree-excluded/test-included-survives.properties deleted file mode 100644 index 63e2b17d..00000000 --- a/src/it/projects/tree-excluded/test-included-survives.properties +++ /dev/null @@ -1,20 +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. - -outputFile = target/included-survives.txt -includes = :wagon* -excludes = org.codehaus.plexus:* diff --git a/src/it/projects/tree-scope/invoker.properties b/src/it/projects/tree-scope/invoker.properties index 0999b3e4..f138adb3 100644 --- a/src/it/projects/tree-scope/invoker.properties +++ b/src/it/projects/tree-scope/invoker.properties @@ -15,8 +15,6 @@ # specific language governing permissions and limitations # under the License. -invoker.goals.1 = ${project.groupId}:${project.artifactId}:${project.version}:tree -invoker.userPropertiesFile.1 = test1.properties - -invoker.goals.2 = ${project.groupId}:${project.artifactId}:${project.version}:tree -invoker.userPropertiesFile.2 = test2.properties +# the command line tree goal gets scope=compile from test1.properties; the execution sets scope=test explicitly +invoker.goals = process-sources ${project.groupId}:${project.artifactId}:${project.version}:tree +invoker.userPropertiesFile = test1.properties diff --git a/src/it/projects/tree-scope/pom.xml b/src/it/projects/tree-scope/pom.xml index 4aaefaa7..882967c6 100644 --- a/src/it/projects/tree-scope/pom.xml +++ b/src/it/projects/tree-scope/pom.xml @@ -52,4 +52,25 @@ </dependencies> + <build> + <plugins> + <plugin> + <artifactId>maven-dependency-plugin</artifactId> + <version>@project.version@</version> + <executions> + <execution> + <id>scope-test</id> + <phase>process-sources</phase> + <goals> + <goal>tree</goal> + </goals> + <configuration> + <outputFile>target/tree2.txt</outputFile> + <scope>test</scope> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> </project> diff --git a/src/it/projects/tree-scope/test2.properties b/src/it/projects/tree-scope/test2.properties deleted file mode 100644 index 784d605e..00000000 --- a/src/it/projects/tree-scope/test2.properties +++ /dev/null @@ -1,19 +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. - -outputFile = target/tree2.txt -scope = test diff --git a/src/it/projects/tree-verbose-json/invoker.properties b/src/it/projects/tree-verbose-json/invoker.properties index f7a40d29..d03d90a8 100644 --- a/src/it/projects/tree-verbose-json/invoker.properties +++ b/src/it/projects/tree-verbose-json/invoker.properties @@ -15,8 +15,6 @@ # specific language governing permissions and limitations # under the License. -invoker.goals.1 = ${project.groupId}:${project.artifactId}:${project.version}:tree -invoker.userPropertiesFile.1 = verbose.properties - -invoker.goals.2 = ${project.groupId}:${project.artifactId}:${project.version}:tree -invoker.userPropertiesFile.2 = plain.properties +# the command line tree goal is verbose through verbose.properties; the execution sets verbose=false explicitly +invoker.goals = process-sources ${project.groupId}:${project.artifactId}:${project.version}:tree +invoker.userPropertiesFile = verbose.properties diff --git a/src/it/projects/tree-verbose-json/plain.properties b/src/it/projects/tree-verbose-json/plain.properties deleted file mode 100644 index 4fbe19bb..00000000 --- a/src/it/projects/tree-verbose-json/plain.properties +++ /dev/null @@ -1,19 +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. - -outputType = json -outputFile = target/plain.json diff --git a/src/it/projects/tree-verbose-json/pom.xml b/src/it/projects/tree-verbose-json/pom.xml index 7395ca17..9c88cc44 100644 --- a/src/it/projects/tree-verbose-json/pom.xml +++ b/src/it/projects/tree-verbose-json/pom.xml @@ -49,4 +49,26 @@ <version>1.0</version> </dependency> </dependencies> + <build> + <plugins> + <plugin> + <artifactId>maven-dependency-plugin</artifactId> + <version>@project.version@</version> + <executions> + <execution> + <id>plain</id> + <phase>process-sources</phase> + <goals> + <goal>tree</goal> + </goals> + <configuration> + <outputType>json</outputType> + <outputFile>target/plain.json</outputFile> + <verbose>false</verbose> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> </project> diff --git a/src/it/projects/unpack-cli/invoker.properties b/src/it/projects/unpack-cli/invoker.properties deleted file mode 100644 index 98baefb7..00000000 --- a/src/it/projects/unpack-cli/invoker.properties +++ /dev/null @@ -1,19 +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. - -invoker.goals = ${project.groupId}:${project.artifactId}:${project.version}:unpack - diff --git a/src/it/projects/unpack-cli/pom.xml b/src/it/projects/unpack-cli/pom.xml deleted file mode 100644 index 64457d74..00000000 --- a/src/it/projects/unpack-cli/pom.xml +++ /dev/null @@ -1,32 +0,0 @@ -<?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.plugins.dependency.its</groupId> - <artifactId>mdep-381-unpack</artifactId> - <version>1.0-SNAPSHOT</version> - -</project> \ No newline at end of file diff --git a/src/it/projects/unpack-cli/test.properties b/src/it/projects/unpack/cli.properties similarity index 94% rename from src/it/projects/unpack-cli/test.properties rename to src/it/projects/unpack/cli.properties index aa669244..7dd61ed3 100644 --- a/src/it/projects/unpack-cli/test.properties +++ b/src/it/projects/unpack/cli.properties @@ -16,4 +16,4 @@ # under the License. artifact=qdox:qdox:1.5:tar.gz:src -outputDirectory=target/output spaces directory +outputDirectory=target/cli output directory diff --git a/src/it/projects/unpack/invoker.properties b/src/it/projects/unpack/invoker.properties index 2e199f7b..974bcc05 100644 --- a/src/it/projects/unpack/invoker.properties +++ b/src/it/projects/unpack/invoker.properties @@ -15,4 +15,7 @@ # specific language governing permissions and limitations # under the License. -invoker.goals = clean package +# 1: the execution of the POM, 2: the artifact and the output directory from the command line +invoker.goals.1 = clean package +invoker.goals.2 = ${project.groupId}:${project.artifactId}:${project.version}:unpack +invoker.userPropertiesFile.2 = cli.properties diff --git a/src/it/projects/unpack/verify.groovy b/src/it/projects/unpack/verify.groovy index 9fcebfe3..209b5950 100644 --- a/src/it/projects/unpack/verify.groovy +++ b/src/it/projects/unpack/verify.groovy @@ -17,20 +17,21 @@ * under the License. */ -import java.io.*; +// the same archive unpacked by the execution (outputDirectory in the POM) and by the command line (-Dartifact) +for ( outputDirectory in ["output spaces directory", "cli output directory"] ) +{ + File file = new File( basedir, "target/" + outputDirectory ); + assert file.isDirectory() : "Missing " + file; + file = new File( file, "qdox-1.5" ); + assert file.isDirectory() : "Missing " + file; -File file = new File( basedir, "target/output spaces directory" ); -assert file.isDirectory() : "Missing " + file; + file = new File( file, "build.xml" ); + assert file.isFile() : "Missing " + file; -file = new File( file, "qdox-1.5" ); -assert file.isDirectory() : "Missing " + file; - -file = new File( file, "build.xml" ); -assert file.isFile() : "Missing " + file; - -//until MDEP-242 is fixed, the next test will passed -file = new File( file.getParent(), "src" ); -assert file.isDirectory() : "Missing " + file; + //until MDEP-242 is fixed, the next test will passed + file = new File( file.getParent(), "src" ); + assert file.isDirectory() : "Missing " + file; +} return true;
