jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Continuum
  • CONTINUUM-782

Add a feature to allow cleaning the m2 local repo once every N days

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: New Feature New Feature
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.0.3
  • Fix Version/s: 1.2
  • Component/s: Core system
  • Labels:
    None
  • Complexity:
    Intermediate

Description

It's really hard with maven to know if your build is working or not. I've been hit several times already by buillds working fine locally and on the CIs but failing for a newcomer trying to build that project. The reason is that remote repos are not immutable and artifacts can disappear or be modified in there.

It would be nice if continnuum could help notice when this happen. A way to implement this would to be to configure Continuum to clean its local repo every N days.

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Text File
    CONTINUUM-purge.patch
    15/Jul/08 8:41 PM
    422 kB
    Maria Catherine Tan
  2. Text File
    continuum-purge-07242008.patch
    23/Jul/08 8:35 PM
    449 kB
    Maria Catherine Tan
  3. Text File
    CONTINUUM-purge-docs.patch
    15/Jul/08 8:42 PM
    5 kB
    Maria Catherine Tan
  4. Text File
    CONTINUUM-purge-newer.patch
    17/Jul/08 2:33 AM
    426 kB
    Maria Catherine Tan
  5. Hide
    Zip Archive
    documentation-images.zip
    15/Jul/08 8:43 PM
    106 kB
    Maria Catherine Tan
    1. PNG File
      images/localrepositories-view.png 7 kB
    2. PNG File
      images/purgeconfigurations.png 2 kB
    3. PNG File
      images/localrepository-add.png 13 kB
    4. PNG File
      images/repositorypurgeconfiguration-add.png 25 kB
    5. PNG File
      images/directorypurgeconfiguration-add.png 20 kB
    6. PNG File
      images/localrepositories.png 1 kB
    7. PNG File
      images/purgeconfigurations-view.png 21 kB
    8. GIF File
      images/disabled_purgenow.gif 0.9 kB
    9. GIF File
      images/purgenow.gif 0.3 kB
    10. PNG File
      images/add-project-group-detail.png 11 kB
    11. PNG File
      images/add-project-group.png 11 kB
    Download Zip
    Show
    Zip Archive
    documentation-images.zip
    15/Jul/08 8:43 PM
    106 kB
    Maria Catherine Tan
  6. Hide
    Zip Archive
    purge-images.zip
    15/Jul/08 8:42 PM
    1 kB
    Maria Catherine Tan
    1. GIF File
      images/purgenow.gif 0.3 kB
    2. GIF File
      images/disabled_purgenow.gif 0.9 kB
    Download Zip
    Show
    Zip Archive
    purge-images.zip
    15/Jul/08 8:42 PM
    1 kB
    Maria Catherine Tan

Issue Links

is related to

Bug - A problem which impairs or prevents the functions of the product. CONTINUUM-1693 Continuum fills our server disk with SNAPSHOTs.

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

New Feature - A new feature of the product, which has yet to be developed. CONTINUUM-265 Concurrent builds

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Improvement - An improvement or enhancement to an existing feature or task. CONTINUUM-1465 Project groups should probably get their own local maven repo

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Improvement - An improvement or enhancement to an existing feature or task. CONTINUUM-1759 Ability to delete working copies associated with releases

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Jesse McConnell added a comment - 18/Jul/06 11:30 AM

short term solution would be to use -Dmaven.repo.local=/path/ in a custom scheduled build, could be that if you set it to something relative to the executing project that the repo could be cleaned up with clean...

perhaps a weekly build schedule with goals clean and install with the added commandline option -Dmaven.repo.local="./target/localRepository" would work...

Show
Jesse McConnell added a comment - 18/Jul/06 11:30 AM short term solution would be to use -Dmaven.repo.local=/path/ in a custom scheduled build, could be that if you set it to something relative to the executing project that the repo could be cleaned up with clean... perhaps a weekly build schedule with goals clean and install with the added commandline option -Dmaven.repo.local="./target/localRepository" would work...
Hide
Permalink
Milos Kleint added a comment - 31/Jul/06 2:41 PM

actually the suggested workaround with -Dmaven.repo.local doesn't work, at least not on the continnum instance at codehaus. My build fails whenever I try to put a relative path.

What I would like to achieve is a "clean" build for my project.
1. have a local repository that gets clean everytime
2. have a local repository that is private to my project (set of projects) and doesn't interfere with other projects running on the same continuum instance
2a. by project I mean something like mevenide which consists of multiple modules but I want it to build all at once

I always do a clean build of mevenide prior to commit and commit everything, the major feature of a continuum server for me is to check if my project is buildable with a given set of remote repositories, as cross pollination of my local repository is a common source of problems for me.

