Maven 1.x Ant Plugin
  1. Maven 1.x Ant Plugin
  2. MPANT-21

get-deps target should download to local maven repo

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.9
    • Labels:
      None
    • Environment:
      All
    • Number of attachments :
      0

      Description

      The get-deps target downloads dependencies to target/lib. This is problematic since it forces downloads to occur after a 'clean' is performed. I suggest downloading to the local maven repository, regardless of whether or not maven has been installed. This avoids unnecessary downloads after a 'clean' and also makes migration to maven easier. Once a user migrates to maven, dependencies will already exist in the local repo.

        Activity

        Hide
        Arnaud Heritier added a comment -

        It seems to be a good idea. I'll investigate it.

        Show
        Arnaud Heritier added a comment - It seems to be a good idea. I'll investigate it.
        Hide
        David Eric Pugh added a comment -

        I thought about doing this, but I don't believe that the get-deps does all the stuff that the maven version does in terms of detecting resources? Also, how do you figure out what the maven local repo is if they aren't using Maven? I guess you could do something conditional.

        Show
        David Eric Pugh added a comment - I thought about doing this, but I don't believe that the get-deps does all the stuff that the maven version does in terms of detecting resources? Also, how do you figure out what the maven local repo is if they aren't using Maven? I guess you could do something conditional.
        Hide
        Chuck Daniels added a comment -

        What do you mean by "detecting resources"? As far as I know, maven doesn't do anything with respect to resources when it is dealing with dependencies.

        As far as the location of the local maven repository goes, maven doesn't have to be installed in order to determine where a local repository would be. Just use the default, which is $

        {user.home}/.maven/repository. I would be surprised if the majority of maven users use something other than this. You could even add a property (say maven.ant.local.repo) to the maven ant plugin that would allow you to override this default value.

        Even if a user of the generated ant script were to migrate to maven and use a different location for their local maven repository, at least while they use the ant script they would avoid re-downloading all dependencies after doing a 'clean' (which deletes target/lib).

        I don't see any harm in using ${user.home}

        /.maven/repository instead of target/lib, and users of the ant script avoid the annoyance of re-downloading dependencies after a 'clean'.

        Show
        Chuck Daniels added a comment - What do you mean by "detecting resources"? As far as I know, maven doesn't do anything with respect to resources when it is dealing with dependencies. As far as the location of the local maven repository goes, maven doesn't have to be installed in order to determine where a local repository would be. Just use the default, which is $ {user.home}/.maven/repository. I would be surprised if the majority of maven users use something other than this. You could even add a property (say maven.ant.local.repo) to the maven ant plugin that would allow you to override this default value. Even if a user of the generated ant script were to migrate to maven and use a different location for their local maven repository, at least while they use the ant script they would avoid re-downloading all dependencies after doing a 'clean' (which deletes target/lib). I don't see any harm in using ${user.home} /.maven/repository instead of target/lib, and users of the ant script avoid the annoyance of re-downloading dependencies after a 'clean'.
        Hide
        Arnaud Heritier added a comment -

        Fixed.

        Show
        Arnaud Heritier added a comment - Fixed.

          People

          • Assignee:
            Arnaud Heritier
            Reporter:
            Chuck Daniels
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: