This is an automated email from the ASF dual-hosted git repository. gnodet pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/maven-jar-plugin.git
commit 816680c1185ca3d60ae0e24fb103dbcb7c1176ba Author: Guillaume Nodet <[email protected]> AuthorDate: Mon Jun 24 21:50:08 2024 +0200 Code format on ITs --- pom.xml | 16 +++++++ src/it/MJAR-162/pom.xml | 13 +++--- src/it/MJAR-162/src/main/java/Foo.java | 16 ++----- src/it/MJAR-183/pom.xml | 8 +--- src/it/MJAR-183/src/main/java/A.java | 46 +++++++++---------- src/it/MJAR-198/pom.xml | 1 - src/it/MJAR-198/src/main/java/A.java | 46 +++++++++---------- src/it/MJAR-199-change-classifier/pom.xml | 1 - .../src/test/java/A.java | 46 +++++++++---------- src/it/MJAR-199/pom.xml | 1 - src/it/MJAR-199/src/test/java/A.java | 46 +++++++++---------- src/it/MJAR-210/pom.xml | 7 +-- src/it/MJAR-228/pom.xml | 4 +- .../src/main/java/myproject/HelloWorld.java | 29 +++++++++--- src/it/MJAR-238-modular-jar-main-class/pom.xml | 28 ++++++------ .../src/main/java/myproject/HelloWorld.java | 29 +++++++++--- .../MJAR-260-invalid-automatic-module-name/pom.xml | 4 +- .../src/main/java/myproject/HelloWorld.java | 29 +++++++++--- .../MJAR-260-valid-automatic-module-name/pom.xml | 4 +- .../src/main/java/myproject/HelloWorld.java | 29 +++++++++--- src/it/MJAR-275-reproducible-module-info/pom.xml | 32 ++++++------- .../src/main/java/myproject/HelloWorld.java | 28 +++++++++--- src/it/MJAR-292-detect-mjar-no-versions/pom.xml | 36 +++++++-------- .../src/main/java/myproject/HelloWorld.java | 28 +++++++++--- .../src/main/java/myproject/Utils.java | 26 ++++++++--- src/it/MJAR-292-detect-mjar/pom.xml | 52 +++++++++++----------- .../src/main/java/myproject/HelloWorld.java | 28 +++++++++--- .../src/main/java/myproject/Utils.java | 26 ++++++++--- .../src/main/java10/myproject/Utils.java | 26 ++++++++--- .../src/main/java9/myproject/Utils.java | 28 +++++++++--- src/it/MJAR-292-disable-detect-mjar/pom.xml | 36 +++++++-------- .../src/main/java/myproject/HelloWorld.java | 28 +++++++++--- .../src/main/java/myproject/Utils.java | 26 ++++++++--- .../src/main/java10/myproject/Utils.java | 26 ++++++++--- .../src/main/java9/myproject/Utils.java | 28 +++++++++--- src/it/MJAR-296-exclude-default/pom.xml | 8 ++-- .../src/main/java/Foo.java | 16 ++----- src/it/MJAR-296-suppress-default-excludes/pom.xml | 8 ++-- .../src/main/java/Foo.java | 16 ++----- src/it/MJAR-30-excludes/pom.xml | 7 +-- .../src/main/java/foo/project003/App.java | 26 ++++++++--- .../src/test/java/foo/project003/AppTest.java | 37 ++++++++++----- src/it/MJAR-30-fullcontent/pom.xml | 9 ++-- .../src/main/java/foo/project001/App.java | 26 ++++++++--- .../src/test/java/foo/project001/AppTest.java | 37 ++++++++++----- src/it/MJAR-30-include/pom.xml | 8 ++-- .../src/main/java/TestCompile1.java | 12 ++--- .../src/main/java/service/TestInterface.java | 23 +++++++--- .../main/java/service/impl/TestImplementation.java | 22 +++++++-- src/it/MJAR-307/pom.xml | 7 ++- .../MJAR-307/src/main/java/foo/project003/App.java | 26 ++++++++--- src/it/MJAR-60/pom.xml | 4 +- .../src/main/java/myproject/HelloWorld.java | 29 +++++++++--- src/it/MJAR-62-toolchain/pom.xml | 18 ++++---- .../src/main/java/myproject/HelloWorld.java | 29 +++++++++--- src/it/MJAR-70-no-recreation/pom.xml | 13 +++--- .../src/main/java/myproject/HelloWorld.java | 29 +++++++++--- src/it/MJAR-70-recreation/pom.xml | 12 +++-- .../src/main/java/myproject/HelloWorld.java | 29 +++++++++--- src/it/MJAR-75/client/pom.xml | 4 +- .../java/org/apache/maven/its/it0126/MyClient.java | 27 ++++++++--- src/it/MJAR-75/model/pom.xml | 2 - .../org/apache/maven/its/it0126/Component.java | 21 ++++++++- src/it/MJAR-75/pom.xml | 2 - src/it/MJAR-80-exclude/pom.xml | 7 +-- .../src/main/java/foo/project003/App.java | 26 ++++++++--- .../java/foo/project003/AppIntegrationTest.java | 37 ++++++++++----- .../src/test/java/foo/project003/AppTest.java | 37 ++++++++++----- src/it/MJAR-80-fullcontent/pom.xml | 7 +-- .../src/main/java/foo/project003/App.java | 26 ++++++++--- .../java/foo/project003/AppIntegrationTest.java | 37 ++++++++++----- .../src/test/java/foo/project003/AppTest.java | 37 ++++++++++----- src/it/MJAR-80-include/pom.xml | 7 +-- .../src/main/java/foo/project003/App.java | 26 ++++++++--- .../java/foo/project003/AppIntegrationTest.java | 32 +++++++++---- .../src/test/java/foo/project003/AppTest.java | 37 ++++++++++----- src/it/MJAR-82/pom.xml | 48 ++++++++++---------- .../src/main/java/myproject/HelloWorld.java | 38 +++++++++++----- src/it/manifest-content/pom.xml | 4 +- .../src/main/java/myproject/HelloWorld.java | 29 +++++++++--- src/it/mjar-139/pom.xml | 13 +++--- src/it/mjar-139/src/main/java/Foo.java | 16 ++----- src/it/mjar-71-01/pom.xml | 11 +++-- .../src/main/java/foo/project003/App.java | 26 ++++++++--- src/it/mjar-71-02/pom.xml | 11 +++-- .../src/main/java/foo/project003/App.java | 26 ++++++++--- src/it/mjar-90/pom.xml | 7 +-- src/it/mjar-90/src/main/java/Foo.java | 16 ++----- src/it/mjar-90/src/test/java/FooTest.java | 15 ++----- src/it/project-004/pom.xml | 11 ++--- src/it/project-004/src/main/java/TestCompile1.java | 12 ++--- .../src/main/java/service/TestInterface.java | 22 +++++++-- .../main/java/service/impl/TestImplementation.java | 22 +++++++-- src/test/resources/unit/jar-basic-test/pom.xml | 10 ++--- .../jar-basic-test/src/main/java/TestCompile1.java | 10 ++--- 95 files changed, 1287 insertions(+), 740 deletions(-) diff --git a/pom.xml b/pom.xml index 289bf2a..fe1bb53 100644 --- a/pom.xml +++ b/pom.xml @@ -188,6 +188,22 @@ </resources> <pluginManagement> <plugins> + <plugin> + <groupId>com.diffplug.spotless</groupId> + <artifactId>spotless-maven-plugin</artifactId> + <configuration> + <java> + <includes> + <include>src/**/*.java</include> + </includes> + </java> + <pom> + <includes> + <include>**/pom.xml</include> + </includes> + </pom> + </configuration> + </plugin> <plugin> <groupId>org.apache.rat</groupId> <artifactId>apache-rat-plugin</artifactId> diff --git a/src/it/MJAR-162/pom.xml b/src/it/MJAR-162/pom.xml index cd26816..7b9f053 100644 --- a/src/it/MJAR-162/pom.xml +++ b/src/it/MJAR-162/pom.xml @@ -17,16 +17,13 @@ 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"> +<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> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin-test-mjar-162</artifactId> <version>1.0</version> - <name>Maven</name> <packaging>jar</packaging> + <name>Maven</name> <description>Avoid creating jars</description> <dependencies> <dependency> @@ -49,12 +46,12 @@ <version>@project.version@</version> <executions> <execution> - <configuration> - <skipIfEmpty>true</skipIfEmpty> - </configuration> <goals> <goal>test-jar</goal> </goals> + <configuration> + <skipIfEmpty>true</skipIfEmpty> + </configuration> </execution> </executions> </plugin> diff --git a/src/it/MJAR-162/src/main/java/Foo.java b/src/it/MJAR-162/src/main/java/Foo.java index f939fa6..936ec41 100644 --- a/src/it/MJAR-162/src/main/java/Foo.java +++ b/src/it/MJAR-162/src/main/java/Foo.java @@ -1,4 +1,3 @@ - /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -8,7 +7,7 @@ * "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 + * 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 @@ -17,15 +16,8 @@ * specific language governing permissions and limitations * under the License. */ - -/** - * Hello world! - * - */ -public class Foo -{ - public static void main( String[] args ) - { - System.out.println( "Hello World!" ); +public class Foo { + public static void main(String[] args) { + System.out.println("Hello World!"); } } diff --git a/src/it/MJAR-183/pom.xml b/src/it/MJAR-183/pom.xml index ede6b4a..a15db83 100755 --- a/src/it/MJAR-183/pom.xml +++ b/src/it/MJAR-183/pom.xml @@ -17,11 +17,7 @@ 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"> +<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</groupId> <artifactId>maven-jar-plugin-test-mjar-183</artifactId> @@ -30,11 +26,11 @@ <build> <plugins> <plugin> - <inherited>false</inherited> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <version>@project.version@</version> <extensions>true</extensions> + <inherited>false</inherited> </plugin> </plugins> </build> diff --git a/src/it/MJAR-183/src/main/java/A.java b/src/it/MJAR-183/src/main/java/A.java index 474b0a6..5136a8b 100755 --- a/src/it/MJAR-183/src/main/java/A.java +++ b/src/it/MJAR-183/src/main/java/A.java @@ -1,25 +1,21 @@ - -/* - * 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. - */ - -public class A { - public static void main(String[] args) { - - } -} +/* + * 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. + */ +public class A { + public static void main(String[] args) {} +} diff --git a/src/it/MJAR-198/pom.xml b/src/it/MJAR-198/pom.xml index e10fe4f..86e1f85 100755 --- a/src/it/MJAR-198/pom.xml +++ b/src/it/MJAR-198/pom.xml @@ -17,7 +17,6 @@ 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>0</groupId> diff --git a/src/it/MJAR-198/src/main/java/A.java b/src/it/MJAR-198/src/main/java/A.java index 474b0a6..5136a8b 100755 --- a/src/it/MJAR-198/src/main/java/A.java +++ b/src/it/MJAR-198/src/main/java/A.java @@ -1,25 +1,21 @@ - -/* - * 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. - */ - -public class A { - public static void main(String[] args) { - - } -} +/* + * 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. + */ +public class A { + public static void main(String[] args) {} +} diff --git a/src/it/MJAR-199-change-classifier/pom.xml b/src/it/MJAR-199-change-classifier/pom.xml index fd0d534..0764c10 100755 --- a/src/it/MJAR-199-change-classifier/pom.xml +++ b/src/it/MJAR-199-change-classifier/pom.xml @@ -17,7 +17,6 @@ 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</groupId> diff --git a/src/it/MJAR-199-change-classifier/src/test/java/A.java b/src/it/MJAR-199-change-classifier/src/test/java/A.java index 474b0a6..5136a8b 100755 --- a/src/it/MJAR-199-change-classifier/src/test/java/A.java +++ b/src/it/MJAR-199-change-classifier/src/test/java/A.java @@ -1,25 +1,21 @@ - -/* - * 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. - */ - -public class A { - public static void main(String[] args) { - - } -} +/* + * 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. + */ +public class A { + public static void main(String[] args) {} +} diff --git a/src/it/MJAR-199/pom.xml b/src/it/MJAR-199/pom.xml index 2fcaf99..70fb473 100755 --- a/src/it/MJAR-199/pom.xml +++ b/src/it/MJAR-199/pom.xml @@ -17,7 +17,6 @@ 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</groupId> diff --git a/src/it/MJAR-199/src/test/java/A.java b/src/it/MJAR-199/src/test/java/A.java index 474b0a6..5136a8b 100755 --- a/src/it/MJAR-199/src/test/java/A.java +++ b/src/it/MJAR-199/src/test/java/A.java @@ -1,25 +1,21 @@ - -/* - * 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. - */ - -public class A { - public static void main(String[] args) { - - } -} +/* + * 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. + */ +public class A { + public static void main(String[] args) {} +} diff --git a/src/it/MJAR-210/pom.xml b/src/it/MJAR-210/pom.xml index 6836b1a..2d4d92c 100644 --- a/src/it/MJAR-210/pom.xml +++ b/src/it/MJAR-210/pom.xml @@ -17,16 +17,13 @@ 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"> +<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> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin-test-mjar-210</artifactId> <version>1.0</version> - <name>Maven</name> <packaging>jar</packaging> + <name>Maven</name> <build> <plugins> <plugin> diff --git a/src/it/MJAR-228/pom.xml b/src/it/MJAR-228/pom.xml index 4508032..cdad4e7 100644 --- a/src/it/MJAR-228/pom.xml +++ b/src/it/MJAR-228/pom.xml @@ -21,9 +21,9 @@ <modelVersion>4.0.0</modelVersion> <groupId>org.apache.maven.plugins</groupId> <artifactId>mjar228</artifactId> - <name>MJAR-228</name> - <packaging>jar</packaging> <version>1.0-SNAPSHOT</version> + <packaging>jar</packaging> + <name>MJAR-228</name> <organization> <name>jar plugin it</name> </organization> diff --git a/src/it/MJAR-228/src/main/java/myproject/HelloWorld.java b/src/it/MJAR-228/src/main/java/myproject/HelloWorld.java index fd0ad83..b156b77 100644 --- a/src/it/MJAR-228/src/main/java/myproject/HelloWorld.java +++ b/src/it/MJAR-228/src/main/java/myproject/HelloWorld.java @@ -1,3 +1,21 @@ +/* + * 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. + */ package myproject; /* @@ -24,13 +42,12 @@ package myproject; */ public class HelloWorld { - /** + /** * Main method. * * @param args Not used */ - public static void main( String[] args ) - { - System.out.println( "Hi!" ); - } -} \ No newline at end of file + public static void main(String[] args) { + System.out.println("Hi!"); + } +} diff --git a/src/it/MJAR-238-modular-jar-main-class/pom.xml b/src/it/MJAR-238-modular-jar-main-class/pom.xml index ebb31f6..e438ee7 100644 --- a/src/it/MJAR-238-modular-jar-main-class/pom.xml +++ b/src/it/MJAR-238-modular-jar-main-class/pom.xml @@ -21,12 +21,24 @@ <modelVersion>4.0.0</modelVersion> <groupId>org.apache.maven.plugins</groupId> <artifactId>mjar-238-modular-jar-main-class</artifactId> + <version>1.0-SNAPSHOT</version> + <packaging>jar</packaging> <name>mjar-238-modular-jar-main-class</name> <description>Verifies that the modular descriptor main class is set for modular Jar files</description> - <packaging>jar</packaging> - <version>1.0-SNAPSHOT</version> <build> + + <pluginManagement> + <plugins> + <plugin> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <source>1.9</source> + <target>1.9</target> + </configuration> + </plugin> + </plugins> + </pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> @@ -41,17 +53,5 @@ </configuration> </plugin> </plugins> - - <pluginManagement> - <plugins> - <plugin> - <artifactId>maven-compiler-plugin</artifactId> - <configuration> - <source>1.9</source> - <target>1.9</target> - </configuration> - </plugin> - </plugins> - </pluginManagement> </build> </project> diff --git a/src/it/MJAR-238-modular-jar-main-class/src/main/java/myproject/HelloWorld.java b/src/it/MJAR-238-modular-jar-main-class/src/main/java/myproject/HelloWorld.java index fd0ad83..b156b77 100644 --- a/src/it/MJAR-238-modular-jar-main-class/src/main/java/myproject/HelloWorld.java +++ b/src/it/MJAR-238-modular-jar-main-class/src/main/java/myproject/HelloWorld.java @@ -1,3 +1,21 @@ +/* + * 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. + */ package myproject; /* @@ -24,13 +42,12 @@ package myproject; */ public class HelloWorld { - /** + /** * Main method. * * @param args Not used */ - public static void main( String[] args ) - { - System.out.println( "Hi!" ); - } -} \ No newline at end of file + public static void main(String[] args) { + System.out.println("Hi!"); + } +} diff --git a/src/it/MJAR-260-invalid-automatic-module-name/pom.xml b/src/it/MJAR-260-invalid-automatic-module-name/pom.xml index 4046808..f739192 100644 --- a/src/it/MJAR-260-invalid-automatic-module-name/pom.xml +++ b/src/it/MJAR-260-invalid-automatic-module-name/pom.xml @@ -21,9 +21,9 @@ <modelVersion>4.0.0</modelVersion> <groupId>org.apache.maven.plugins</groupId> <artifactId>mjar260-invalid-automatic-module-name</artifactId> - <name>MJAR-260-invalid-automatic-module-name</name> - <packaging>jar</packaging> <version>1.0-SNAPSHOT</version> + <packaging>jar</packaging> + <name>MJAR-260-invalid-automatic-module-name</name> <organization> <name>jar plugin it</name> </organization> diff --git a/src/it/MJAR-260-invalid-automatic-module-name/src/main/java/myproject/HelloWorld.java b/src/it/MJAR-260-invalid-automatic-module-name/src/main/java/myproject/HelloWorld.java index fd0ad83..b156b77 100644 --- a/src/it/MJAR-260-invalid-automatic-module-name/src/main/java/myproject/HelloWorld.java +++ b/src/it/MJAR-260-invalid-automatic-module-name/src/main/java/myproject/HelloWorld.java @@ -1,3 +1,21 @@ +/* + * 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. + */ package myproject; /* @@ -24,13 +42,12 @@ package myproject; */ public class HelloWorld { - /** + /** * Main method. * * @param args Not used */ - public static void main( String[] args ) - { - System.out.println( "Hi!" ); - } -} \ No newline at end of file + public static void main(String[] args) { + System.out.println("Hi!"); + } +} diff --git a/src/it/MJAR-260-valid-automatic-module-name/pom.xml b/src/it/MJAR-260-valid-automatic-module-name/pom.xml index ede7f61..65c0971 100644 --- a/src/it/MJAR-260-valid-automatic-module-name/pom.xml +++ b/src/it/MJAR-260-valid-automatic-module-name/pom.xml @@ -21,9 +21,9 @@ <modelVersion>4.0.0</modelVersion> <groupId>org.apache.maven.plugins</groupId> <artifactId>mjar260-valid-automatic-module-name</artifactId> - <name>MJAR-260-valid-automatic-module-name</name> - <packaging>jar</packaging> <version>1.0-SNAPSHOT</version> + <packaging>jar</packaging> + <name>MJAR-260-valid-automatic-module-name</name> <organization> <name>jar plugin it</name> </organization> diff --git a/src/it/MJAR-260-valid-automatic-module-name/src/main/java/myproject/HelloWorld.java b/src/it/MJAR-260-valid-automatic-module-name/src/main/java/myproject/HelloWorld.java index fd0ad83..b156b77 100644 --- a/src/it/MJAR-260-valid-automatic-module-name/src/main/java/myproject/HelloWorld.java +++ b/src/it/MJAR-260-valid-automatic-module-name/src/main/java/myproject/HelloWorld.java @@ -1,3 +1,21 @@ +/* + * 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. + */ package myproject; /* @@ -24,13 +42,12 @@ package myproject; */ public class HelloWorld { - /** + /** * Main method. * * @param args Not used */ - public static void main( String[] args ) - { - System.out.println( "Hi!" ); - } -} \ No newline at end of file + public static void main(String[] args) { + System.out.println("Hi!"); + } +} diff --git a/src/it/MJAR-275-reproducible-module-info/pom.xml b/src/it/MJAR-275-reproducible-module-info/pom.xml index c25061c..c250ca5 100644 --- a/src/it/MJAR-275-reproducible-module-info/pom.xml +++ b/src/it/MJAR-275-reproducible-module-info/pom.xml @@ -21,10 +21,10 @@ <modelVersion>4.0.0</modelVersion> <groupId>org.apache.maven.plugins</groupId> <artifactId>mjar-275-reproducible-multi-release-modular-jar</artifactId> + <version>1.0-SNAPSHOT</version> + <packaging>jar</packaging> <name>mjar-275-reproducible-multi-release-modular-jar</name> <description>Verifies that the modular descriptor is reproducible (timestamp is set)</description> - <packaging>jar</packaging> - <version>1.0-SNAPSHOT</version> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> @@ -32,20 +32,6 @@ </properties> <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jar-plugin</artifactId> - <version>@project.version@</version> - <configuration> - <archive> - <manifest> - <mainClass>myproject.HelloWorld</mainClass> - </manifest> - </archive> - </configuration> - </plugin> - </plugins> <pluginManagement> <plugins> @@ -73,5 +59,19 @@ </plugin> </plugins> </pluginManagement> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jar-plugin</artifactId> + <version>@project.version@</version> + <configuration> + <archive> + <manifest> + <mainClass>myproject.HelloWorld</mainClass> + </manifest> + </archive> + </configuration> + </plugin> + </plugins> </build> </project> diff --git a/src/it/MJAR-275-reproducible-module-info/src/main/java/myproject/HelloWorld.java b/src/it/MJAR-275-reproducible-module-info/src/main/java/myproject/HelloWorld.java index 01f2991..b156b77 100644 --- a/src/it/MJAR-275-reproducible-module-info/src/main/java/myproject/HelloWorld.java +++ b/src/it/MJAR-275-reproducible-module-info/src/main/java/myproject/HelloWorld.java @@ -1,3 +1,21 @@ +/* + * 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. + */ package myproject; /* @@ -22,16 +40,14 @@ package myproject; /** * The classic Hello World App. */ -public class HelloWorld -{ +public class HelloWorld { /** * Main method. * * @param args Not used */ - public static void main( String[] args ) - { - System.out.println( "Hi!" ); + public static void main(String[] args) { + System.out.println("Hi!"); } -} \ No newline at end of file +} diff --git a/src/it/MJAR-292-detect-mjar-no-versions/pom.xml b/src/it/MJAR-292-detect-mjar-no-versions/pom.xml index 7a82a2d..1cc61ea 100644 --- a/src/it/MJAR-292-detect-mjar-no-versions/pom.xml +++ b/src/it/MJAR-292-detect-mjar-no-versions/pom.xml @@ -17,17 +17,15 @@ 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"> +<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> <groupId>org.apache.maven.plugins</groupId> <artifactId>mjar-292-detect-multi-release-jar</artifactId> + <version>1.0-SNAPSHOT</version> + <packaging>jar</packaging> <name>mjar-292-detect-multi-release-jar</name> <description>Verifies that the multi-release jar contains the manifest entry</description> - <packaging>jar</packaging> - <version>1.0-SNAPSHOT</version> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> @@ -35,20 +33,6 @@ </properties> <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jar-plugin</artifactId> - <version>@project.version@</version> - <configuration> - <archive> - <manifest> - <mainClass>myproject.HelloWorld</mainClass> - </manifest> - </archive> - </configuration> - </plugin> - </plugins> <pluginManagement> <plugins> @@ -89,5 +73,19 @@ </plugin> </plugins> </pluginManagement> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jar-plugin</artifactId> + <version>@project.version@</version> + <configuration> + <archive> + <manifest> + <mainClass>myproject.HelloWorld</mainClass> + </manifest> + </archive> + </configuration> + </plugin> + </plugins> </build> </project> diff --git a/src/it/MJAR-292-detect-mjar-no-versions/src/main/java/myproject/HelloWorld.java b/src/it/MJAR-292-detect-mjar-no-versions/src/main/java/myproject/HelloWorld.java index 85a84d8..7e5dec9 100644 --- a/src/it/MJAR-292-detect-mjar-no-versions/src/main/java/myproject/HelloWorld.java +++ b/src/it/MJAR-292-detect-mjar-no-versions/src/main/java/myproject/HelloWorld.java @@ -1,3 +1,21 @@ +/* + * 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. + */ package myproject; /* @@ -22,16 +40,14 @@ package myproject; /** * The classic Hello World App. */ -public class HelloWorld -{ +public class HelloWorld { /** * Main method. * * @param args Not used */ - public static void main( String[] args ) - { - System.out.println( new Utils().getJavaVersion() ); + public static void main(String[] args) { + System.out.println(new Utils().getJavaVersion()); } -} \ No newline at end of file +} diff --git a/src/it/MJAR-292-detect-mjar-no-versions/src/main/java/myproject/Utils.java b/src/it/MJAR-292-detect-mjar-no-versions/src/main/java/myproject/Utils.java index eea2683..e071882 100644 --- a/src/it/MJAR-292-detect-mjar-no-versions/src/main/java/myproject/Utils.java +++ b/src/it/MJAR-292-detect-mjar-no-versions/src/main/java/myproject/Utils.java @@ -1,3 +1,21 @@ +/* + * 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. + */ package myproject; /* @@ -22,11 +40,9 @@ package myproject; /** * The classic Utils class. */ -public class Utils -{ - public String getJavaVersion() - { +public class Utils { + public String getJavaVersion() { System.out.println("Running Java 8 (base) version"); - return System.getProperty( "java.specification.version" ); + return System.getProperty("java.specification.version"); } } diff --git a/src/it/MJAR-292-detect-mjar/pom.xml b/src/it/MJAR-292-detect-mjar/pom.xml index f3e1165..9c0afd5 100644 --- a/src/it/MJAR-292-detect-mjar/pom.xml +++ b/src/it/MJAR-292-detect-mjar/pom.xml @@ -17,17 +17,15 @@ 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"> +<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> <groupId>org.apache.maven.plugins</groupId> <artifactId>mjar-292-detect-multi-release-jar</artifactId> + <version>1.0-SNAPSHOT</version> + <packaging>jar</packaging> <name>mjar-292-detect-multi-release-jar</name> <description>Verifies that the multi-release jar contains the manifest entry</description> - <packaging>jar</packaging> - <version>1.0-SNAPSHOT</version> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> @@ -35,28 +33,6 @@ </properties> <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jar-plugin</artifactId> - <version>@project.version@</version> - <configuration> - <archive> - <manifest> - <mainClass>myproject.HelloWorld</mainClass> - <addDefaultImplementationEntries>true</addDefaultImplementationEntries> - </manifest> - <manifestEntries> - <!-- - We override this config since we are detecting the versioned area, - The output JAR should contain `Multi-Release: true` - --> - <Multi-Release>false</Multi-Release> - </manifestEntries> - </archive> - </configuration> - </plugin> - </plugins> <pluginManagement> <plugins> @@ -97,5 +73,27 @@ </plugin> </plugins> </pluginManagement> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jar-plugin</artifactId> + <version>@project.version@</version> + <configuration> + <archive> + <manifest> + <mainClass>myproject.HelloWorld</mainClass> + <addDefaultImplementationEntries>true</addDefaultImplementationEntries> + </manifest> + <manifestEntries> + <!-- + We override this config since we are detecting the versioned area, + The output JAR should contain `Multi-Release: true` + --> + <Multi-Release>false</Multi-Release> + </manifestEntries> + </archive> + </configuration> + </plugin> + </plugins> </build> </project> diff --git a/src/it/MJAR-292-detect-mjar/src/main/java/myproject/HelloWorld.java b/src/it/MJAR-292-detect-mjar/src/main/java/myproject/HelloWorld.java index 85a84d8..7e5dec9 100644 --- a/src/it/MJAR-292-detect-mjar/src/main/java/myproject/HelloWorld.java +++ b/src/it/MJAR-292-detect-mjar/src/main/java/myproject/HelloWorld.java @@ -1,3 +1,21 @@ +/* + * 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. + */ package myproject; /* @@ -22,16 +40,14 @@ package myproject; /** * The classic Hello World App. */ -public class HelloWorld -{ +public class HelloWorld { /** * Main method. * * @param args Not used */ - public static void main( String[] args ) - { - System.out.println( new Utils().getJavaVersion() ); + public static void main(String[] args) { + System.out.println(new Utils().getJavaVersion()); } -} \ No newline at end of file +} diff --git a/src/it/MJAR-292-detect-mjar/src/main/java/myproject/Utils.java b/src/it/MJAR-292-detect-mjar/src/main/java/myproject/Utils.java index eea2683..e071882 100644 --- a/src/it/MJAR-292-detect-mjar/src/main/java/myproject/Utils.java +++ b/src/it/MJAR-292-detect-mjar/src/main/java/myproject/Utils.java @@ -1,3 +1,21 @@ +/* + * 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. + */ package myproject; /* @@ -22,11 +40,9 @@ package myproject; /** * The classic Utils class. */ -public class Utils -{ - public String getJavaVersion() - { +public class Utils { + public String getJavaVersion() { System.out.println("Running Java 8 (base) version"); - return System.getProperty( "java.specification.version" ); + return System.getProperty("java.specification.version"); } } diff --git a/src/it/MJAR-292-detect-mjar/src/main/java10/myproject/Utils.java b/src/it/MJAR-292-detect-mjar/src/main/java10/myproject/Utils.java index b0bf5c7..1aec7f1 100644 --- a/src/it/MJAR-292-detect-mjar/src/main/java10/myproject/Utils.java +++ b/src/it/MJAR-292-detect-mjar/src/main/java10/myproject/Utils.java @@ -1,3 +1,21 @@ +/* + * 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. + */ package myproject; /* @@ -22,12 +40,10 @@ package myproject; /** * The classic Utils class. */ -public class Utils -{ - public String getJavaVersion() - { +public class Utils { + public String getJavaVersion() { System.out.println("Running Java 10+ version"); Runtime.Version runtimeVersion = Runtime.version(); - return String.valueOf( runtimeVersion.feature() ); + return String.valueOf(runtimeVersion.feature()); } } diff --git a/src/it/MJAR-292-detect-mjar/src/main/java9/myproject/Utils.java b/src/it/MJAR-292-detect-mjar/src/main/java9/myproject/Utils.java index 613f10c..65650f4 100644 --- a/src/it/MJAR-292-detect-mjar/src/main/java9/myproject/Utils.java +++ b/src/it/MJAR-292-detect-mjar/src/main/java9/myproject/Utils.java @@ -1,3 +1,21 @@ +/* + * 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. + */ package myproject; /* @@ -22,12 +40,10 @@ package myproject; /** * The classic Utils class. */ -public class Utils -{ - public String getJavaVersion() - { - System.out.println( "Running Java 9 version" ); +public class Utils { + public String getJavaVersion() { + System.out.println("Running Java 9 version"); Runtime.Version runtimeVersion = Runtime.version(); - return String.valueOf( runtimeVersion.major() ); + return String.valueOf(runtimeVersion.major()); } } diff --git a/src/it/MJAR-292-disable-detect-mjar/pom.xml b/src/it/MJAR-292-disable-detect-mjar/pom.xml index 7a82a2d..1cc61ea 100644 --- a/src/it/MJAR-292-disable-detect-mjar/pom.xml +++ b/src/it/MJAR-292-disable-detect-mjar/pom.xml @@ -17,17 +17,15 @@ 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"> +<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> <groupId>org.apache.maven.plugins</groupId> <artifactId>mjar-292-detect-multi-release-jar</artifactId> + <version>1.0-SNAPSHOT</version> + <packaging>jar</packaging> <name>mjar-292-detect-multi-release-jar</name> <description>Verifies that the multi-release jar contains the manifest entry</description> - <packaging>jar</packaging> - <version>1.0-SNAPSHOT</version> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> @@ -35,20 +33,6 @@ </properties> <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jar-plugin</artifactId> - <version>@project.version@</version> - <configuration> - <archive> - <manifest> - <mainClass>myproject.HelloWorld</mainClass> - </manifest> - </archive> - </configuration> - </plugin> - </plugins> <pluginManagement> <plugins> @@ -89,5 +73,19 @@ </plugin> </plugins> </pluginManagement> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jar-plugin</artifactId> + <version>@project.version@</version> + <configuration> + <archive> + <manifest> + <mainClass>myproject.HelloWorld</mainClass> + </manifest> + </archive> + </configuration> + </plugin> + </plugins> </build> </project> diff --git a/src/it/MJAR-292-disable-detect-mjar/src/main/java/myproject/HelloWorld.java b/src/it/MJAR-292-disable-detect-mjar/src/main/java/myproject/HelloWorld.java index 85a84d8..7e5dec9 100644 --- a/src/it/MJAR-292-disable-detect-mjar/src/main/java/myproject/HelloWorld.java +++ b/src/it/MJAR-292-disable-detect-mjar/src/main/java/myproject/HelloWorld.java @@ -1,3 +1,21 @@ +/* + * 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. + */ package myproject; /* @@ -22,16 +40,14 @@ package myproject; /** * The classic Hello World App. */ -public class HelloWorld -{ +public class HelloWorld { /** * Main method. * * @param args Not used */ - public static void main( String[] args ) - { - System.out.println( new Utils().getJavaVersion() ); + public static void main(String[] args) { + System.out.println(new Utils().getJavaVersion()); } -} \ No newline at end of file +} diff --git a/src/it/MJAR-292-disable-detect-mjar/src/main/java/myproject/Utils.java b/src/it/MJAR-292-disable-detect-mjar/src/main/java/myproject/Utils.java index eea2683..e071882 100644 --- a/src/it/MJAR-292-disable-detect-mjar/src/main/java/myproject/Utils.java +++ b/src/it/MJAR-292-disable-detect-mjar/src/main/java/myproject/Utils.java @@ -1,3 +1,21 @@ +/* + * 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. + */ package myproject; /* @@ -22,11 +40,9 @@ package myproject; /** * The classic Utils class. */ -public class Utils -{ - public String getJavaVersion() - { +public class Utils { + public String getJavaVersion() { System.out.println("Running Java 8 (base) version"); - return System.getProperty( "java.specification.version" ); + return System.getProperty("java.specification.version"); } } diff --git a/src/it/MJAR-292-disable-detect-mjar/src/main/java10/myproject/Utils.java b/src/it/MJAR-292-disable-detect-mjar/src/main/java10/myproject/Utils.java index b0bf5c7..1aec7f1 100644 --- a/src/it/MJAR-292-disable-detect-mjar/src/main/java10/myproject/Utils.java +++ b/src/it/MJAR-292-disable-detect-mjar/src/main/java10/myproject/Utils.java @@ -1,3 +1,21 @@ +/* + * 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. + */ package myproject; /* @@ -22,12 +40,10 @@ package myproject; /** * The classic Utils class. */ -public class Utils -{ - public String getJavaVersion() - { +public class Utils { + public String getJavaVersion() { System.out.println("Running Java 10+ version"); Runtime.Version runtimeVersion = Runtime.version(); - return String.valueOf( runtimeVersion.feature() ); + return String.valueOf(runtimeVersion.feature()); } } diff --git a/src/it/MJAR-292-disable-detect-mjar/src/main/java9/myproject/Utils.java b/src/it/MJAR-292-disable-detect-mjar/src/main/java9/myproject/Utils.java index 613f10c..65650f4 100644 --- a/src/it/MJAR-292-disable-detect-mjar/src/main/java9/myproject/Utils.java +++ b/src/it/MJAR-292-disable-detect-mjar/src/main/java9/myproject/Utils.java @@ -1,3 +1,21 @@ +/* + * 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. + */ package myproject; /* @@ -22,12 +40,10 @@ package myproject; /** * The classic Utils class. */ -public class Utils -{ - public String getJavaVersion() - { - System.out.println( "Running Java 9 version" ); +public class Utils { + public String getJavaVersion() { + System.out.println("Running Java 9 version"); Runtime.Version runtimeVersion = Runtime.version(); - return String.valueOf( runtimeVersion.major() ); + return String.valueOf(runtimeVersion.major()); } } diff --git a/src/it/MJAR-296-exclude-default/pom.xml b/src/it/MJAR-296-exclude-default/pom.xml index 1cdf068..d3bc8c2 100644 --- a/src/it/MJAR-296-exclude-default/pom.xml +++ b/src/it/MJAR-296-exclude-default/pom.xml @@ -17,17 +17,15 @@ 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"> +<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> <groupId>org.apache.maven.plugins</groupId> <artifactId>mjar-296-exclude-default</artifactId> + <version>1.0-SNAPSHOT</version> + <packaging>jar</packaging> <name>mjar-296-suppress-default-excludes</name> <description>Verifies that the resulting jar not includes files excluded by default</description> - <packaging>jar</packaging> - <version>1.0-SNAPSHOT</version> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> diff --git a/src/it/MJAR-296-exclude-default/src/main/java/Foo.java b/src/it/MJAR-296-exclude-default/src/main/java/Foo.java index f939fa6..936ec41 100644 --- a/src/it/MJAR-296-exclude-default/src/main/java/Foo.java +++ b/src/it/MJAR-296-exclude-default/src/main/java/Foo.java @@ -1,4 +1,3 @@ - /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -8,7 +7,7 @@ * "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 + * 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 @@ -17,15 +16,8 @@ * specific language governing permissions and limitations * under the License. */ - -/** - * Hello world! - * - */ -public class Foo -{ - public static void main( String[] args ) - { - System.out.println( "Hello World!" ); +public class Foo { + public static void main(String[] args) { + System.out.println("Hello World!"); } } diff --git a/src/it/MJAR-296-suppress-default-excludes/pom.xml b/src/it/MJAR-296-suppress-default-excludes/pom.xml index 9ff5b45..0cd666c 100644 --- a/src/it/MJAR-296-suppress-default-excludes/pom.xml +++ b/src/it/MJAR-296-suppress-default-excludes/pom.xml @@ -17,17 +17,15 @@ 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"> +<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> <groupId>org.apache.maven.plugins</groupId> <artifactId>mjar-296-suppress-default-excludes</artifactId> + <version>1.0-SNAPSHOT</version> + <packaging>jar</packaging> <name>mjar-296-suppress-default-excludes</name> <description>Verifies that the resulting jar includes files excluded by default</description> - <packaging>jar</packaging> - <version>1.0-SNAPSHOT</version> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> diff --git a/src/it/MJAR-296-suppress-default-excludes/src/main/java/Foo.java b/src/it/MJAR-296-suppress-default-excludes/src/main/java/Foo.java index f939fa6..936ec41 100644 --- a/src/it/MJAR-296-suppress-default-excludes/src/main/java/Foo.java +++ b/src/it/MJAR-296-suppress-default-excludes/src/main/java/Foo.java @@ -1,4 +1,3 @@ - /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -8,7 +7,7 @@ * "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 + * 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 @@ -17,15 +16,8 @@ * specific language governing permissions and limitations * under the License. */ - -/** - * Hello world! - * - */ -public class Foo -{ - public static void main( String[] args ) - { - System.out.println( "Hello World!" ); +public class Foo { + public static void main(String[] args) { + System.out.println("Hello World!"); } } diff --git a/src/it/MJAR-30-excludes/pom.xml b/src/it/MJAR-30-excludes/pom.xml index 5273879..45631ce 100644 --- a/src/it/MJAR-30-excludes/pom.xml +++ b/src/it/MJAR-30-excludes/pom.xml @@ -17,16 +17,13 @@ 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"> +<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> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin-test-mjar-30-03</artifactId> <version>99.0</version> - <name>Maven</name> <packaging>jar</packaging> + <name>Maven</name> <description>Tests excludes.</description> <dependencies> <dependency> diff --git a/src/it/MJAR-30-excludes/src/main/java/foo/project003/App.java b/src/it/MJAR-30-excludes/src/main/java/foo/project003/App.java index 3a3d166..3402dfd 100644 --- a/src/it/MJAR-30-excludes/src/main/java/foo/project003/App.java +++ b/src/it/MJAR-30-excludes/src/main/java/foo/project003/App.java @@ -1,3 +1,21 @@ +/* + * 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. + */ package foo.project003; /* @@ -23,10 +41,8 @@ package foo.project003; * Hello world! * */ -public class App -{ - public static void main( String[] args ) - { - System.out.println( "Hello World!" ); +public class App { + public static void main(String[] args) { + System.out.println("Hello World!"); } } diff --git a/src/it/MJAR-30-excludes/src/test/java/foo/project003/AppTest.java b/src/it/MJAR-30-excludes/src/test/java/foo/project003/AppTest.java index d8d8a33..43f793c 100644 --- a/src/it/MJAR-30-excludes/src/test/java/foo/project003/AppTest.java +++ b/src/it/MJAR-30-excludes/src/test/java/foo/project003/AppTest.java @@ -1,3 +1,21 @@ +/* + * 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. + */ package foo.project003; /* @@ -26,32 +44,27 @@ import junit.framework.TestSuite; /** * Unit test for simple App. */ -public class AppTest - extends TestCase -{ +public class AppTest extends TestCase { /** * Create the test case * * @param testName name of the test case */ - public AppTest( String testName ) - { - super( testName ); + public AppTest(String testName) { + super(testName); } /** * @return the suite of tests being tested */ - public static Test suite() - { - return new TestSuite( AppTest.class ); + public static Test suite() { + return new TestSuite(AppTest.class); } /** * Rigourous Test :-) */ - public void testApp() - { - assertTrue( true ); + public void testApp() { + assertTrue(true); } } diff --git a/src/it/MJAR-30-fullcontent/pom.xml b/src/it/MJAR-30-fullcontent/pom.xml index b66d6f9..058ca62 100644 --- a/src/it/MJAR-30-fullcontent/pom.xml +++ b/src/it/MJAR-30-fullcontent/pom.xml @@ -17,18 +17,15 @@ 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"> +<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> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin-test-mjar-30-01</artifactId> <version>99.0</version> - <name>Maven</name> <packaging>jar</packaging> - <url>http://maven.apache.org</url> + <name>Maven</name> <description>Tests the normal behavior of jar-plugin.</description> + <url>http://maven.apache.org</url> <dependencies> <dependency> <groupId>junit</groupId> diff --git a/src/it/MJAR-30-fullcontent/src/main/java/foo/project001/App.java b/src/it/MJAR-30-fullcontent/src/main/java/foo/project001/App.java index a2b19d8..afb5af9 100644 --- a/src/it/MJAR-30-fullcontent/src/main/java/foo/project001/App.java +++ b/src/it/MJAR-30-fullcontent/src/main/java/foo/project001/App.java @@ -1,3 +1,21 @@ +/* + * 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. + */ package foo.project001; /* @@ -23,10 +41,8 @@ package foo.project001; * Hello world! * */ -public class App -{ - public static void main( String[] args ) - { - System.out.println( "Hello World!" ); +public class App { + public static void main(String[] args) { + System.out.println("Hello World!"); } } diff --git a/src/it/MJAR-30-fullcontent/src/test/java/foo/project001/AppTest.java b/src/it/MJAR-30-fullcontent/src/test/java/foo/project001/AppTest.java index 2f8bb48..4a912ec 100644 --- a/src/it/MJAR-30-fullcontent/src/test/java/foo/project001/AppTest.java +++ b/src/it/MJAR-30-fullcontent/src/test/java/foo/project001/AppTest.java @@ -1,3 +1,21 @@ +/* + * 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. + */ package foo.project001; /* @@ -26,32 +44,27 @@ import junit.framework.TestSuite; /** * Unit test for simple App. */ -public class AppTest - extends TestCase -{ +public class AppTest extends TestCase { /** * Create the test case * * @param testName name of the test case */ - public AppTest( String testName ) - { - super( testName ); + public AppTest(String testName) { + super(testName); } /** * @return the suite of tests being tested */ - public static Test suite() - { - return new TestSuite( AppTest.class ); + public static Test suite() { + return new TestSuite(AppTest.class); } /** * Rigourous Test :-) */ - public void testApp() - { - assertTrue( true ); + public void testApp() { + assertTrue(true); } } diff --git a/src/it/MJAR-30-include/pom.xml b/src/it/MJAR-30-include/pom.xml index 6fb1dd9..2afaca3 100644 --- a/src/it/MJAR-30-include/pom.xml +++ b/src/it/MJAR-30-include/pom.xml @@ -17,17 +17,15 @@ 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"> +<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> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin-test-mjar-30-02</artifactId> <version>99.0</version> - <name>Maven</name> <packaging>jar</packaging> - <url>http://maven.apache.org</url> + <name>Maven</name> <description>Tests a includes.</description> + <url>http://maven.apache.org</url> <build> <plugins> <plugin> diff --git a/src/it/MJAR-30-include/src/main/java/TestCompile1.java b/src/it/MJAR-30-include/src/main/java/TestCompile1.java index 9a98f12..204bdeb 100644 --- a/src/it/MJAR-30-include/src/main/java/TestCompile1.java +++ b/src/it/MJAR-30-include/src/main/java/TestCompile1.java @@ -7,7 +7,7 @@ * "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 + * 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 @@ -16,14 +16,10 @@ * specific language governing permissions and limitations * under the License. */ +public class TestCompile1 { -public class TestCompile1 -{ - - public TestCompile1() - { + public TestCompile1() { System.out.println("Woo Hoo!"); } - -} \ No newline at end of file +} diff --git a/src/it/MJAR-30-include/src/main/java/service/TestInterface.java b/src/it/MJAR-30-include/src/main/java/service/TestInterface.java index cc7bfef..75e29a9 100644 --- a/src/it/MJAR-30-include/src/main/java/service/TestInterface.java +++ b/src/it/MJAR-30-include/src/main/java/service/TestInterface.java @@ -1,5 +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. */ package service; @@ -26,6 +41,4 @@ package service; * @author Johan Kindgren * */ -public interface TestInterface { - -} +public interface TestInterface {} diff --git a/src/it/MJAR-30-include/src/main/java/service/impl/TestImplementation.java b/src/it/MJAR-30-include/src/main/java/service/impl/TestImplementation.java index 33b4e21..1258521 100644 --- a/src/it/MJAR-30-include/src/main/java/service/impl/TestImplementation.java +++ b/src/it/MJAR-30-include/src/main/java/service/impl/TestImplementation.java @@ -1,3 +1,21 @@ +/* + * 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. + */ package service.impl; /* @@ -23,6 +41,4 @@ package service.impl; * @author Johan Kindgren * */ -public class TestImplementation { - -} +public class TestImplementation {} diff --git a/src/it/MJAR-307/pom.xml b/src/it/MJAR-307/pom.xml index d0c36ed..88e9057 100644 --- a/src/it/MJAR-307/pom.xml +++ b/src/it/MJAR-307/pom.xml @@ -1,3 +1,4 @@ +<?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 @@ -16,15 +17,13 @@ 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"> +<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> <groupId>org.apache.maven.plugins.jar.it</groupId> <artifactId>mjar-307</artifactId> - <packaging>jar</packaging> <version>1.0</version> + <packaging>jar</packaging> <name>it-mjar-307</name> <description>Wrong version of commons-io cause a ClassNotFoundException: org.apache.commons.io.file.attribute.FileTimes</description> diff --git a/src/it/MJAR-307/src/main/java/foo/project003/App.java b/src/it/MJAR-307/src/main/java/foo/project003/App.java index 3a3d166..3402dfd 100644 --- a/src/it/MJAR-307/src/main/java/foo/project003/App.java +++ b/src/it/MJAR-307/src/main/java/foo/project003/App.java @@ -1,3 +1,21 @@ +/* + * 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. + */ package foo.project003; /* @@ -23,10 +41,8 @@ package foo.project003; * Hello world! * */ -public class App -{ - public static void main( String[] args ) - { - System.out.println( "Hello World!" ); +public class App { + public static void main(String[] args) { + System.out.println("Hello World!"); } } diff --git a/src/it/MJAR-60/pom.xml b/src/it/MJAR-60/pom.xml index b5aac22..6cd14e7 100644 --- a/src/it/MJAR-60/pom.xml +++ b/src/it/MJAR-60/pom.xml @@ -21,9 +21,9 @@ <modelVersion>4.0.0</modelVersion> <groupId>org.apache.maven.plugins</groupId> <artifactId>MJAR-60</artifactId> - <name>MJAR-60</name> - <packaging>jar</packaging> <version>1.0-SNAPSHOT</version> + <packaging>jar</packaging> + <name>MJAR-60</name> <build> <plugins> diff --git a/src/it/MJAR-60/src/main/java/myproject/HelloWorld.java b/src/it/MJAR-60/src/main/java/myproject/HelloWorld.java index fd0ad83..b156b77 100644 --- a/src/it/MJAR-60/src/main/java/myproject/HelloWorld.java +++ b/src/it/MJAR-60/src/main/java/myproject/HelloWorld.java @@ -1,3 +1,21 @@ +/* + * 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. + */ package myproject; /* @@ -24,13 +42,12 @@ package myproject; */ public class HelloWorld { - /** + /** * Main method. * * @param args Not used */ - public static void main( String[] args ) - { - System.out.println( "Hi!" ); - } -} \ No newline at end of file + public static void main(String[] args) { + System.out.println("Hi!"); + } +} diff --git a/src/it/MJAR-62-toolchain/pom.xml b/src/it/MJAR-62-toolchain/pom.xml index 610d560..d226cca 100644 --- a/src/it/MJAR-62-toolchain/pom.xml +++ b/src/it/MJAR-62-toolchain/pom.xml @@ -21,9 +21,9 @@ <modelVersion>4.0.0</modelVersion> <groupId>org.apache.maven.plugins</groupId> <artifactId>mjar-62</artifactId> - <name>MJAR-62</name> - <packaging>jar</packaging> <version>1.0-SNAPSHOT</version> + <packaging>jar</packaging> + <name>MJAR-62</name> <organization> <name>jar plugin it</name> </organization> @@ -42,13 +42,6 @@ <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-toolchains-plugin</artifactId> <version>3.1.0</version> - <executions> - <execution> - <goals> - <goal>toolchain</goal> - </goals> - </execution> - </executions> <configuration> <toolchains> <jdk> @@ -56,6 +49,13 @@ </jdk> </toolchains> </configuration> + <executions> + <execution> + <goals> + <goal>toolchain</goal> + </goals> + </execution> + </executions> </plugin> <plugin> diff --git a/src/it/MJAR-62-toolchain/src/main/java/myproject/HelloWorld.java b/src/it/MJAR-62-toolchain/src/main/java/myproject/HelloWorld.java index fd0ad83..b156b77 100644 --- a/src/it/MJAR-62-toolchain/src/main/java/myproject/HelloWorld.java +++ b/src/it/MJAR-62-toolchain/src/main/java/myproject/HelloWorld.java @@ -1,3 +1,21 @@ +/* + * 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. + */ package myproject; /* @@ -24,13 +42,12 @@ package myproject; */ public class HelloWorld { - /** + /** * Main method. * * @param args Not used */ - public static void main( String[] args ) - { - System.out.println( "Hi!" ); - } -} \ No newline at end of file + public static void main(String[] args) { + System.out.println("Hi!"); + } +} diff --git a/src/it/MJAR-70-no-recreation/pom.xml b/src/it/MJAR-70-no-recreation/pom.xml index 95e29ca..0a0748e 100644 --- a/src/it/MJAR-70-no-recreation/pom.xml +++ b/src/it/MJAR-70-no-recreation/pom.xml @@ -21,9 +21,9 @@ <modelVersion>4.0.0</modelVersion> <groupId>org.apache.maven.plugins</groupId> <artifactId>MJAR-70-no-recreation</artifactId> - <name>MJAR-70-no-recreation</name> - <packaging>jar</packaging> <version>1.0-SNAPSHOT</version> + <packaging>jar</packaging> + <name>MJAR-70-no-recreation</name> <build> <plugins> @@ -31,8 +31,7 @@ <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <version>@project.version@</version> - <configuration> - </configuration> + <configuration /> </plugin> <!-- Use a fixed version of maven-compiler-plugin, this fails with versions [3.8.1, 3.10.1] --> <!-- Fixed in https://issues.apache.org/jira/browse/MCOMPILER-525 (3.11.0) --> @@ -48,16 +47,14 @@ <executions> <execution> <id>touch</id> - <phase>integration-test</phase> <goals> <goal>run</goal> </goals> + <phase>integration-test</phase> <configuration> <tasks> <!-- Save the JAR and especially its timestamp for evaluation by the post-build hook script --> - <copy file="target/MJAR-70-no-recreation-1.0-SNAPSHOT.jar" - tofile="target/reference.jar" - preservelastmodified="true" overwrite="true"/> + <copy file="target/MJAR-70-no-recreation-1.0-SNAPSHOT.jar" overwrite="true" preservelastmodified="true" tofile="target/reference.jar" /> </tasks> </configuration> </execution> diff --git a/src/it/MJAR-70-no-recreation/src/main/java/myproject/HelloWorld.java b/src/it/MJAR-70-no-recreation/src/main/java/myproject/HelloWorld.java index fd0ad83..b156b77 100644 --- a/src/it/MJAR-70-no-recreation/src/main/java/myproject/HelloWorld.java +++ b/src/it/MJAR-70-no-recreation/src/main/java/myproject/HelloWorld.java @@ -1,3 +1,21 @@ +/* + * 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. + */ package myproject; /* @@ -24,13 +42,12 @@ package myproject; */ public class HelloWorld { - /** + /** * Main method. * * @param args Not used */ - public static void main( String[] args ) - { - System.out.println( "Hi!" ); - } -} \ No newline at end of file + public static void main(String[] args) { + System.out.println("Hi!"); + } +} diff --git a/src/it/MJAR-70-recreation/pom.xml b/src/it/MJAR-70-recreation/pom.xml index 3b7fd8c..e60dc00 100644 --- a/src/it/MJAR-70-recreation/pom.xml +++ b/src/it/MJAR-70-recreation/pom.xml @@ -21,9 +21,9 @@ <modelVersion>4.0.0</modelVersion> <groupId>org.apache.maven.plugins</groupId> <artifactId>MJAR-70-recreation</artifactId> - <name>MJAR-70-recreation</name> - <packaging>jar</packaging> <version>1.0-SNAPSHOT</version> + <packaging>jar</packaging> + <name>MJAR-70-recreation</name> <build> <plugins> @@ -42,18 +42,16 @@ <executions> <execution> <id>touch</id> - <phase>integration-test</phase> <goals> <goal>run</goal> </goals> + <phase>integration-test</phase> <configuration> <tasks> <!-- Save the JAR and especially its timestamp for evaluation by the post-build hook script --> - <copy file="target/MJAR-70-recreation-1.0-SNAPSHOT.jar" - tofile="target/reference.jar" - preservelastmodified="true" overwrite="true"/> + <copy file="target/MJAR-70-recreation-1.0-SNAPSHOT.jar" overwrite="true" preservelastmodified="true" tofile="target/reference.jar" /> <!-- Enforce some time difference prior to building JAR again --> - <sleep seconds="2"/> + <sleep seconds="2" /> </tasks> </configuration> </execution> diff --git a/src/it/MJAR-70-recreation/src/main/java/myproject/HelloWorld.java b/src/it/MJAR-70-recreation/src/main/java/myproject/HelloWorld.java index fd0ad83..b156b77 100644 --- a/src/it/MJAR-70-recreation/src/main/java/myproject/HelloWorld.java +++ b/src/it/MJAR-70-recreation/src/main/java/myproject/HelloWorld.java @@ -1,3 +1,21 @@ +/* + * 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. + */ package myproject; /* @@ -24,13 +42,12 @@ package myproject; */ public class HelloWorld { - /** + /** * Main method. * * @param args Not used */ - public static void main( String[] args ) - { - System.out.println( "Hi!" ); - } -} \ No newline at end of file + public static void main(String[] args) { + System.out.println("Hi!"); + } +} diff --git a/src/it/MJAR-75/client/pom.xml b/src/it/MJAR-75/client/pom.xml index ae0cb88..e5071f8 100644 --- a/src/it/MJAR-75/client/pom.xml +++ b/src/it/MJAR-75/client/pom.xml @@ -1,5 +1,4 @@ <?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 @@ -18,7 +17,6 @@ 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> @@ -37,8 +35,8 @@ under the License. <dependency> <groupId>org.apache.maven.its.it0126</groupId> <artifactId>model</artifactId> - <type>test-jar</type> <version>1.0-SNAPSHOT</version> + <type>test-jar</type> </dependency> </dependencies> </project> diff --git a/src/it/MJAR-75/client/src/main/java/org/apache/maven/its/it0126/MyClient.java b/src/it/MJAR-75/client/src/main/java/org/apache/maven/its/it0126/MyClient.java index 2aeadb2..f812640 100644 --- a/src/it/MJAR-75/client/src/main/java/org/apache/maven/its/it0126/MyClient.java +++ b/src/it/MJAR-75/client/src/main/java/org/apache/maven/its/it0126/MyClient.java @@ -1,3 +1,21 @@ +/* + * 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. + */ package org.apache.maven.its.it0126; /* @@ -19,12 +37,7 @@ package org.apache.maven.its.it0126; * under the License. */ -import org.apache.maven.its.it0126.Component; - -public class MyClient -{ +public class MyClient { - void func() - { - } + void func() {} } diff --git a/src/it/MJAR-75/model/pom.xml b/src/it/MJAR-75/model/pom.xml index bf760b9..c6d4823 100644 --- a/src/it/MJAR-75/model/pom.xml +++ b/src/it/MJAR-75/model/pom.xml @@ -1,5 +1,4 @@ <?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 @@ -18,7 +17,6 @@ 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> diff --git a/src/it/MJAR-75/model/src/test/java/org/apache/maven/its/it0126/Component.java b/src/it/MJAR-75/model/src/test/java/org/apache/maven/its/it0126/Component.java index 958dda2..4defd8e 100644 --- a/src/it/MJAR-75/model/src/test/java/org/apache/maven/its/it0126/Component.java +++ b/src/it/MJAR-75/model/src/test/java/org/apache/maven/its/it0126/Component.java @@ -1,3 +1,21 @@ +/* + * 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. + */ package org.apache.maven.its.it0126; /* @@ -19,7 +37,6 @@ package org.apache.maven.its.it0126; * under the License. */ -public interface Component -{ +public interface Component { void func(); } diff --git a/src/it/MJAR-75/pom.xml b/src/it/MJAR-75/pom.xml index 4e4dbaa..6b19e91 100644 --- a/src/it/MJAR-75/pom.xml +++ b/src/it/MJAR-75/pom.xml @@ -1,5 +1,4 @@ <?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 @@ -18,7 +17,6 @@ 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> diff --git a/src/it/MJAR-80-exclude/pom.xml b/src/it/MJAR-80-exclude/pom.xml index d6b21e1..cba553c 100644 --- a/src/it/MJAR-80-exclude/pom.xml +++ b/src/it/MJAR-80-exclude/pom.xml @@ -17,16 +17,13 @@ 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"> +<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> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin-test-mjar-80-03</artifactId> <version>99.0</version> - <name>Maven</name> <packaging>jar</packaging> + <name>Maven</name> <description>Tests excludes.</description> <dependencies> <dependency> diff --git a/src/it/MJAR-80-exclude/src/main/java/foo/project003/App.java b/src/it/MJAR-80-exclude/src/main/java/foo/project003/App.java index 3a3d166..3402dfd 100644 --- a/src/it/MJAR-80-exclude/src/main/java/foo/project003/App.java +++ b/src/it/MJAR-80-exclude/src/main/java/foo/project003/App.java @@ -1,3 +1,21 @@ +/* + * 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. + */ package foo.project003; /* @@ -23,10 +41,8 @@ package foo.project003; * Hello world! * */ -public class App -{ - public static void main( String[] args ) - { - System.out.println( "Hello World!" ); +public class App { + public static void main(String[] args) { + System.out.println("Hello World!"); } } diff --git a/src/it/MJAR-80-exclude/src/test/java/foo/project003/AppIntegrationTest.java b/src/it/MJAR-80-exclude/src/test/java/foo/project003/AppIntegrationTest.java index 7d434ec..87eb229 100644 --- a/src/it/MJAR-80-exclude/src/test/java/foo/project003/AppIntegrationTest.java +++ b/src/it/MJAR-80-exclude/src/test/java/foo/project003/AppIntegrationTest.java @@ -1,3 +1,21 @@ +/* + * 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. + */ package foo.project003; /* @@ -26,32 +44,27 @@ import junit.framework.TestSuite; /** * Unit test for simple App. */ -public class AppIntegrationTest - extends TestCase -{ +public class AppIntegrationTest extends TestCase { /** * Create the test case * * @param testName name of the test case */ - public AppIntegrationTest( String testName ) - { - super( testName ); + public AppIntegrationTest(String testName) { + super(testName); } /** * @return the suite of tests being tested */ - public static Test suite() - { - return new TestSuite( AppIntegrationTest.class ); + public static Test suite() { + return new TestSuite(AppIntegrationTest.class); } /** * Rigourous Test :-) */ - public void testApp() - { - assertTrue( true ); + public void testApp() { + assertTrue(true); } } diff --git a/src/it/MJAR-80-exclude/src/test/java/foo/project003/AppTest.java b/src/it/MJAR-80-exclude/src/test/java/foo/project003/AppTest.java index d8d8a33..43f793c 100644 --- a/src/it/MJAR-80-exclude/src/test/java/foo/project003/AppTest.java +++ b/src/it/MJAR-80-exclude/src/test/java/foo/project003/AppTest.java @@ -1,3 +1,21 @@ +/* + * 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. + */ package foo.project003; /* @@ -26,32 +44,27 @@ import junit.framework.TestSuite; /** * Unit test for simple App. */ -public class AppTest - extends TestCase -{ +public class AppTest extends TestCase { /** * Create the test case * * @param testName name of the test case */ - public AppTest( String testName ) - { - super( testName ); + public AppTest(String testName) { + super(testName); } /** * @return the suite of tests being tested */ - public static Test suite() - { - return new TestSuite( AppTest.class ); + public static Test suite() { + return new TestSuite(AppTest.class); } /** * Rigourous Test :-) */ - public void testApp() - { - assertTrue( true ); + public void testApp() { + assertTrue(true); } } diff --git a/src/it/MJAR-80-fullcontent/pom.xml b/src/it/MJAR-80-fullcontent/pom.xml index a971d64..1f38a4c 100644 --- a/src/it/MJAR-80-fullcontent/pom.xml +++ b/src/it/MJAR-80-fullcontent/pom.xml @@ -17,16 +17,13 @@ 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"> +<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> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin-test-mjar-80-01</artifactId> <version>99.0</version> - <name>Maven</name> <packaging>jar</packaging> + <name>Maven</name> <description>Tests the normal behavior of test-jar-plugin.</description> <dependencies> <dependency> diff --git a/src/it/MJAR-80-fullcontent/src/main/java/foo/project003/App.java b/src/it/MJAR-80-fullcontent/src/main/java/foo/project003/App.java index 3a3d166..3402dfd 100644 --- a/src/it/MJAR-80-fullcontent/src/main/java/foo/project003/App.java +++ b/src/it/MJAR-80-fullcontent/src/main/java/foo/project003/App.java @@ -1,3 +1,21 @@ +/* + * 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. + */ package foo.project003; /* @@ -23,10 +41,8 @@ package foo.project003; * Hello world! * */ -public class App -{ - public static void main( String[] args ) - { - System.out.println( "Hello World!" ); +public class App { + public static void main(String[] args) { + System.out.println("Hello World!"); } } diff --git a/src/it/MJAR-80-fullcontent/src/test/java/foo/project003/AppIntegrationTest.java b/src/it/MJAR-80-fullcontent/src/test/java/foo/project003/AppIntegrationTest.java index 7d434ec..87eb229 100644 --- a/src/it/MJAR-80-fullcontent/src/test/java/foo/project003/AppIntegrationTest.java +++ b/src/it/MJAR-80-fullcontent/src/test/java/foo/project003/AppIntegrationTest.java @@ -1,3 +1,21 @@ +/* + * 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. + */ package foo.project003; /* @@ -26,32 +44,27 @@ import junit.framework.TestSuite; /** * Unit test for simple App. */ -public class AppIntegrationTest - extends TestCase -{ +public class AppIntegrationTest extends TestCase { /** * Create the test case * * @param testName name of the test case */ - public AppIntegrationTest( String testName ) - { - super( testName ); + public AppIntegrationTest(String testName) { + super(testName); } /** * @return the suite of tests being tested */ - public static Test suite() - { - return new TestSuite( AppIntegrationTest.class ); + public static Test suite() { + return new TestSuite(AppIntegrationTest.class); } /** * Rigourous Test :-) */ - public void testApp() - { - assertTrue( true ); + public void testApp() { + assertTrue(true); } } diff --git a/src/it/MJAR-80-fullcontent/src/test/java/foo/project003/AppTest.java b/src/it/MJAR-80-fullcontent/src/test/java/foo/project003/AppTest.java index d8d8a33..43f793c 100644 --- a/src/it/MJAR-80-fullcontent/src/test/java/foo/project003/AppTest.java +++ b/src/it/MJAR-80-fullcontent/src/test/java/foo/project003/AppTest.java @@ -1,3 +1,21 @@ +/* + * 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. + */ package foo.project003; /* @@ -26,32 +44,27 @@ import junit.framework.TestSuite; /** * Unit test for simple App. */ -public class AppTest - extends TestCase -{ +public class AppTest extends TestCase { /** * Create the test case * * @param testName name of the test case */ - public AppTest( String testName ) - { - super( testName ); + public AppTest(String testName) { + super(testName); } /** * @return the suite of tests being tested */ - public static Test suite() - { - return new TestSuite( AppTest.class ); + public static Test suite() { + return new TestSuite(AppTest.class); } /** * Rigourous Test :-) */ - public void testApp() - { - assertTrue( true ); + public void testApp() { + assertTrue(true); } } diff --git a/src/it/MJAR-80-include/pom.xml b/src/it/MJAR-80-include/pom.xml index 869d34d..cb35fbc 100644 --- a/src/it/MJAR-80-include/pom.xml +++ b/src/it/MJAR-80-include/pom.xml @@ -17,16 +17,13 @@ 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"> +<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> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin-test-mjar-80-02</artifactId> <version>99.0</version> - <name>Maven</name> <packaging>jar</packaging> + <name>Maven</name> <description>Tests includes.</description> <dependencies> <dependency> diff --git a/src/it/MJAR-80-include/src/main/java/foo/project003/App.java b/src/it/MJAR-80-include/src/main/java/foo/project003/App.java index 3a3d166..3402dfd 100644 --- a/src/it/MJAR-80-include/src/main/java/foo/project003/App.java +++ b/src/it/MJAR-80-include/src/main/java/foo/project003/App.java @@ -1,3 +1,21 @@ +/* + * 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. + */ package foo.project003; /* @@ -23,10 +41,8 @@ package foo.project003; * Hello world! * */ -public class App -{ - public static void main( String[] args ) - { - System.out.println( "Hello World!" ); +public class App { + public static void main(String[] args) { + System.out.println("Hello World!"); } } diff --git a/src/it/MJAR-80-include/src/test/java/foo/project003/AppIntegrationTest.java b/src/it/MJAR-80-include/src/test/java/foo/project003/AppIntegrationTest.java index 226669d..b0ee598 100644 --- a/src/it/MJAR-80-include/src/test/java/foo/project003/AppIntegrationTest.java +++ b/src/it/MJAR-80-include/src/test/java/foo/project003/AppIntegrationTest.java @@ -1,3 +1,21 @@ +/* + * 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. + */ package foo.project003; /* @@ -26,22 +44,18 @@ import junit.framework.TestSuite; /** * Unit test for simple App. */ -public class AppIntegrationTest - extends TestCase -{ +public class AppIntegrationTest extends TestCase { /** * @return the suite of tests being tested */ - public static Test suite() - { - return new TestSuite( AppIntegrationTest.class ); + public static Test suite() { + return new TestSuite(AppIntegrationTest.class); } /** * Rigourous Test :-) */ - public void testApp() - { - assertTrue( true ); + public void testApp() { + assertTrue(true); } } diff --git a/src/it/MJAR-80-include/src/test/java/foo/project003/AppTest.java b/src/it/MJAR-80-include/src/test/java/foo/project003/AppTest.java index d8d8a33..43f793c 100644 --- a/src/it/MJAR-80-include/src/test/java/foo/project003/AppTest.java +++ b/src/it/MJAR-80-include/src/test/java/foo/project003/AppTest.java @@ -1,3 +1,21 @@ +/* + * 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. + */ package foo.project003; /* @@ -26,32 +44,27 @@ import junit.framework.TestSuite; /** * Unit test for simple App. */ -public class AppTest - extends TestCase -{ +public class AppTest extends TestCase { /** * Create the test case * * @param testName name of the test case */ - public AppTest( String testName ) - { - super( testName ); + public AppTest(String testName) { + super(testName); } /** * @return the suite of tests being tested */ - public static Test suite() - { - return new TestSuite( AppTest.class ); + public static Test suite() { + return new TestSuite(AppTest.class); } /** * Rigourous Test :-) */ - public void testApp() - { - assertTrue( true ); + public void testApp() { + assertTrue(true); } } diff --git a/src/it/MJAR-82/pom.xml b/src/it/MJAR-82/pom.xml index 00320d8..5cee372 100644 --- a/src/it/MJAR-82/pom.xml +++ b/src/it/MJAR-82/pom.xml @@ -21,9 +21,31 @@ <modelVersion>4.0.0</modelVersion> <groupId>org.apache.maven.plugins</groupId> <artifactId>MJAR-82</artifactId> - <name>MJAR-82</name> - <packaging>jar</packaging> <version>1.0-SNAPSHOT</version> + <packaging>jar</packaging> + <name>MJAR-82</name> + <dependencies> + <dependency> + <groupId>commons-lang</groupId> + <artifactId>commons-lang</artifactId> + <version>2.3</version> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + <version>1.4.3</version> + </dependency> + <dependency> + <groupId>org.codehaus.plexus</groupId> + <artifactId>plexus-component-api</artifactId> + <version>1.0-alpha-15</version> + </dependency> + <dependency> + <groupId>org.codehaus.plexus</groupId> + <artifactId>plexus-container-default</artifactId> + <version>1.0-alpha-15</version> + </dependency> + </dependencies> <build> <plugins> @@ -48,26 +70,4 @@ </plugin> </plugins> </build> - <dependencies> - <dependency> - <groupId>commons-lang</groupId> - <artifactId>commons-lang</artifactId> - <version>2.3</version> - </dependency> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> - <version>1.4.3</version> - </dependency> - <dependency> - <groupId>org.codehaus.plexus</groupId> - <artifactId>plexus-component-api</artifactId> - <version>1.0-alpha-15</version> - </dependency> - <dependency> - <groupId>org.codehaus.plexus</groupId> - <artifactId>plexus-container-default</artifactId> - <version>1.0-alpha-15</version> - </dependency> - </dependencies> </project> diff --git a/src/it/MJAR-82/src/main/java/myproject/HelloWorld.java b/src/it/MJAR-82/src/main/java/myproject/HelloWorld.java index 1576355..bef1aa0 100644 --- a/src/it/MJAR-82/src/main/java/myproject/HelloWorld.java +++ b/src/it/MJAR-82/src/main/java/myproject/HelloWorld.java @@ -1,3 +1,21 @@ +/* + * 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. + */ package myproject; import org.apache.commons.lang.*; @@ -29,21 +47,19 @@ import org.codehaus.plexus.logging.console.*; */ public class HelloWorld { - /** + /** * Main method. * * @param args Not used */ - public static void main( String[] args ) - { + public static void main(String[] args) { String empty = null; Context context = new DefaultContext(); - ConsoleLogger consoleLogger = new ConsoleLogger( Logger.LEVEL_INFO, "console" ); - consoleLogger.info( "great it works" ); - if (StringUtils.isEmpty( empty )) - { - System.exit( 0 ); + ConsoleLogger consoleLogger = new ConsoleLogger(Logger.LEVEL_INFO, "console"); + consoleLogger.info("great it works"); + if (StringUtils.isEmpty(empty)) { + System.exit(0); } - System.exit( 1 ); - } -} \ No newline at end of file + System.exit(1); + } +} diff --git a/src/it/manifest-content/pom.xml b/src/it/manifest-content/pom.xml index fe8e270..40ca35d 100644 --- a/src/it/manifest-content/pom.xml +++ b/src/it/manifest-content/pom.xml @@ -21,9 +21,9 @@ <modelVersion>4.0.0</modelVersion> <groupId>org.apache.maven.plugins</groupId> <artifactId>manifest-content</artifactId> - <name>manifest-content-it</name> - <packaging>jar</packaging> <version>1.0-SNAPSHOT</version> + <packaging>jar</packaging> + <name>manifest-content-it</name> <organization> <name>jar plugin it</name> </organization> diff --git a/src/it/manifest-content/src/main/java/myproject/HelloWorld.java b/src/it/manifest-content/src/main/java/myproject/HelloWorld.java index fd0ad83..b156b77 100644 --- a/src/it/manifest-content/src/main/java/myproject/HelloWorld.java +++ b/src/it/manifest-content/src/main/java/myproject/HelloWorld.java @@ -1,3 +1,21 @@ +/* + * 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. + */ package myproject; /* @@ -24,13 +42,12 @@ package myproject; */ public class HelloWorld { - /** + /** * Main method. * * @param args Not used */ - public static void main( String[] args ) - { - System.out.println( "Hi!" ); - } -} \ No newline at end of file + public static void main(String[] args) { + System.out.println("Hi!"); + } +} diff --git a/src/it/mjar-139/pom.xml b/src/it/mjar-139/pom.xml index 77d57fb..89f1279 100644 --- a/src/it/mjar-139/pom.xml +++ b/src/it/mjar-139/pom.xml @@ -17,16 +17,13 @@ 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"> +<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> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin-test-mjar-139</artifactId> <version>1.0</version> - <name>Maven</name> <packaging>jar</packaging> + <name>Maven</name> <description>Avoid creating jars</description> <dependencies> <dependency> @@ -44,12 +41,12 @@ <version>@project.version@</version> <executions> <execution> - <configuration> - <skipIfEmpty>true</skipIfEmpty> - </configuration> <goals> <goal>test-jar</goal> </goals> + <configuration> + <skipIfEmpty>true</skipIfEmpty> + </configuration> </execution> </executions> </plugin> diff --git a/src/it/mjar-139/src/main/java/Foo.java b/src/it/mjar-139/src/main/java/Foo.java index f939fa6..936ec41 100644 --- a/src/it/mjar-139/src/main/java/Foo.java +++ b/src/it/mjar-139/src/main/java/Foo.java @@ -1,4 +1,3 @@ - /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -8,7 +7,7 @@ * "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 + * 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 @@ -17,15 +16,8 @@ * specific language governing permissions and limitations * under the License. */ - -/** - * Hello world! - * - */ -public class Foo -{ - public static void main( String[] args ) - { - System.out.println( "Hello World!" ); +public class Foo { + public static void main(String[] args) { + System.out.println("Hello World!"); } } diff --git a/src/it/mjar-71-01/pom.xml b/src/it/mjar-71-01/pom.xml index 5cd0687..cb6b319 100644 --- a/src/it/mjar-71-01/pom.xml +++ b/src/it/mjar-71-01/pom.xml @@ -1,3 +1,4 @@ +<?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 @@ -16,18 +17,16 @@ 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"> +<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> - + <groupId>org.apache.maven.plugins.jar.it</groupId> <artifactId>mjar-71</artifactId> - <packaging>jar</packaging> <version>1.0</version> + <packaging>jar</packaging> <name>it-mjar-71</name> - <url>http://maven.apache.org</url> <description>Test that the default manifest is added by default if found under target/classes. Can also be overriden.</description> + <url>http://maven.apache.org</url> <build> <plugins> diff --git a/src/it/mjar-71-01/src/main/java/foo/project003/App.java b/src/it/mjar-71-01/src/main/java/foo/project003/App.java index 3a3d166..3402dfd 100644 --- a/src/it/mjar-71-01/src/main/java/foo/project003/App.java +++ b/src/it/mjar-71-01/src/main/java/foo/project003/App.java @@ -1,3 +1,21 @@ +/* + * 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. + */ package foo.project003; /* @@ -23,10 +41,8 @@ package foo.project003; * Hello world! * */ -public class App -{ - public static void main( String[] args ) - { - System.out.println( "Hello World!" ); +public class App { + public static void main(String[] args) { + System.out.println("Hello World!"); } } diff --git a/src/it/mjar-71-02/pom.xml b/src/it/mjar-71-02/pom.xml index edccd5c..fa3adac 100644 --- a/src/it/mjar-71-02/pom.xml +++ b/src/it/mjar-71-02/pom.xml @@ -1,3 +1,4 @@ +<?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 @@ -16,18 +17,16 @@ 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"> +<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> - + <groupId>org.apache.maven.plugins.jar.it</groupId> <artifactId>mjar-71-02</artifactId> - <packaging>jar</packaging> <version>1.0</version> + <packaging>jar</packaging> <name>it-mjar-71-02</name> - <url>http://maven.apache.org</url> <description>Test that the default manifest is not added when found under target/classes but support is disabled.</description> + <url>http://maven.apache.org</url> <build> <plugins> diff --git a/src/it/mjar-71-02/src/main/java/foo/project003/App.java b/src/it/mjar-71-02/src/main/java/foo/project003/App.java index 3a3d166..3402dfd 100644 --- a/src/it/mjar-71-02/src/main/java/foo/project003/App.java +++ b/src/it/mjar-71-02/src/main/java/foo/project003/App.java @@ -1,3 +1,21 @@ +/* + * 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. + */ package foo.project003; /* @@ -23,10 +41,8 @@ package foo.project003; * Hello world! * */ -public class App -{ - public static void main( String[] args ) - { - System.out.println( "Hello World!" ); +public class App { + public static void main(String[] args) { + System.out.println("Hello World!"); } } diff --git a/src/it/mjar-90/pom.xml b/src/it/mjar-90/pom.xml index eec5c6d..b6338b9 100644 --- a/src/it/mjar-90/pom.xml +++ b/src/it/mjar-90/pom.xml @@ -17,16 +17,13 @@ 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"> +<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> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin-test-mjar-90</artifactId> <version>99.0</version> - <name>Maven</name> <packaging>jar</packaging> + <name>Maven</name> <description>Test skip.</description> <dependencies> <dependency> diff --git a/src/it/mjar-90/src/main/java/Foo.java b/src/it/mjar-90/src/main/java/Foo.java index f939fa6..936ec41 100644 --- a/src/it/mjar-90/src/main/java/Foo.java +++ b/src/it/mjar-90/src/main/java/Foo.java @@ -1,4 +1,3 @@ - /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -8,7 +7,7 @@ * "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 + * 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 @@ -17,15 +16,8 @@ * specific language governing permissions and limitations * under the License. */ - -/** - * Hello world! - * - */ -public class Foo -{ - public static void main( String[] args ) - { - System.out.println( "Hello World!" ); +public class Foo { + public static void main(String[] args) { + System.out.println("Hello World!"); } } diff --git a/src/it/mjar-90/src/test/java/FooTest.java b/src/it/mjar-90/src/test/java/FooTest.java index af6cda9..b9d8583 100644 --- a/src/it/mjar-90/src/test/java/FooTest.java +++ b/src/it/mjar-90/src/test/java/FooTest.java @@ -1,4 +1,3 @@ - /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -8,7 +7,7 @@ * "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 + * 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 @@ -17,19 +16,13 @@ * specific language governing permissions and limitations * under the License. */ - -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; /** * Unit test */ -public class FooTest - extends TestCase -{ - public void testFoo() - { - assertTrue( true ); +public class FooTest extends TestCase { + public void testFoo() { + assertTrue(true); } } diff --git a/src/it/project-004/pom.xml b/src/it/project-004/pom.xml index a3dee6e..f5269e2 100644 --- a/src/it/project-004/pom.xml +++ b/src/it/project-004/pom.xml @@ -17,18 +17,15 @@ 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"> +<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> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin-test-project-004</artifactId> <version>99.0</version> - <name>Maven</name> <packaging>jar</packaging> - <url>http://maven.apache.org</url> + <name>Maven</name> <description>testMultipleJars</description> + <url>http://maven.apache.org</url> <build> <plugins> <plugin> @@ -37,10 +34,10 @@ <version>@project.version@</version> <executions> <execution> - <phase>package</phase> <goals> <goal>jar</goal> </goals> + <phase>package</phase> <configuration> <classifier>service</classifier> <includes> diff --git a/src/it/project-004/src/main/java/TestCompile1.java b/src/it/project-004/src/main/java/TestCompile1.java index 9a98f12..204bdeb 100644 --- a/src/it/project-004/src/main/java/TestCompile1.java +++ b/src/it/project-004/src/main/java/TestCompile1.java @@ -7,7 +7,7 @@ * "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 + * 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 @@ -16,14 +16,10 @@ * specific language governing permissions and limitations * under the License. */ +public class TestCompile1 { -public class TestCompile1 -{ - - public TestCompile1() - { + public TestCompile1() { System.out.println("Woo Hoo!"); } - -} \ No newline at end of file +} diff --git a/src/it/project-004/src/main/java/service/TestInterface.java b/src/it/project-004/src/main/java/service/TestInterface.java index f49c54f..1e96dda 100644 --- a/src/it/project-004/src/main/java/service/TestInterface.java +++ b/src/it/project-004/src/main/java/service/TestInterface.java @@ -1,3 +1,21 @@ +/* + * 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. + */ package service; /* * Licensed to the Apache Software Foundation (ASF) under one @@ -18,6 +36,4 @@ package service; * under the License. */ -public interface TestInterface { - -} +public interface TestInterface {} diff --git a/src/it/project-004/src/main/java/service/impl/TestImplementation.java b/src/it/project-004/src/main/java/service/impl/TestImplementation.java index a81430d..451a3f3 100644 --- a/src/it/project-004/src/main/java/service/impl/TestImplementation.java +++ b/src/it/project-004/src/main/java/service/impl/TestImplementation.java @@ -1,3 +1,21 @@ +/* + * 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. + */ package service.impl; /* * Licensed to the Apache Software Foundation (ASF) under one @@ -18,6 +36,4 @@ package service.impl; * under the License. */ -public class TestImplementation { - -} +public class TestImplementation {} diff --git a/src/test/resources/unit/jar-basic-test/pom.xml b/src/test/resources/unit/jar-basic-test/pom.xml index 0f58dcf..5f5daa7 100644 --- a/src/test/resources/unit/jar-basic-test/pom.xml +++ b/src/test/resources/unit/jar-basic-test/pom.xml @@ -1,3 +1,4 @@ +<?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 @@ -16,17 +17,16 @@ KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> - <project> <build> <plugins> <plugin> <artifactId>maven-jar-plugin</artifactId> <configuration> - <project implementation="org.apache.maven.plugin.testing.stubs.MavenProjectStub"> - <groupId implementation="java.lang.String">foo</groupId> - <artifactId implementation="java.lang.String">bar</artifactId> - </project> + <project implementation="org.apache.maven.plugin.testing.stubs.MavenProjectStub"> + <groupId implementation="java.lang.String">foo</groupId> + <artifactId implementation="java.lang.String">bar</artifactId> + </project> </configuration> </plugin> </plugins> diff --git a/src/test/resources/unit/jar-basic-test/src/main/java/TestCompile1.java b/src/test/resources/unit/jar-basic-test/src/main/java/TestCompile1.java index c7e7e5f..204bdeb 100644 --- a/src/test/resources/unit/jar-basic-test/src/main/java/TestCompile1.java +++ b/src/test/resources/unit/jar-basic-test/src/main/java/TestCompile1.java @@ -16,14 +16,10 @@ * specific language governing permissions and limitations * under the License. */ +public class TestCompile1 { -public class TestCompile1 -{ - - public TestCompile1() - { + public TestCompile1() { System.out.println("Woo Hoo!"); } - -} \ No newline at end of file +}
