You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ambari.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/12/03 09:49:00 UTC

[jira] [Commented] (AMBARI-18361) All classes recompiled due to Maven bug, even if none changed

    [ https://issues.apache.org/jira/browse/AMBARI-18361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16706901#comment-16706901 ] 

ASF GitHub Bot commented on AMBARI-18361:
-----------------------------------------

adoroszlai opened a new pull request #22: [AMBARI-18361] Avoid unnecessary compilation
URL: https://github.com/apache/ambari-infra/pull/22
 
 
   ## What changes were proposed in this pull request?
   
   Fix for:
   
   1. all `ambari-infra-manager` classes are recompiled even if none has changed
   2. all classes are recompiled in each submodule that has any changed java source
   
   ```
   $ mvn clean test-compile
   $ mvn test-compile
   ...
   [INFO] --- maven-compiler-plugin:3.0:compile (default-compile) @ ambari-infra-manager ---
   [INFO] Changes detected - recompiling the module!
   [INFO] Compiling 100 source files to ambari-infra-manager/target/classes
   ...
   $ touch ambari-infra-manager/src/main/java/org/apache/ambari/infra/conf/InfraManagerDataConfig.java
   $ mvn test-compile
   ...
   [INFO] --- maven-compiler-plugin:3.0:compile (default-compile) @ ambari-infra-manager ---
   [INFO] Changes detected - recompiling the module!
   [INFO] Compiling 100 source files to ambari-infra-manager/target/classes
   ```
   
   ## How was this patch tested?
   
   ```
   $ mvn clean test-compile
   $ mvn test-compile
   ...
   [INFO] --- maven-compiler-plugin:3.3:compile (default-compile) @ ambari-infra-manager ---
   [INFO] Nothing to compile - all classes are up to date
   ...
   $ touch ambari-infra-manager/src/main/java/org/apache/ambari/infra/conf/InfraManagerDataConfig.java
   $ mvn test-compile
   ...
   [INFO] --- maven-compiler-plugin:3.3:compile (default-compile) @ ambari-infra-manager ---
   [INFO] Compiling 1 source file to ambari-infra-manager/target/classes
   ```
   
   ```
   $ mvn clean test
   ...
   [INFO] BUILD SUCCESS
   $ mvn test
   ...
   [INFO] BUILD SUCCESS
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> All classes recompiled due to Maven bug, even if none changed
> -------------------------------------------------------------
>
>                 Key: AMBARI-18361
>                 URL: https://issues.apache.org/jira/browse/AMBARI-18361
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-server
>    Affects Versions: 2.4.0
>            Reporter: Doroszlai, Attila
>            Assignee: Doroszlai, Attila
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 2.5.0
>
>         Attachments: AMBARI-18361.patch
>
>
> maven-compiler-plugin version 3.0 has a [bug|https://issues.apache.org/jira/browse/MCOMPILER-187] that causes all classes to be recompiled even if no classes have changed.
> {noformat}
> [INFO] --- maven-compiler-plugin:3.0:compile (default-compile) @ ambari-server ---
> [INFO] Changes detected - recompiling the module!
> [INFO] Compiling 1720 source files ...
> ...
> [INFO] --- maven-compiler-plugin:3.0:testCompile (default-testCompile) @ ambari-server ---
> [INFO] Changes detected - recompiling the module!
> [INFO] Compiling 760 source files ...
> {noformat}
> version 3.1+ has [another, related bug|https://issues.apache.org/jira/browse/MCOMPILER-209] that causes all classes to be compiled even if only one has changed, although it seems to correctly detect the "no change" case.
> {noformat}
> [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ ambari-server ---
> [INFO] Changes detected - recompiling the module!
> [INFO] Compiling 1720 source files ...
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)