maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arnaud dufranne <>
Subject Re: Ant based plugin dependencies
Date Fri, 17 May 2013 11:30:07 GMT

Thanks for your answer.

I'll try to explain better what I am trying to do.

I have an artifact, say, com.mycompany.ant-build-utils containing ant
scripts that do some interaction with SCM an CI, that we need to use during
the build. Now, as you say, it is untarred manually on a shared drive and
called directly from a build script that is in every project.

So every project we have has a pom.xml, and a build.xml. The build.xml is
called either by maven via the ant plugin, or invoked directy from the
command line using ant for the particular task I am discussing.

What I would like to do, is to use the scripts that are in my
com.mycompany.ant-build-utils via maven, and I thought the best way to do
that was to create a plugin (I chose an ant-based plugin).

My plugin, say has a pom that will look like this :




  <name>CI plugin</name>






and has an ant mojo like this :

  <target name="refresh-job">
 Here we should call the ant script from ant-build-scripts

My problem is, as you see, to be able to fetch the ant-build-scripts when
the plugin is used from another project, and execute a target from it.

One solution I guess would be to explicitly call maven from my mojo to copy
and unpack the deps, but it is a solution I would like to avoid as it
breaks the standard maven process.

I hope my explanations were clear,

Thanks for your interest,


2013/5/17 Baptiste Mathus <>

> Hi,
> Not sure I understand what your issue is.
> Are you depending on some filesystem path?
> What's the displayed error?
> -- Baptiste
> Le 16 mai 2013 18:42, "arnaud dufranne" <> a écrit :
> > Hi,
> >
> > I am currently looking into writing an ant based maven plugin. My main
> > issue is that this plugin depends on an artifact (tar.gz in a company
> > repository) containing a few ant scripts, whose tasks should be run when
> > using the plugin.
> >
> > I declared the dependency in my plugin's pom.xml, and the plugin builds
> and
> > installs fine.
> >
> > When using the plugin from another project, the dependency to my ant
> > artifact is not pulled from the repository, so not visible from my ant
> > plugin.
> >
> > I have seen other discussions where the path to the scripts would be hard
> > coded in the plugin, but my goal is to keep my ant library nicely
> packaged
> > and to avoid this solution.
> >
> > Does anyone have any experience in doing that kind of things ?
> >
> > Thanks for you input,
> >
> > Arnaud
> >

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message