Show
Milos Kleint added a comment - 31/Jul/06 2:41 PM actually the suggested workaround with -Dmaven.repo.local doesn't work, at least not on the continnum instance at codehaus. My build fails whenever I try to put a relative path. What I would like to achieve is a "clean" build for my project. 1. have a local repository that gets clean everytime 2. have a local repository that is private to my project (set of projects) and doesn't interfere with other projects running on the same continuum instance 2a. by project I mean something like mevenide which consists of multiple modules but I want it to build all at once I always do a clean build of mevenide prior to commit and commit everything, the major feature of a continuum server for me is to check if my project is buildable with a given set of remote repositories, as cross pollination of my local repository is a common source of problems for me.
Hide
Permalink
Maria Catherine Tan added a comment - 02/Jun/08 1:53 AM - edited

I would like to work on this issue

Here's what I would like to do:

1. create a new table for local repositories

2. create a local repo maintenance page

  • add, edit, delete

3. scheduled jobs

  • select which repository to clean

4. build definition

  • select which repository to use ( default to ${user_home}/.m2/repository )
  • enable/disable clean repository before build (for group build definition only)

Wdyt? If everyone is fine with this then I'll create a sub task for this issue.

Show
Maria Catherine Tan added a comment - 02/Jun/08 1:53 AM - edited I would like to work on this issue Here's what I would like to do: 1. create a new table for local repositories 2. create a local repo maintenance page
  • add, edit, delete
3. scheduled jobs
  • select which repository to clean
4. build definition
  • select which repository to use ( default to ${user_home}/.m2/repository )
  • enable/disable clean repository before build (for group build definition only)
Wdyt? If everyone is fine with this then I'll create a sub task for this issue.
Hide
Permalink
Emmanuel Venisse added a comment - 11/Jun/08 5:51 PM

Maria, it's good to me.
Look at CONTINUUM-1693 too to remove some old snapshot. I think Archiva do it already, maybe we'll can reuse the code.

Show
Emmanuel Venisse added a comment - 11/Jun/08 5:51 PM Maria, it's good to me. Look at CONTINUUM-1693 too to remove some old snapshot. I think Archiva do it already, maybe we'll can reuse the code.
Hide
Permalink
Wendy Smoak added a comment - 16/Jun/08 9:47 PM

Can you make sure that a repository does not get cleaned while a project that uses it is building?

Show
Wendy Smoak added a comment - 16/Jun/08 9:47 PM Can you make sure that a repository does not get cleaned while a project that uses it is building?
Hide
Permalink
Maria Catherine Tan added a comment - 15/Jul/08 8:41 PM

I have attached the patch for purging. This patch includes fixes for CONTINUUM-782, CONTINUUM-1693 and CONTINUUM-1759.

Sorry if I did not put it into chunks. Please review my patch Thanks

Show
Maria Catherine Tan added a comment - 15/Jul/08 8:41 PM I have attached the patch for purging. This patch includes fixes for CONTINUUM-782, CONTINUUM-1693 and CONTINUUM-1759. Sorry if I did not put it into chunks. Please review my patch Thanks
Hide
Permalink
Maria Catherine Tan added a comment - 15/Jul/08 8:42 PM

attached purge images

Show
Maria Catherine Tan added a comment - 15/Jul/08 8:42 PM attached purge images
Hide
Permalink
Maria Catherine Tan added a comment - 15/Jul/08 8:42 PM

attached documentation

Show
Maria Catherine Tan added a comment - 15/Jul/08 8:42 PM attached documentation
Hide
Permalink
Maria Catherine Tan added a comment - 15/Jul/08 8:43 PM

attached documentation images

Show
Maria Catherine Tan added a comment - 15/Jul/08 8:43 PM attached documentation images
Hide
Permalink
Maria Catherine Tan added a comment - 15/Jul/08 9:26 PM

I originally plan to create a local repository field in build definition but later moved it to the project group because of CONTINUUM-1465.

I'm not sure if this one is better or should I put local repository back in the build definition. I've read other jira issues and found out some liked it to have the local repository in the build definition CONTINUUM-265.

Wdyt?

Show
Maria Catherine Tan added a comment - 15/Jul/08 9:26 PM I originally plan to create a local repository field in build definition but later moved it to the project group because of CONTINUUM-1465. I'm not sure if this one is better or should I put local repository back in the build definition. I've read other jira issues and found out some liked it to have the local repository in the build definition CONTINUUM-265. Wdyt?
Hide
Permalink
Maria Catherine Tan added a comment - 15/Jul/08 9:29 PM

Or we could leave the local repository in the project group but still add one per build definition, which will override the local repository in the project group.

Show
Maria Catherine Tan added a comment - 15/Jul/08 9:29 PM Or we could leave the local repository in the project group but still add one per build definition, which will override the local repository in the project group.
Hide
Permalink
Maria Catherine Tan added a comment - 17/Jul/08 2:33 AM

I have attached a newer patch, "CONTINUUM-purge-newer.patch", that contains fixes for:
1. test failures when purging directories
2. editing repository when it is in use
3. error message when unable to remove, edit, purge repository because it is in use

