Maven WAR Plugin
  1. Maven WAR Plugin
  2. MWAR-168

"Dependency Has Changed" Incorrectly Reported

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1-alpha-2
    • Fix Version/s: 2.1-beta-1
    • Component/s: None
    • Labels:
      None

      Description

      In maven-war-plugin 2.1-alpha-2, execute the following on a war project:

      mvn clean;
      mvn install;
      mvn install;

      The 3rd command incorrectly lists messages for each dependency as follows:

      [INFO] Dependency[Dependency

      {groupId=com.mycompany, artifactId=myartifact, version=8.6.1, type=jar}]
      has changed (was Dependency {groupId=com.mycompany, artifactId=myartifact, version=8.6.1, type=jar}

      ).

      The first time that mvn install is run, dependencies are added to:
      target\myapp-war-1.1-SNAPSHOT\WEB-INF\lib

      The second invocation of mvn install appears to fail in comparing the existing jars in the above path with what is in the repository. The message states the dependencies have changed when in fact they have not.

      This problem does not exist in maven-war-plugin 2.0.2.

        Activity

        gotama created issue -
        Hide
        Stephane Nicoll added a comment -

        this is a new feature and this is a "known" problem but thanks for the bug hunting which will help fixing it

        You can safely ignore it (or you can disable the cache to avoid the message)

        Show
        Stephane Nicoll added a comment - this is a new feature and this is a "known" problem but thanks for the bug hunting which will help fixing it You can safely ignore it (or you can disable the cache to avoid the message)
        Stephane Nicoll made changes -
        Field Original Value New Value
        Assignee Stephane Nicoll [ sni ]
        Hide
        Stevo Slavic added a comment -

        This seems to be fixed in current 2.1-beta-1. To use it one should specify the version in project's plugin settings:

        ...
        <build>
          ...
          <pluginManagement>
            <plugins>
              ...
              <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.1-beta-1</version>
              </plugin>
              ...
            </plugins>
          </pluginManagement>
          ...
        </build>
        ...
        
        Show
        Stevo Slavic added a comment - This seems to be fixed in current 2.1-beta-1. To use it one should specify the version in project's plugin settings: ... <build> ... <pluginManagement> <plugins> ... <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.1-beta-1</version> </plugin> ... </plugins> </pluginManagement> ... </build> ...
        Hide
        Dmitry Katsubo added a comment -

        I have the warning messages of the same nature:

        [INFO] Dependency[Dependency {groupId=commons-logging, artifactId=commons-logging, version=1.1.1, type=jar}] has changed (was Dependency {groupId=commons-logging, artifactId=commons-logging, version=1.1.1, type=jar}).
        [INFO] Dependency[Dependency {groupId=commons-lang, artifactId=commons-lang, version=2.4, type=jar}] has changed (was Dependency {groupId=commons-lang, artifactId=commons-lang, version=2.4, type=jar}).
        

        maven-war-plugin 2.1-alpha-2
        maven-jar-plugin 2.2

        The warning message appears for the dependences, which have versions substantiated by a variable, for example in parent pom:

        <properties>
        	<commons.logging.version>1.1.1</commons.logging.version>
        	<commons.lang.version>2.4</commons.lang.version>
        </properties>
        

        in module pom:

        <dependency>
        	<groupId>commons-logging</groupId>
        	<artifactId>commons-logging</artifactId>
        	<version>${commons.logging.version}</version>
        </dependency>
        <dependency>
        	<groupId>commons-lang</groupId>
        	<artifactId>commons-lang</artifactId>
        	<version>${commons.lang.version}</version>
        </dependency>
        
        Show
        Dmitry Katsubo added a comment - I have the warning messages of the same nature: [INFO] Dependency[Dependency {groupId=commons-logging, artifactId=commons-logging, version=1.1.1, type=jar}] has changed (was Dependency {groupId=commons-logging, artifactId=commons-logging, version=1.1.1, type=jar}). [INFO] Dependency[Dependency {groupId=commons-lang, artifactId=commons-lang, version=2.4, type=jar}] has changed (was Dependency {groupId=commons-lang, artifactId=commons-lang, version=2.4, type=jar}). maven-war-plugin 2.1-alpha-2 maven-jar-plugin 2.2 The warning message appears for the dependences, which have versions substantiated by a variable, for example in parent pom: <properties> <commons.logging.version>1.1.1</commons.logging.version> <commons.lang.version>2.4</commons.lang.version> </properties> in module pom: <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>${commons.logging.version}</version> </dependency> <dependency> <groupId>commons-lang</groupId> <artifactId>commons-lang</artifactId> <version>${commons.lang.version}</version> </dependency>
        Stephane Nicoll made changes -
        Description
        In maven-war-plugin 2.1-alpha-2, execute the following on a war project:

        mvn clean;
        mvn install;
        mvn install;

        The 3rd command incorrectly lists messages for each dependency as follows:

        [INFO] Dependency[Dependency {groupId=com.mycompany, artifactId=myartifact, version=8.6.1, type=jar}]
        has changed (was Dependency {groupId=com.mycompany, artifactId=myartifact, version=8.6.1, type=jar}).

        The first time that mvn install is run, dependencies are added to:
        target\myapp-war-1.1-SNAPSHOT\WEB-INF\lib

        The second invocation of mvn install appears to fail in comparing the existing jars in the above path with what is in the repository. The message states the dependencies have changed when in fact they have not.

        This problem does not exist in maven-war-plugin 2.0.2.
        In maven-war-plugin 2.1-alpha-2, execute the following on a war project:

        mvn clean;
        mvn install;
        mvn install;

        The 3rd command incorrectly lists messages for each dependency as follows:

        [INFO] Dependency[Dependency {groupId=com.mycompany, artifactId=myartifact, version=8.6.1, type=jar}]
        has changed (was Dependency {groupId=com.mycompany, artifactId=myartifact, version=8.6.1, type=jar}).

        The first time that mvn install is run, dependencies are added to:
        target\myapp-war-1.1-SNAPSHOT\WEB-INF\lib

        The second invocation of mvn install appears to fail in comparing the existing jars in the above path with what is in the repository. The message states the dependencies have changed when in fact they have not.

        This problem does not exist in maven-war-plugin 2.0.2.
        Fix Version/s 2.2 [ 15001 ]
        Dennis Lundberg made changes -
        Fix Version/s 2.3 [ 18298 ]
        Fix Version/s 2.2 [ 15001 ]
        Dennis Lundberg made changes -
        Fix Version/s 2.1-beta-1 [ 12616 ]
        Fix Version/s 2.3 [ 18298 ]
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Closed [ 6 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 13:28:45 UTC 2015 [ 1428240525159 ]
        Mark Thomas made changes -
        Workflow jira [ 12728582 ] Default workflow, editable Closed status [ 12765043 ]
        Mark Thomas made changes -
        Project Import Mon Apr 06 01:49:55 UTC 2015 [ 1428284995525 ]
        Mark Thomas made changes -
        Workflow jira [ 12966360 ] Default workflow, editable Closed status [ 13002552 ]
        Mark Thomas made changes -
        Assignee sni [ sni ] Stephane Nicoll [ snicoll ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Closed Closed
        1483d 2h 11m 1 Dennis Lundberg 25/Sep/12 17:22

          People

          • Assignee:
            Stephane Nicoll
            Reporter:
            gotama
          • Votes:
            6 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development