This is an automated email from the ASF dual-hosted git repository. slachiewicz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/maven-source-plugin.git
commit 2c9d21d2324543f7a4893c4986bd73d198104761 Author: Sylwester Lachiewicz <[email protected]> AuthorDate: Thu Nov 26 05:54:40 2026 +0000 Add unit tests for source goal options and plugin descriptor defaults --- .../maven/plugins/source/PluginDescriptorTest.java | 141 +++++++++++++++++ .../plugins/source/SourceJarMojoOptionsTest.java | 172 +++++++++++++++++++++ src/test/resources/unit/project-011/pom.xml | 41 +++++ .../unit/project-011/src/main/java/MyClass.java | 23 +++ .../unit/project-011/src/main/java/MyClass2.java | 23 +++ .../project-011/src/main/resources/main.properties | 17 ++ .../unit/project-011/src/test/java/MyTest.java | 23 +++ .../unit/project-011/src/test/java/MyTest2.java | 23 +++ .../project-011/src/test/resources/test.properties | 17 ++ src/test/resources/unit/project-012/pom.xml | 41 +++++ .../unit/project-012/src/main/java/MyClass.java | 23 +++ .../unit/project-012/src/main/java/MyClass2.java | 23 +++ .../project-012/src/main/resources/main.properties | 17 ++ .../unit/project-012/src/test/java/MyTest.java | 23 +++ .../unit/project-012/src/test/java/MyTest2.java | 23 +++ .../project-012/src/test/resources/test.properties | 17 ++ 16 files changed, 647 insertions(+) diff --git a/src/test/java/org/apache/maven/plugins/source/PluginDescriptorTest.java b/src/test/java/org/apache/maven/plugins/source/PluginDescriptorTest.java new file mode 100644 index 0000000..95a173b --- /dev/null +++ b/src/test/java/org/apache/maven/plugins/source/PluginDescriptorTest.java @@ -0,0 +1,141 @@ +/* + * 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.plugins.source; + +import javax.xml.parsers.DocumentBuilderFactory; + +import java.io.InputStream; +import java.util.LinkedHashMap; +import java.util.Map; + +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +/** + * Checks the parameters and defaults the generated plugin descriptor declares for every source goal. The + * {@code help} goal prints exactly these names and defaults, and hides the parameters that are not editable. + */ +class PluginDescriptorTest { + + private static final Map<String, String> GOAL_CLASSIFIERS = new LinkedHashMap<>(); + + static { + GOAL_CLASSIFIERS.put("jar", "sources"); + GOAL_CLASSIFIERS.put("jar-no-fork", "sources"); + GOAL_CLASSIFIERS.put("test-jar", "test-sources"); + GOAL_CLASSIFIERS.put("test-jar-no-fork", "test-sources"); + GOAL_CLASSIFIERS.put("generated-test-jar", "test-sources"); + } + + private static Document descriptor; + + @BeforeAll + static void loadDescriptor() throws Exception { + try (InputStream in = PluginDescriptorTest.class.getResourceAsStream("/META-INF/maven/plugin.xml")) { + assertNotNull(in, "plugin.xml is generated before the tests run"); + descriptor = + DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(in); + } + } + + @Test + void testUserParametersAndDefaults() { + GOAL_CLASSIFIERS.forEach((goal, classifier) -> { + Element mojo = mojo(goal); + + assertEquals("${project.build.finalName}", defaultValue(mojo, "finalName"), goal); + assertEquals("${project.build.directory}", defaultValue(mojo, "outputDirectory"), goal); + assertEquals(classifier, defaultValue(mojo, "classifier"), goal); + assertEquals("true", defaultValue(mojo, "attach"), goal); + assertEquals("false", defaultValue(mojo, "excludeResources"), goal); + assertEquals("false", defaultValue(mojo, "forceCreation"), goal); + assertEquals("false", defaultValue(mojo, "includePom"), goal); + assertEquals("false", defaultValue(mojo, "skipSource"), goal); + assertEquals("true", defaultValue(mojo, "useDefaultExcludes"), goal); + assertEquals("false", defaultValue(mojo, "useDefaultManifestFile"), goal); + assertEquals( + "${project.build.outputDirectory}/META-INF/MANIFEST.MF", + defaultValue(mojo, "defaultManifestFile"), + goal); + + for (String name : new String[] {"archive", "excludes", "includes"}) { + assertEquals("true", parameterField(mojo, name, "editable"), goal + " " + name); + } + }); + } + + @Test + void testInternalParametersAreNotConfigurable() { + for (String goal : GOAL_CLASSIFIERS.keySet()) { + Element mojo = mojo(goal); + for (String name : new String[] {"session", "reactorProjects", "project"}) { + assertEquals("false", parameterField(mojo, name, "editable"), goal + " " + name); + } + } + } + + private static Element mojo(String goal) { + NodeList mojos = descriptor.getElementsByTagName("mojo"); + for (int i = 0; i < mojos.getLength(); i++) { + Element mojo = (Element) mojos.item(i); + if (goal.equals(text(child(mojo, "goal")))) { + return mojo; + } + } + throw new AssertionError("No goal " + goal); + } + + private static String defaultValue(Element mojo, String name) { + Element field = child(child(mojo, "configuration"), name); + assertTrue(field.hasAttribute("default-value"), "No default for " + name); + return field.getAttribute("default-value"); + } + + private static String parameterField(Element mojo, String name, String field) { + NodeList parameters = child(mojo, "parameters").getElementsByTagName("parameter"); + for (int i = 0; i < parameters.getLength(); i++) { + Element parameter = (Element) parameters.item(i); + if (name.equals(text(child(parameter, "name")))) { + return text(child(parameter, field)); + } + } + throw new AssertionError("No parameter " + name); + } + + private static Element child(Element parent, String name) { + for (Node n = parent.getFirstChild(); n != null; n = n.getNextSibling()) { + if (n instanceof Element && name.equals(n.getNodeName())) { + return (Element) n; + } + } + throw new AssertionError("No element " + name + " in " + parent.getNodeName()); + } + + private static String text(Element e) { + return e.getTextContent().trim(); + } +} diff --git a/src/test/java/org/apache/maven/plugins/source/SourceJarMojoOptionsTest.java b/src/test/java/org/apache/maven/plugins/source/SourceJarMojoOptionsTest.java new file mode 100644 index 0000000..6fa8b7e --- /dev/null +++ b/src/test/java/org/apache/maven/plugins/source/SourceJarMojoOptionsTest.java @@ -0,0 +1,172 @@ +/* + * 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.plugins.source; + +import javax.inject.Inject; + +import java.io.File; +import java.nio.file.Files; + +import org.apache.maven.api.di.Provides; +import org.apache.maven.api.plugin.testing.Basedir; +import org.apache.maven.api.plugin.testing.InjectMojo; +import org.apache.maven.api.plugin.testing.MojoParameter; +import org.apache.maven.api.plugin.testing.MojoTest; +import org.apache.maven.plugins.source.stubs.ProjectStub; +import org.apache.maven.project.MavenProject; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; + +/** + * Per-option checks of the jar and test-jar goals: which entries end up in the archive, which file name + * the classifier gives it, and when no archive is created. + */ +@MojoTest +class SourceJarMojoOptionsTest extends AbstractSourcePluginTest { + + @TempDir + private File tempDir; + + @Inject + private MavenProject project; + + @Provides + @SuppressWarnings("unused") + private MavenProject projectProvides() { + return new ProjectStub(tempDir); + } + + @Test + @InjectMojo(goal = "jar") + @Basedir("/unit/project-011") + void testJarIncludes(SourceJarMojo mojo) throws Exception { + mojo.execute(); + + File target = new File(tempDir, "target"); + assertSourceArchive(target); + assertJarContent(getSourceArchive(target), addMavenDescriptor("MyClass2.java")); + } + + @Test + @InjectMojo(goal = "test-jar") + @Basedir("/unit/project-012") + void testTestJarExcludes(TestSourceJarMojo mojo) throws Exception { + mojo.execute(); + + File target = new File(tempDir, "target"); + assertTestSourceArchive(target); + assertJarContent(getTestSourceArchive(target), addMavenDescriptor("MyTest.java", "test.properties")); + } + + @Test + @InjectMojo(goal = "jar") + @Basedir("/unit/project-001") + @MojoParameter(name = "classifier", value = "foo") + void testJarClassifier(SourceJarMojo mojo) throws Exception { + mojo.execute(); + + File archive = new File(tempDir, "target/maven-source-plugin-test-99.0-foo.jar"); + assertTrue(archive.isFile(), "Archive with the configured classifier is missing: " + archive); + assertFalse(getSourceArchive(new File(tempDir, "target")).exists()); + assertEquals(1, project.getAttachedArtifacts().size()); + assertEquals("foo", project.getAttachedArtifacts().get(0).getClassifier()); + } + + @Test + @InjectMojo(goal = "test-jar") + @Basedir("/unit/project-001") + @MojoParameter(name = "classifier", value = "bar") + void testTestJarClassifier(TestSourceJarMojo mojo) throws Exception { + mojo.execute(); + + File archive = new File(tempDir, "target/maven-source-plugin-test-99.0-bar.jar"); + assertTrue(archive.isFile(), "Archive with the configured classifier is missing: " + archive); + assertFalse(getTestSourceArchive(new File(tempDir, "target")).exists()); + assertEquals(1, project.getAttachedArtifacts().size()); + assertEquals("bar", project.getAttachedArtifacts().get(0).getClassifier()); + } + + @Test + @InjectMojo(goal = "jar") + @Basedir("/unit/project-001") + void testJarIncludesGeneratedSources(SourceJarMojo mojo) throws Exception { + File generated = new File(tempDir, "generated"); + Files.createDirectories(generated.toPath()); + Files.createFile(new File(generated, "generated.properties").toPath()); + project.addCompileSourceRoot(generated.getAbsolutePath()); + + mojo.execute(); + + File target = new File(tempDir, "target"); + assertJarContent( + getSourceArchive(target), + addMavenDescriptor( + "default-configuration.properties", + "generated.properties", + "foo/project001/App.java", + "foo/project001/", + "foo/")); + } + + @Test + @InjectMojo(goal = "test-jar") + @Basedir("/unit/project-001") + void testTestJarIncludesGeneratedSources(TestSourceJarMojo mojo) throws Exception { + File generated = new File(tempDir, "generated"); + Files.createDirectories(generated.toPath()); + Files.createFile(new File(generated, "generated.properties").toPath()); + project.addTestCompileSourceRoot(generated.getAbsolutePath()); + + mojo.execute(); + + File target = new File(tempDir, "target"); + assertJarContent( + getTestSourceArchive(target), + addMavenDescriptor( + "test-default-configuration.properties", + "generated.properties", + "foo/project001/AppTest.java", + "foo/project001/", + "foo/")); + } + + @Test + @InjectMojo(goal = "jar") + @Basedir("/unit/project-005") + void testJarWithoutSourcesCreatesNothing(SourceJarMojo mojo) throws Exception { + mojo.execute(); + + assertFalse(getSourceArchive(new File(tempDir, "target")).exists()); + assertTrue(project.getAttachedArtifacts().isEmpty()); + } + + @Test + @InjectMojo(goal = "test-jar") + @Basedir("/unit/project-005") + void testTestJarWithoutSourcesCreatesNothing(TestSourceJarMojo mojo) throws Exception { + mojo.execute(); + + assertFalse(getTestSourceArchive(new File(tempDir, "target")).exists()); + assertTrue(project.getAttachedArtifacts().isEmpty()); + } +} diff --git a/src/test/resources/unit/project-011/pom.xml b/src/test/resources/unit/project-011/pom.xml new file mode 100644 index 0000000..d954a4e --- /dev/null +++ b/src/test/resources/unit/project-011/pom.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <groupId>source</groupId> + <artifactId>maven-source-plugin-test-project-011</artifactId> + <version>99.0</version> + <name>Maven</name> + <packaging>jar</packaging> + <url>http://maven.apache.org</url> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-source-plugin</artifactId> + <configuration> + <includes><include>MyClass2.java</include></includes> + </configuration> + </plugin> + </plugins> + </build> +</project> diff --git a/src/test/resources/unit/project-011/src/main/java/MyClass.java b/src/test/resources/unit/project-011/src/main/java/MyClass.java new file mode 100644 index 0000000..4945381 --- /dev/null +++ b/src/test/resources/unit/project-011/src/main/java/MyClass.java @@ -0,0 +1,23 @@ +/* + * 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 MyClass +{ + +} diff --git a/src/test/resources/unit/project-011/src/main/java/MyClass2.java b/src/test/resources/unit/project-011/src/main/java/MyClass2.java new file mode 100644 index 0000000..9c66faa --- /dev/null +++ b/src/test/resources/unit/project-011/src/main/java/MyClass2.java @@ -0,0 +1,23 @@ +/* + * 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 MyClass2 +{ + +} diff --git a/src/test/resources/unit/project-011/src/main/resources/main.properties b/src/test/resources/unit/project-011/src/main/resources/main.properties new file mode 100644 index 0000000..00ae6c0 --- /dev/null +++ b/src/test/resources/unit/project-011/src/main/resources/main.properties @@ -0,0 +1,17 @@ +# 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. + diff --git a/src/test/resources/unit/project-011/src/test/java/MyTest.java b/src/test/resources/unit/project-011/src/test/java/MyTest.java new file mode 100644 index 0000000..9d124be --- /dev/null +++ b/src/test/resources/unit/project-011/src/test/java/MyTest.java @@ -0,0 +1,23 @@ +/* + * 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 MyTest +{ + +} diff --git a/src/test/resources/unit/project-011/src/test/java/MyTest2.java b/src/test/resources/unit/project-011/src/test/java/MyTest2.java new file mode 100644 index 0000000..6a8440e --- /dev/null +++ b/src/test/resources/unit/project-011/src/test/java/MyTest2.java @@ -0,0 +1,23 @@ +/* + * 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 MyTest2 +{ + +} diff --git a/src/test/resources/unit/project-011/src/test/resources/test.properties b/src/test/resources/unit/project-011/src/test/resources/test.properties new file mode 100644 index 0000000..00ae6c0 --- /dev/null +++ b/src/test/resources/unit/project-011/src/test/resources/test.properties @@ -0,0 +1,17 @@ +# 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. + diff --git a/src/test/resources/unit/project-012/pom.xml b/src/test/resources/unit/project-012/pom.xml new file mode 100644 index 0000000..36a0345 --- /dev/null +++ b/src/test/resources/unit/project-012/pom.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <groupId>source</groupId> + <artifactId>maven-source-plugin-test-project-012</artifactId> + <version>99.0</version> + <name>Maven</name> + <packaging>jar</packaging> + <url>http://maven.apache.org</url> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-source-plugin</artifactId> + <configuration> + <excludes><exclude>MyTest2.java</exclude></excludes> + </configuration> + </plugin> + </plugins> + </build> +</project> diff --git a/src/test/resources/unit/project-012/src/main/java/MyClass.java b/src/test/resources/unit/project-012/src/main/java/MyClass.java new file mode 100644 index 0000000..4945381 --- /dev/null +++ b/src/test/resources/unit/project-012/src/main/java/MyClass.java @@ -0,0 +1,23 @@ +/* + * 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 MyClass +{ + +} diff --git a/src/test/resources/unit/project-012/src/main/java/MyClass2.java b/src/test/resources/unit/project-012/src/main/java/MyClass2.java new file mode 100644 index 0000000..9c66faa --- /dev/null +++ b/src/test/resources/unit/project-012/src/main/java/MyClass2.java @@ -0,0 +1,23 @@ +/* + * 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 MyClass2 +{ + +} diff --git a/src/test/resources/unit/project-012/src/main/resources/main.properties b/src/test/resources/unit/project-012/src/main/resources/main.properties new file mode 100644 index 0000000..00ae6c0 --- /dev/null +++ b/src/test/resources/unit/project-012/src/main/resources/main.properties @@ -0,0 +1,17 @@ +# 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. + diff --git a/src/test/resources/unit/project-012/src/test/java/MyTest.java b/src/test/resources/unit/project-012/src/test/java/MyTest.java new file mode 100644 index 0000000..9d124be --- /dev/null +++ b/src/test/resources/unit/project-012/src/test/java/MyTest.java @@ -0,0 +1,23 @@ +/* + * 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 MyTest +{ + +} diff --git a/src/test/resources/unit/project-012/src/test/java/MyTest2.java b/src/test/resources/unit/project-012/src/test/java/MyTest2.java new file mode 100644 index 0000000..6a8440e --- /dev/null +++ b/src/test/resources/unit/project-012/src/test/java/MyTest2.java @@ -0,0 +1,23 @@ +/* + * 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 MyTest2 +{ + +} diff --git a/src/test/resources/unit/project-012/src/test/resources/test.properties b/src/test/resources/unit/project-012/src/test/resources/test.properties new file mode 100644 index 0000000..00ae6c0 --- /dev/null +++ b/src/test/resources/unit/project-012/src/test/resources/test.properties @@ -0,0 +1,17 @@ +# 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. +