Please use this patch instead of the old one.

Show
Maria Catherine Tan added a comment - 17/Jul/08 2:33 AM I have attached a newer patch, "CONTINUUM-purge-newer.patch", that contains fixes for: 1. test failures when purging directories 2. editing repository when it is in use 3. error message when unable to remove, edit, purge repository because it is in use Please use this patch instead of the old one.
Hide
Permalink
Wendy Smoak added a comment - 19/Jul/08 5:01 PM

Marica, I have this all applied locally and it looks good, however it's quite a large contribution and I don't see a CLA on file for you on http://people.apache.org/~jim/committers.html . I'm guessing you might be covered by a Corporate CLA, but I don't think I have a way to check that. (And is an iCLA still required even if there is a CCLA?)

Show
Wendy Smoak added a comment - 19/Jul/08 5:01 PM Marica, I have this all applied locally and it looks good, however it's quite a large contribution and I don't see a CLA on file for you on http://people.apache.org/~jim/committers.html . I'm guessing you might be covered by a Corporate CLA, but I don't think I have a way to check that. (And is an iCLA still required even if there is a CCLA?)
Hide
Permalink
Maria Catherine Tan added a comment - 20/Jul/08 2:47 AM

Wendy, I'll file a CLA tomorrow and send through fax. Thanks

Show
Maria Catherine Tan added a comment - 20/Jul/08 2:47 AM Wendy, I'll file a CLA tomorrow and send through fax. Thanks
Hide
Permalink
Maria Catherine Tan added a comment - 23/Jul/08 8:35 PM

Found some more issues with my patch so I have attached continuum-purge-07242008.patch that fixes those issues.

1. added continuum-configuration.xml in src/test/resources of continuum-purge module ( for revision 678639 )
2. refactored packages to org.apache.continuum
3. fixed some purging tests
4. added creation of default m2 local repository during continuum initialization
5. set default project group's local repository to #4
6. fixed repository used when releasing and deploying
7. set project group's local repository to #4 when adding a new maven 2 project whose project group is set to "defined by pom"
8. will not be able to edit/remove the default local repository
9. changed archiva version to 1.1

Show
Maria Catherine Tan added a comment - 23/Jul/08 8:35 PM Found some more issues with my patch so I have attached continuum-purge-07242008.patch that fixes those issues. 1. added continuum-configuration.xml in src/test/resources of continuum-purge module ( for revision 678639 ) 2. refactored packages to org.apache.continuum 3. fixed some purging tests 4. added creation of default m2 local repository during continuum initialization 5. set default project group's local repository to #4 6. fixed repository used when releasing and deploying 7. set project group's local repository to #4 when adding a new maven 2 project whose project group is set to "defined by pom" 8. will not be able to edit/remove the default local repository 9. changed archiva version to 1.1
Hide
Permalink
Olivier Lamy added a comment - 24/Jul/08 5:34 PM

committed in https://svn.apache.org/repos/asf/continuum/branches/CONTINUUM-782/ in rev 679588
patch changed to handle new field added in a table
application.xml in webapp to can start new version with a 1.1 db :

<property>
    <name>org.jpox.autoCreateColumns</name>
    <value>true</value>
  </property>
Show
Olivier Lamy added a comment - 24/Jul/08 5:34 PM committed in https://svn.apache.org/repos/asf/continuum/branches/CONTINUUM-782/ in rev 679588 patch changed to handle new field added in a table application.xml in webapp to can start new version with a 1.1 db :
<property>
    <name>org.jpox.autoCreateColumns</name>
    <value>true</value>
  </property>
Hide
Permalink
Olivier Lamy added a comment - 31/Jul/08 4:09 PM

fixed in rev 681492.
THANKS !!

Show
Olivier Lamy added a comment - 31/Jul/08 4:09 PM fixed in rev 681492. THANKS !!
Hide
Permalink
Olivier Lamy added a comment - 03/Aug/08 2:59 AM

reopen issue because images are missing.

Show
Olivier Lamy added a comment - 03/Aug/08 2:59 AM reopen issue because images are missing.
Hide
Permalink
Maria Catherine Tan added a comment - 04/Aug/08 5:50 PM

Hi Olivier The images were already been attached --> purge-images.zip Thanks

Show
Maria Catherine Tan added a comment - 04/Aug/08 5:50 PM Hi Olivier The images were already been attached --> purge-images.zip Thanks
Hide
Permalink
Olivier Lamy added a comment - 04/Aug/08 6:52 PM

missing images added in rev 682541.

Show
Olivier Lamy added a comment - 04/Aug/08 6:52 PM missing images added in rev 682541.

People

  • Assignee:
    Olivier Lamy
    Reporter:
    Vincent Massol
Vote (5)
Watch (6)

Dates

  • Created:
    17/Jul/06 1:51 PM
    Updated:
    04/Aug/08 6:52 PM
    Resolved:
    04/Aug/08 6:52 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.