diff --git a/src/it/projects/bugs/massembly-1020/pom.xml b/src/it/projects/bugs/massembly-1020/pom.xml new file mode 100644 index 00000000..8d5164b8 --- /dev/null +++ b/src/it/projects/bugs/massembly-1020/pom.xml @@ -0,0 +1,64 @@ + + + 4.0.0 + + + org.apache.maven.plugin.assembly.test + it-project-parent + 1 + + + test + massembly-1020 + 0.0.1-SNAPSHOT + pom + + + src/main/resources + + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + create-assembly + package + + single + + + + zip + + + src/main/assembly/component.xml + + + + + + + + + diff --git a/src/it/projects/bugs/massembly-1020/src/main/assembly/component.xml b/src/it/projects/bugs/massembly-1020/src/main/assembly/component.xml new file mode 100644 index 00000000..35269d3e --- /dev/null +++ b/src/it/projects/bugs/massembly-1020/src/main/assembly/component.xml @@ -0,0 +1,32 @@ + + + + component + false + + + + ${resources.dir}/config + . + + + \ No newline at end of file diff --git a/src/it/projects/bugs/massembly-1020/src/main/resources/config/test1.txt b/src/it/projects/bugs/massembly-1020/src/main/resources/config/test1.txt new file mode 100644 index 00000000..f079749c --- /dev/null +++ b/src/it/projects/bugs/massembly-1020/src/main/resources/config/test1.txt @@ -0,0 +1 @@ +test1 \ No newline at end of file diff --git a/src/it/projects/bugs/massembly-1020/src/main/resources/config/test2.txt b/src/it/projects/bugs/massembly-1020/src/main/resources/config/test2.txt new file mode 100644 index 00000000..d606037c --- /dev/null +++ b/src/it/projects/bugs/massembly-1020/src/main/resources/config/test2.txt @@ -0,0 +1 @@ +test2 \ No newline at end of file diff --git a/src/it/projects/bugs/massembly-1020/verify.groovy b/src/it/projects/bugs/massembly-1020/verify.groovy new file mode 100644 index 00000000..d8567a8e --- /dev/null +++ b/src/it/projects/bugs/massembly-1020/verify.groovy @@ -0,0 +1,36 @@ +/* + * 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.util.zip.ZipFile + +def f = new File(basedir, "target/massembly-1020-0.0.1-SNAPSHOT-component.zip") + +def expectedEntries = [ + "test1.txt", + "test2.txt", +] + +new ZipFile(f).withCloseable {zipFile -> + expectedEntries.each {entryName -> + def entry = zipFile.getEntry(entryName) + assert entry != null: "missing zip entry: " + entryName + } +} + +return true \ No newline at end of file