maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tamás Cservenák (JIRA) <>
Subject [jira] Commented: (MNG-4368) DefaultArtifactInstaller should only overwrite files if timestamp has changed
Date Mon, 07 Dec 2009 14:04:55 GMT


Tamás Cservenák commented on MNG-4368:

This is _completely wrong_, and makes Maven3 very cumbersome (if not completely broken) to
work on branches, especially with regarding POMs. What happens:

Check out a trunk of your project (let's suppose all files are modified today T0):

* svn checkout
* mvn clean install

Then, tomorrow T1 do a branch of your project, and _modify_ for example the POM of your project
in branch.

* svn branch it
* mvn clean install

Then, next day T2, return to trunk and continue work (but for example's sake, do _not_ modify
the POM you changed in branch).

* svn switch back to trunk
* mvn clean instal

Obviously T0 < T1 < T2

But, the change done in T1 will be _*not replaceable*_ by the 2nd trunk build (mvn clean install
in T2 will *NOT* replace the pom in local repo), and potentionally will result in very spurious
errors (ie. in branch you remove/add deps, change parent, etc).

Please, undo this! Thanks.

Interestingly, this will fit nicely with Git (git will "touch" the file when switching back
from branch to "master")

But in general, on "install" goal Maven should install the files I told it to install.

> DefaultArtifactInstaller should only overwrite files if timestamp has changed
> -----------------------------------------------------------------------------
>                 Key: MNG-4368
>                 URL:
>             Project: Maven 2
>          Issue Type: Improvement
>         Environment: Linux, JDK 1.5
>            Reporter: Johannes Martin
>             Fix For: 2.2.2, 3.0-alpha-3
> install:install (from maven-install-plugin) by default uses DefaultArtifactInstaller
to install artifacts. DefaultArtifactInstaller in turn uses FileUtils.copyFile(), thereby
overwriting destination files even if they are unchanged. It would be helpful if DefaultArtifactInstaller
used FileUtils.copyFileIfModified() instead, at least as an option, to speed up the build

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


View raw message