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/04/28 11:30:10 UTC

[maven-compiler-plugin] branch MCOMPILER-379 updated (bc9ced9 -> aabf445)

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

khmarbaise pushed a change to branch MCOMPILER-379
in repository https://gitbox.apache.org/repos/asf/maven-compiler-plugin.git.


 discard bc9ced9  Test commit.
 discard bc6d79d  [MCOMPILER-379] - Fatal error compiling: basedir ... arget/generated-sources/annotations does not exist  - Created Integration test which currently fails.
     add a5c6bc5  (doc) Fixed broken links to scm, issue tracker, and mailing list page. (#15)
     new 985c283  [MCOMPILER-379] - Fatal error compiling: basedir ... arget/generated-sources/annotations does not exist  - Created Integration test which currently fails.
     new ca49b53  Test commit.
     new aabf445  Test commit to see if it works.

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (bc9ced9)
            \
             N -- N -- N   refs/heads/MCOMPILER-379 (aabf445)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 3 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.


Summary of changes:
 .../org/apache/maven/plugin/compiler/AbstractCompilerMojo.java   | 9 ++++++++-
 src/site/apt/index.apt.vm                                        | 8 ++++----
 2 files changed, 12 insertions(+), 5 deletions(-)


[maven-compiler-plugin] 02/03: Test commit.

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

khmarbaise pushed a commit to branch MCOMPILER-379
in repository https://gitbox.apache.org/repos/asf/maven-compiler-plugin.git

commit ca49b53fac9548a4fe2f4eafd5b61a08e0f04319
Author: Karl Heinz Marbaise <kh...@apache.org>
AuthorDate: Sun Apr 28 12:24:24 2019 +0200

    Test commit.
---
 .../java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java b/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
index 0ac1e27..801ed28 100644
--- a/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
+++ b/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
@@ -1562,7 +1562,7 @@ public abstract class AbstractCompilerMojo
         if ( fileExtensions == null || fileExtensions.isEmpty() )
         {
             fileExtensions = new ArrayList<>();
-            fileExtensions.add( "class" );
+            fileExtensions.add( ".class" );
         }
 
         Date buildStartTime = getBuildStartTime();


[maven-compiler-plugin] 01/03: [MCOMPILER-379] - Fatal error compiling: basedir ... arget/generated-sources/annotations does not exist - Created Integration test which currently fails.

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

khmarbaise pushed a commit to branch MCOMPILER-379
in repository https://gitbox.apache.org/repos/asf/maven-compiler-plugin.git

commit 985c2834beb0f7ab3ef137204c16f9d85312447d
Author: Karl Heinz Marbaise <kh...@apache.org>
AuthorDate: Sun Mar 31 14:25:26 2019 +0200

    [MCOMPILER-379] - Fatal error compiling: basedir ... arget/generated-sources/annotations does not exist
     - Created Integration test which currently fails.
---
 src/it/MCOMPILER-379/invoker.properties            | 18 ++++++++
 src/it/MCOMPILER-379/module1/pom.xml               | 42 +++++++++++++++++
 src/it/MCOMPILER-379/module2/pom.xml               | 36 +++++++++++++++
 .../module2/src/main/java/com/natros/mcp/Foo.java  | 22 +++++++++
 src/it/MCOMPILER-379/pom.xml                       | 54 ++++++++++++++++++++++
 5 files changed, 172 insertions(+)

diff --git a/src/it/MCOMPILER-379/invoker.properties b/src/it/MCOMPILER-379/invoker.properties
new file mode 100644
index 0000000..0659ac5
--- /dev/null
+++ b/src/it/MCOMPILER-379/invoker.properties
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+invoker.goals = compile
diff --git a/src/it/MCOMPILER-379/module1/pom.xml b/src/it/MCOMPILER-379/module1/pom.xml
new file mode 100644
index 0000000..32c43df
--- /dev/null
+++ b/src/it/MCOMPILER-379/module1/pom.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements. See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership. The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License. You may obtain a copy of the License at
+  ~
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied. See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+-->
+
+<project
+  xmlns="http://maven.apache.org/POM/4.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.maven.plugins.compiler.it</groupId>
+    <artifactId>mcompiler-379</artifactId>
+    <version>1.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>module1</artifactId>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven.plugins.compiler.it</groupId>
+      <artifactId>module2</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+  </dependencies>
+</project>
diff --git a/src/it/MCOMPILER-379/module2/pom.xml b/src/it/MCOMPILER-379/module2/pom.xml
new file mode 100644
index 0000000..5a96f91
--- /dev/null
+++ b/src/it/MCOMPILER-379/module2/pom.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements. See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership. The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License. You may obtain a copy of the License at
+  ~
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied. See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+-->
+
+<project
+  xmlns="http://maven.apache.org/POM/4.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.maven.plugins.compiler.it</groupId>
+    <artifactId>mcompiler-379</artifactId>
+    <version>1.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>module2</artifactId>
+
+
+</project>
diff --git a/src/it/MCOMPILER-379/module2/src/main/java/com/natros/mcp/Foo.java b/src/it/MCOMPILER-379/module2/src/main/java/com/natros/mcp/Foo.java
new file mode 100644
index 0000000..7e6d55c
--- /dev/null
+++ b/src/it/MCOMPILER-379/module2/src/main/java/com/natros/mcp/Foo.java
@@ -0,0 +1,22 @@
+/*
+ * 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 com.natros.mcp;
+
+public class Foo {
+}
diff --git a/src/it/MCOMPILER-379/pom.xml b/src/it/MCOMPILER-379/pom.xml
new file mode 100644
index 0000000..f7ffd66
--- /dev/null
+++ b/src/it/MCOMPILER-379/pom.xml
@@ -0,0 +1,54 @@
+<?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.plugins.compiler.it</groupId>
+  <artifactId>mcompiler-379</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <packaging>pom</packaging>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+
+  <modules>
+    <module>module1</module>
+    <module>module2</module>
+  </modules>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <version>@project.version@</version>
+        <configuration>
+          <source>8</source>
+          <target>8</target>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>


[maven-compiler-plugin] 03/03: Test commit to see if it works.

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

khmarbaise pushed a commit to branch MCOMPILER-379
in repository https://gitbox.apache.org/repos/asf/maven-compiler-plugin.git

commit aabf4456c6c7aab5c982f95846873a9cca807923
Author: Karl Heinz Marbaise <kh...@apache.org>
AuthorDate: Sun Apr 28 13:29:55 2019 +0200

    Test commit to see if it works.
---
 .../org/apache/maven/plugin/compiler/AbstractCompilerMojo.java   | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java b/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
index 801ed28..c63077a 100644
--- a/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
+++ b/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
@@ -655,6 +655,9 @@ public abstract class AbstractCompilerMojo
 
         if ( generatedSourcesDirectory != null )
         {
+            //TESTING...
+            generatedSourcesDirectory.mkdirs();
+
             String generatedSourcesPath = generatedSourcesDirectory.getAbsolutePath();
 
             compileSourceRoots.add( generatedSourcesPath );
@@ -788,6 +791,7 @@ public abstract class AbstractCompilerMojo
 
                 incrementalBuildHelperRequest = new IncrementalBuildHelperRequest().inputFiles( sources );
 
+                getLog().info( " isDependencyChanged:" + isDependencyChanged() );
                 // CHECKSTYLE_OFF: LineLength
                 if ( ( compiler.getCompilerOutputStyle().equals( CompilerOutputStyle.ONE_OUTPUT_FILE_FOR_ALL_INPUT_FILES ) && !canUpdateTarget )
                     || isDependencyChanged()
@@ -1562,7 +1566,7 @@ public abstract class AbstractCompilerMojo
         if ( fileExtensions == null || fileExtensions.isEmpty() )
         {
             fileExtensions = new ArrayList<>();
-            fileExtensions.add( ".class" );
+            fileExtensions.add( "class" );
         }
 
         Date buildStartTime = getBuildStartTime();
@@ -1602,8 +1606,11 @@ public abstract class AbstractCompilerMojo
             return false;
         }
 
+        getLog().info( "classPathEntry:" + classPathEntry.getName() );
         if ( classPathEntry.isFile() )
         {
+            getLog().info( " hasNewFile: " + classPathEntry.getName() + " FileUtils: getExtensions:"
+                    + FileUtils.getExtension( classPathEntry.getName() ) );
             return classPathEntry.lastModified() >= buildStartTime.getTime()
                 && fileExtensions.contains( FileUtils.getExtension( classPathEntry.getName() ) );
         }