This is an automated email from the ASF dual-hosted git repository. eolivelli pushed a commit to branch MASSEMBLY-861 in repository https://gitbox.apache.org/repos/asf/maven-assembly-plugin.git
The following commit(s) were added to refs/heads/MASSEMBLY-861 by this push: new 00d8445 [MASSEMBLY-861] exclusion * also packaged 00d8445 is described below commit 00d8445f14c007d22eda3fe1be36c607e6df583f Author: Enrico Olivelli <eolive...@gmail.com> AuthorDate: Sat Dec 22 13:47:45 2018 +0100 [MASSEMBLY-861] exclusion * also packaged --- .../dependencySet-excludeStar/README-jira.txt | 1 + .../dependencySet-excludeStar/child1/pom.xml | 37 +++++++++++++ .../child1/src/main/java/test/App.java | 33 ++++++++++++ .../child1/src/test/java/test/AppTest.java | 58 +++++++++++++++++++++ .../dependencySet-excludeStar/child2/pom.xml | 45 ++++++++++++++++ .../child2/src/assemble/bin.xml | 35 +++++++++++++ .../child2/src/main/java/test/App.java | 33 ++++++++++++ .../dependencySet-excludeStar/child3/pom.xml | 60 ++++++++++++++++++++++ .../child3/src/assemble/bin.xml | 35 +++++++++++++ .../child3/src/main/java/test/App.java | 33 ++++++++++++ .../dependencySet-excludeStar/invoker.properties | 18 +++++++ .../dependencySet-excludeStar/pom.xml | 40 +++++++++++++++ .../dependencySet-excludeStar/verify.bsh | 54 +++++++++++++++++++ 13 files changed, 482 insertions(+) diff --git a/src/it/projects/dependency-sets/dependencySet-excludeStar/README-jira.txt b/src/it/projects/dependency-sets/dependencySet-excludeStar/README-jira.txt new file mode 100644 index 0000000..f462726 --- /dev/null +++ b/src/it/projects/dependency-sets/dependencySet-excludeStar/README-jira.txt @@ -0,0 +1 @@ +MASSEMBLY-861 diff --git a/src/it/projects/dependency-sets/dependencySet-excludeStar/child1/pom.xml b/src/it/projects/dependency-sets/dependencySet-excludeStar/child1/pom.xml new file mode 100644 index 0000000..eeb23d8 --- /dev/null +++ b/src/it/projects/dependency-sets/dependencySet-excludeStar/child1/pom.xml @@ -0,0 +1,37 @@ +<?xml version="1.0"?><project> + +<!-- +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. +--> + + <parent> + <artifactId>dependencySet-excludeStar</artifactId> + <groupId>test</groupId> + <version>1.0-SNAPSHOT</version> + </parent> + <modelVersion>4.0.0</modelVersion> + <artifactId>child1</artifactId> + + <dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>3.8.1</version> + </dependency> + </dependencies> +</project> diff --git a/src/it/projects/dependency-sets/dependencySet-excludeStar/child1/src/main/java/test/App.java b/src/it/projects/dependency-sets/dependencySet-excludeStar/child1/src/main/java/test/App.java new file mode 100644 index 0000000..d0442f3 --- /dev/null +++ b/src/it/projects/dependency-sets/dependencySet-excludeStar/child1/src/main/java/test/App.java @@ -0,0 +1,33 @@ +package test; + +/* + * 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. + */ + + +/** + * Hello world! + * + */ +public class App +{ + public static void main( String[] args ) + { + System.out.println( "Hello World!" ); + } +} diff --git a/src/it/projects/dependency-sets/dependencySet-excludeStar/child1/src/test/java/test/AppTest.java b/src/it/projects/dependency-sets/dependencySet-excludeStar/child1/src/test/java/test/AppTest.java new file mode 100644 index 0000000..d5c1205 --- /dev/null +++ b/src/it/projects/dependency-sets/dependencySet-excludeStar/child1/src/test/java/test/AppTest.java @@ -0,0 +1,58 @@ +package test; + +/* + * 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 junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; + +/** + * Unit test for simple App. + */ +public class AppTest + extends TestCase +{ + /** + * Create the test case + * + * @param testName name of the test case + */ + public AppTest( String testName ) + { + super( testName ); + } + + /** + * @return the suite of tests being tested + */ + public static Test suite() + { + return new TestSuite( AppTest.class ); + } + + /** + * Rigourous Test :-) + */ + public void testApp() + { + assertTrue( true ); + } +} diff --git a/src/it/projects/dependency-sets/dependencySet-excludeStar/child2/pom.xml b/src/it/projects/dependency-sets/dependencySet-excludeStar/child2/pom.xml new file mode 100644 index 0000000..ae33db5 --- /dev/null +++ b/src/it/projects/dependency-sets/dependencySet-excludeStar/child2/pom.xml @@ -0,0 +1,45 @@ +<?xml version="1.0"?><project> + +<!-- +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. +--> + + <parent> + <artifactId>dependencySet-excludeStar</artifactId> + <groupId>test</groupId> + <version>1.0-SNAPSHOT</version> + </parent> + <modelVersion>4.0.0</modelVersion> + <artifactId>child2</artifactId> + <version>1.0-SNAPSHOT</version> + + <dependencies> + <dependency> + <groupId>test</groupId> + <artifactId>child1</artifactId> + <version>1.0-SNAPSHOT</version> + <exclusions> + <exclusion> + <groupId>*</groupId> + <artifactId>*</artifactId> + </exclusion> + </exclusions> + </dependency> + </dependencies> + +</project> diff --git a/src/it/projects/dependency-sets/dependencySet-excludeStar/child2/src/assemble/bin.xml b/src/it/projects/dependency-sets/dependencySet-excludeStar/child2/src/assemble/bin.xml new file mode 100644 index 0000000..013e1f8 --- /dev/null +++ b/src/it/projects/dependency-sets/dependencySet-excludeStar/child2/src/assemble/bin.xml @@ -0,0 +1,35 @@ +<?xml version='1.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. +--> + +<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd"> + <id>bin</id> + <formats> + <format>dir</format> + </formats> + <includeBaseDirectory>false</includeBaseDirectory> + <dependencySets> + <dependencySet> + <unpack>false</unpack> + <outputDirectory>lib</outputDirectory> + </dependencySet> + </dependencySets> +</assembly> diff --git a/src/it/projects/dependency-sets/dependencySet-excludeStar/child2/src/main/java/test/App.java b/src/it/projects/dependency-sets/dependencySet-excludeStar/child2/src/main/java/test/App.java new file mode 100644 index 0000000..d0442f3 --- /dev/null +++ b/src/it/projects/dependency-sets/dependencySet-excludeStar/child2/src/main/java/test/App.java @@ -0,0 +1,33 @@ +package test; + +/* + * 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. + */ + + +/** + * Hello world! + * + */ +public class App +{ + public static void main( String[] args ) + { + System.out.println( "Hello World!" ); + } +} diff --git a/src/it/projects/dependency-sets/dependencySet-excludeStar/child3/pom.xml b/src/it/projects/dependency-sets/dependencySet-excludeStar/child3/pom.xml new file mode 100644 index 0000000..3eeca5d --- /dev/null +++ b/src/it/projects/dependency-sets/dependencySet-excludeStar/child3/pom.xml @@ -0,0 +1,60 @@ +<?xml version="1.0"?><project> + +<!-- +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. +--> + + <parent> + <artifactId>dependencySet-excludeStar</artifactId> + <groupId>test</groupId> + <version>1.0-SNAPSHOT</version> + </parent> + <modelVersion>4.0.0</modelVersion> + <artifactId>child3</artifactId> + <version>1.0-SNAPSHOT</version> + + <dependencies> + <dependency> + <groupId>test</groupId> + <artifactId>child2</artifactId> + <version>1.0-SNAPSHOT</version> + </dependency> + </dependencies> + + <build> + <plugins> + <plugin> + <artifactId>maven-assembly-plugin</artifactId> + <executions> + <execution> + <id>attach-binary-assembly</id> + <phase>package</phase> + <configuration> + <descriptors> + <descriptor>src/assemble/bin.xml</descriptor> + </descriptors> + </configuration> + <goals> + <goal>single</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> +</project> diff --git a/src/it/projects/dependency-sets/dependencySet-excludeStar/child3/src/assemble/bin.xml b/src/it/projects/dependency-sets/dependencySet-excludeStar/child3/src/assemble/bin.xml new file mode 100644 index 0000000..013e1f8 --- /dev/null +++ b/src/it/projects/dependency-sets/dependencySet-excludeStar/child3/src/assemble/bin.xml @@ -0,0 +1,35 @@ +<?xml version='1.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. +--> + +<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd"> + <id>bin</id> + <formats> + <format>dir</format> + </formats> + <includeBaseDirectory>false</includeBaseDirectory> + <dependencySets> + <dependencySet> + <unpack>false</unpack> + <outputDirectory>lib</outputDirectory> + </dependencySet> + </dependencySets> +</assembly> diff --git a/src/it/projects/dependency-sets/dependencySet-excludeStar/child3/src/main/java/test/App.java b/src/it/projects/dependency-sets/dependencySet-excludeStar/child3/src/main/java/test/App.java new file mode 100644 index 0000000..d0442f3 --- /dev/null +++ b/src/it/projects/dependency-sets/dependencySet-excludeStar/child3/src/main/java/test/App.java @@ -0,0 +1,33 @@ +package test; + +/* + * 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. + */ + + +/** + * Hello world! + * + */ +public class App +{ + public static void main( String[] args ) + { + System.out.println( "Hello World!" ); + } +} diff --git a/src/it/projects/dependency-sets/dependencySet-excludeStar/invoker.properties b/src/it/projects/dependency-sets/dependencySet-excludeStar/invoker.properties new file mode 100644 index 0000000..4b2a3ba --- /dev/null +++ b/src/it/projects/dependency-sets/dependencySet-excludeStar/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=package diff --git a/src/it/projects/dependency-sets/dependencySet-excludeStar/pom.xml b/src/it/projects/dependency-sets/dependencySet-excludeStar/pom.xml new file mode 100644 index 0000000..4d69b3b --- /dev/null +++ b/src/it/projects/dependency-sets/dependencySet-excludeStar/pom.xml @@ -0,0 +1,40 @@ +<?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/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.apache.maven.plugin.assembly.test</groupId> + <artifactId>it-project-parent</artifactId> + <version>1</version> + </parent> + + <groupId>test</groupId> + <artifactId>dependencySet-excludeStar</artifactId> + <packaging>pom</packaging> + <version>1.0-SNAPSHOT</version> + + <modules> + <module>child1</module> + <module>child2</module> + <module>child3</module> + </modules> +</project> diff --git a/src/it/projects/dependency-sets/dependencySet-excludeStar/verify.bsh b/src/it/projects/dependency-sets/dependencySet-excludeStar/verify.bsh new file mode 100644 index 0000000..52b055a --- /dev/null +++ b/src/it/projects/dependency-sets/dependencySet-excludeStar/verify.bsh @@ -0,0 +1,54 @@ +/* + * 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.*; + +try +{ + System.out.println( "Creating JarFile java.io.File." ); + + File dirFile = new File( basedir, "child3/target/child3-1.0-SNAPSHOT-bin/lib" ); + + if ( !dirFile.isDirectory() ) + { + System.err.println( "directory is missing." ); + return false; + } + + File junitFile = new File( dirFile, "junit-3.8.1.jar" ); + + if (junitFile.isFile()) { + System.err.println( "junit file should not be included" ); + return false; + } + + File child1File = new File( dirFile, "child1-1.0-SNAPSHOT.jar" ); + + if (!child1File.isFile()) { + System.err.println( "child1-1.0-SNAPSHOT.jar file should have been included" ); + return false; + } + + return true; +} +catch( IOException e ) +{ + e.printStackTrace(); + return false; +}