You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Paul Hammant <pa...@hammant.org> on 2017/06/11 18:53:22 UTC
If anyone ever wanted to download a bunch of deps specified in a
Maven POM for an Ant build
If your 'current directory' is a Maven checkout, I have a Python script
that will download the dependencies into a libs/ folder. Well,
libs/compile/ libs/test/ etc - one subfolder per scope.
See here:
https://github.com/paul-hammant/spring-jetty-integrationtest-ant-example/blob/master/mavdl.py
I asked a question on Stackoverflow then answered it myself when my bash
skills fell short of a bash one-liner for the same: -
https://stackoverflow.com/questions/44390253
In the case of my demo project 'spring-jetty-integrationtest-ant-example' I
checked all the jars into Git again, like it was still the early 2000's :)
- Paul
Re: If anyone ever wanted to download a bunch of deps specified in a
Maven POM for an Ant build
Posted by Paul Hammant <pa...@hammant.org>.
Copy/pasta - https://issues.apache.org/jira/browse/MDEP-570:
There's a three command sequence to download an Maven artifact and all its
transitive deps to a directory:
mvn dependency:get
-Dartifact=org.eclipse.jetty:jetty-servlets:9.4.5.v20170502
-Dtransitive=true
mvn dependency:copy-dependencies -f
~/.m2/repository/org/eclipse/jetty/jetty-servlets/9.4.5.v20170502/jetty-servlets-9.4.5.v20170502.pom
-DoutputDirectory=$(pwd)/foo/ -DincludeScope=compile
cp ~/.m2/repository/org/eclipse/jetty/jetty-servlet/9.4.5.v20170502/jetty-servlet-9.4.5.v20170502.jar
foo/
- Paul
On Sun, Jun 11, 2017 at 3:30 PM, Thomas Broyer <t....@gmail.com> wrote:
> Wouldn't have dependency:copy-dependencies helped here rather than
> sed/grep/wget? (maybe not, devil is in the details and I just skimmed
> through your script)
> https://maven.apache.org/plugins/maven-dependency-
> plugin/copy-dependencies-mojo.html
>
> Le dim. 11 juin 2017 20:53, Paul Hammant <pa...@hammant.org> a écrit :
>
> > If your 'current directory' is a Maven checkout, I have a Python script
> > that will download the dependencies into a libs/ folder. Well,
> > libs/compile/ libs/test/ etc - one subfolder per scope.
> >
> > See here:
> >
> > https://github.com/paul-hammant/spring-jetty-
> integrationtest-ant-example/blob/master/mavdl.py
> >
> > I asked a question on Stackoverflow then answered it myself when my bash
> > skills fell short of a bash one-liner for the same: -
> > https://stackoverflow.com/questions/44390253
> >
> > In the case of my demo project 'spring-jetty-integrationtest-ant-example'
> I
> > checked all the jars into Git again, like it was still the early 2000's
> :)
> >
> > - Paul
> >
>
Re: If anyone ever wanted to download a bunch of deps specified in a
Maven POM for an Ant build
Posted by Paul Hammant <pa...@hammant.org>.
Copy/pasta - https://issues.apache.org/jira/browse/MDEP-570:
There's a three command sequence to download an Maven artifact and all its
transitive deps to a directory:
mvn dependency:get
-Dartifact=org.eclipse.jetty:jetty-servlets:9.4.5.v20170502
-Dtransitive=true
mvn dependency:copy-dependencies -f
~/.m2/repository/org/eclipse/jetty/jetty-servlets/9.4.5.v20170502/jetty-servlets-9.4.5.v20170502.pom
-DoutputDirectory=$(pwd)/foo/ -DincludeScope=compile
cp ~/.m2/repository/org/eclipse/jetty/jetty-servlet/9.4.5.v20170502/jetty-servlet-9.4.5.v20170502.jar
foo/
- Paul
On Sun, Jun 11, 2017 at 3:30 PM, Thomas Broyer <t....@gmail.com> wrote:
> Wouldn't have dependency:copy-dependencies helped here rather than
> sed/grep/wget? (maybe not, devil is in the details and I just skimmed
> through your script)
> https://maven.apache.org/plugins/maven-dependency-
> plugin/copy-dependencies-mojo.html
>
> Le dim. 11 juin 2017 20:53, Paul Hammant <pa...@hammant.org> a écrit :
>
> > If your 'current directory' is a Maven checkout, I have a Python script
> > that will download the dependencies into a libs/ folder. Well,
> > libs/compile/ libs/test/ etc - one subfolder per scope.
> >
> > See here:
> >
> > https://github.com/paul-hammant/spring-jetty-
> integrationtest-ant-example/blob/master/mavdl.py
> >
> > I asked a question on Stackoverflow then answered it myself when my bash
> > skills fell short of a bash one-liner for the same: -
> > https://stackoverflow.com/questions/44390253
> >
> > In the case of my demo project 'spring-jetty-integrationtest-ant-example'
> I
> > checked all the jars into Git again, like it was still the early 2000's
> :)
> >
> > - Paul
> >
>
Re: If anyone ever wanted to download a bunch of deps specified in a
Maven POM for an Ant build
Posted by Thomas Broyer <t....@gmail.com>.
Wouldn't have dependency:copy-dependencies helped here rather than
sed/grep/wget? (maybe not, devil is in the details and I just skimmed
through your script)
https://maven.apache.org/plugins/maven-dependency-plugin/copy-dependencies-mojo.html
Le dim. 11 juin 2017 20:53, Paul Hammant <pa...@hammant.org> a écrit :
> If your 'current directory' is a Maven checkout, I have a Python script
> that will download the dependencies into a libs/ folder. Well,
> libs/compile/ libs/test/ etc - one subfolder per scope.
>
> See here:
>
> https://github.com/paul-hammant/spring-jetty-integrationtest-ant-example/blob/master/mavdl.py
>
> I asked a question on Stackoverflow then answered it myself when my bash
> skills fell short of a bash one-liner for the same: -
> https://stackoverflow.com/questions/44390253
>
> In the case of my demo project 'spring-jetty-integrationtest-ant-example' I
> checked all the jars into Git again, like it was still the early 2000's :)
>
> - Paul
>
Re: If anyone ever wanted to download a bunch of deps specified in a
Maven POM for an Ant build
Posted by Paul Hammant <pa...@hammant.org>.
Looks good. My Google fu let me down!
On Mon, Jun 12, 2017 at 11:41 AM, Manfred Moser <ma...@simpligility.com>
wrote:
> Why not use the Maven Resolver (formerly Eclipse Aether) Ant Tasks?
>
> https://maven.apache.org/resolver-archives/resolver-ant-tasks-LATEST/
>
> Paul Hammant wrote on 2017-06-11 11:53:
>
> > If your 'current directory' is a Maven checkout, I have a Python script
> > that will download the dependencies into a libs/ folder. Well,
> > libs/compile/ libs/test/ etc - one subfolder per scope.
> >
> > See here:
> > https://github.com/paul-hammant/spring-jetty-
> integrationtest-ant-example/blob/master/mavdl.py
> >
> > I asked a question on Stackoverflow then answered it myself when my bash
> > skills fell short of a bash one-liner for the same: -
> > https://stackoverflow.com/questions/44390253
> >
> > In the case of my demo project 'spring-jetty-integrationtest-ant-example'
> I
> > checked all the jars into Git again, like it was still the early 2000's
> :)
> >
> > - Paul
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
Re: If anyone ever wanted to download a bunch of deps specified in a Maven POM for an Ant build
Posted by Manfred Moser <ma...@simpligility.com>.
Why not use the Maven Resolver (formerly Eclipse Aether) Ant Tasks?
https://maven.apache.org/resolver-archives/resolver-ant-tasks-LATEST/
Paul Hammant wrote on 2017-06-11 11:53:
> If your 'current directory' is a Maven checkout, I have a Python script
> that will download the dependencies into a libs/ folder. Well,
> libs/compile/ libs/test/ etc - one subfolder per scope.
>
> See here:
> https://github.com/paul-hammant/spring-jetty-integrationtest-ant-example/blob/master/mavdl.py
>
> I asked a question on Stackoverflow then answered it myself when my bash
> skills fell short of a bash one-liner for the same: -
> https://stackoverflow.com/questions/44390253
>
> In the case of my demo project 'spring-jetty-integrationtest-ant-example' I
> checked all the jars into Git again, like it was still the early 2000's :)
>
> - Paul
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: If anyone ever wanted to download a bunch of deps specified in a
Maven POM for an Ant build
Posted by Thomas Broyer <t....@gmail.com>.
Wouldn't have dependency:copy-dependencies helped here rather than
sed/grep/wget? (maybe not, devil is in the details and I just skimmed
through your script)
https://maven.apache.org/plugins/maven-dependency-plugin/copy-dependencies-mojo.html
Le dim. 11 juin 2017 20:53, Paul Hammant <pa...@hammant.org> a écrit :
> If your 'current directory' is a Maven checkout, I have a Python script
> that will download the dependencies into a libs/ folder. Well,
> libs/compile/ libs/test/ etc - one subfolder per scope.
>
> See here:
>
> https://github.com/paul-hammant/spring-jetty-integrationtest-ant-example/blob/master/mavdl.py
>
> I asked a question on Stackoverflow then answered it myself when my bash
> skills fell short of a bash one-liner for the same: -
> https://stackoverflow.com/questions/44390253
>
> In the case of my demo project 'spring-jetty-integrationtest-ant-example' I
> checked all the jars into Git again, like it was still the early 2000's :)
>
> - Paul
>