maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Petr Kozelka (JIRA)" <j...@codehaus.org>
Subject [jira] Reopened: (MINSTALL-78) install:install should remove leftovers from local repository
Date Fri, 24 Sep 2010 09:47:34 GMT

     [ http://jira.codehaus.org/browse/MINSTALL-78?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Petr Kozelka reopened MINSTALL-78:
----------------------------------


You are right that I can configure some sort of explicit purging at buildserver; but this
issue mainly affects simple configurations without one.
Even in a big team: people who want to make a build *before* commit, trying to avoid failure
at CI build, are affected too. I am often explaining developers from my team why the build
nicely passing on their local machine fails on CI server, and would be happy if one of the
most frequent reasons could be eliminated

IMHO the case when you need to just "update" repo is very infrequent.
What about to make this functionality controlled by an option? Then, I can control this by
corporate pom, and explicitly turn on "update" behavior for the few modules that need it.

I can create a patch for this; please let me know if it sounds like acceptable way.

> install:install should remove leftovers from local repository
> -------------------------------------------------------------
>
>                 Key: MINSTALL-78
>                 URL: http://jira.codehaus.org/browse/MINSTALL-78
>             Project: Maven 2.x Install Plugin
>          Issue Type: Bug
>          Components: install:install
>    Affects Versions: 2.3.1
>            Reporter: Petr Kozelka
>            Assignee: Benjamin Bentmann
>         Attachments: pom.xml
>
>
> It sometimes happens that we need to change the set of output artifacts. When this happens,
the install mojo does not bother to remove older artifacts that are no longer produced by
this module.
> The bad effect is, that other modules depending on the obsolete artifacts can still use
it - and later there comes a surprise.
> Much better behavior in this situation would be, to remove the obsolete files from the
local repository's directory dedicated for given module.
> h4. reproducing the problem
> # download the sample pom to an empty directory
> # execute {{mvn clean install -Dc=obsolete-demo}} - this represents the "older version"
of a module
> # execute {{mvn clean install}} - this represents the "newer version" of a module, after
changing the classifier
> # now, look in the local repo using {{ls -1 $HOME/.m2/repository/demo/sample-zip-module/1-SNAPSHOT}}
- you will see this:
> {quote}
> maven-metadata-local.xml
> sample-zip-module-1-SNAPSHOT-demo.zip
> {color:red}sample-zip-module-1-SNAPSHOT-obsolete-demo.zip{color}
> sample-zip-module-1-SNAPSHOT.pom
> {quote}
> h4. possible solutions
> I see two approaches
> # *drop the installdir first* - straightforward
> # *list installdir, install, drop leftovers* - slightly more complicated but maximizes
the time of installed module existence (if that matters)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message