You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by kh...@apache.org on 2019/05/19 14:28:25 UTC

[maven-source-plugin] branch MSOURCES-121 created (now 5302c80)

This is an automated email from the ASF dual-hosted git repository.

khmarbaise pushed a change to branch MSOURCES-121
in repository https://gitbox.apache.org/repos/asf/maven-source-plugin.git.


      at 5302c80  [MSOURCES-121] - Check for duplicated addition of the same file  - Added IT to check for failing in case of executing twice.

This branch includes the following new commits:

     new 5302c80  [MSOURCES-121] - Check for duplicated addition of the same file  - Added IT to check for failing in case of executing twice.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[maven-source-plugin] 01/01: [MSOURCES-121] - Check for duplicated addition of the same file - Added IT to check for failing in case of executing twice.

Posted by kh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

khmarbaise pushed a commit to branch MSOURCES-121
in repository https://gitbox.apache.org/repos/asf/maven-source-plugin.git

commit 5302c808694f2b7534f39f73b96057cbd0e0336b
Author: Karl Heinz Marbaise <kh...@apache.org>
AuthorDate: Sun May 19 16:27:49 2019 +0200

    [MSOURCES-121] - Check for duplicated addition of the same file
     - Added IT to check for failing in case of executing twice.
---
 src/it/MSOURCE-121/invoker.properties              | 17 ++++++
 src/it/MSOURCE-121/pom.xml                         | 65 ++++++++++++++++++++++
 src/it/MSOURCE-121/src/main/java/MyClass.java      | 23 ++++++++
 .../MSOURCE-121/src/main/resources/main.properties | 17 ++++++
 src/it/MSOURCE-121/src/test/java/MyTest.java       | 23 ++++++++
 .../MSOURCE-121/src/test/resources/test.properties | 17 ++++++
 6 files changed, 162 insertions(+)

diff --git a/src/it/MSOURCE-121/invoker.properties b/src/it/MSOURCE-121/invoker.properties
new file mode 100644
index 0000000..2668a60
--- /dev/null
+++ b/src/it/MSOURCE-121/invoker.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.
+invoker.buildResult = failure
diff --git a/src/it/MSOURCE-121/pom.xml b/src/it/MSOURCE-121/pom.xml
new file mode 100644
index 0000000..f1274f9
--- /dev/null
+++ b/src/it/MSOURCE-121/pom.xml
@@ -0,0 +1,65 @@
+<?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>org.apache.maven.its.sources</groupId>
+  <artifactId>jar-no-fork</artifactId>
+  <version>1.0-SNAPSHOT</version>
+
+  <name>Test for multiple attachments of files</name>
+	<description>This build should fail based on the duplicate
+   execution with  the same configuration. This will errornously
+   add the classifier/file twice times.
+   MSOURCES-121.
+  </description>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-source-plugin</artifactId>
+        <version>@project.version@</version>
+        <executions>
+          <execution>
+            <id>attach-sources-1</id>
+            <goals>
+              <goal>jar-no-fork</goal>
+            </goals>
+          </execution>
+          <execution>
+            <id>attach-sources-2</id>
+            <goals>
+              <goal>jar-no-fork</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>
diff --git a/src/it/MSOURCE-121/src/main/java/MyClass.java b/src/it/MSOURCE-121/src/main/java/MyClass.java
new file mode 100644
index 0000000..4945381
--- /dev/null
+++ b/src/it/MSOURCE-121/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/it/MSOURCE-121/src/main/resources/main.properties b/src/it/MSOURCE-121/src/main/resources/main.properties
new file mode 100644
index 0000000..00ae6c0
--- /dev/null
+++ b/src/it/MSOURCE-121/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/it/MSOURCE-121/src/test/java/MyTest.java b/src/it/MSOURCE-121/src/test/java/MyTest.java
new file mode 100644
index 0000000..9d124be
--- /dev/null
+++ b/src/it/MSOURCE-121/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/it/MSOURCE-121/src/test/resources/test.properties b/src/it/MSOURCE-121/src/test/resources/test.properties
new file mode 100644
index 0000000..00ae6c0
--- /dev/null
+++ b/src/it/MSOURCE-121/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.
+