Re: Ant based plugin dependencies

2013-05-17 Thread arnaud dufranne
Hi,

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 com.mycompany.ci-plugin has a pom that will look like this :


  4.0.0

  com.mycompany
  ci-plugin
  1.0-SNAPSHOT

  maven-plugin

  CI plugin

  

  org.apache.maven
  maven-script-ant
  2.0.6


com.mycompany
ant-build-utils
1.0-SNAPSHOT

  

  

  

maven-plugin-plugin
2.5


  
org.apache.maven.plugin-tools
maven-plugin-tools-ant
2.5
  



  update-ci

  

  


and has an ant mojo like this :


  

 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,

Arnaud



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
> >
>


Re: Ant based plugin dependencies

2013-05-17 Thread 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
>


Re: ant based plugin

2006-08-24 Thread Dave Sowerby

Thanks for the response,

Unfortunately this wasn't the case, I tried using the plugin's
dependencies in the hope that they would be accessible - they weren't.

I gave up in the end and decided a java based plugin would be easier
to developer rather than fighting against the ant based plugin -
though I would love to see it up, running and fully functional.

Dave.

On 8/24/06, Brian E. Fox <[EMAIL PROTECTED]> wrote:

 I haven't written an ant plugin so I can't help you with the first
part. On the second question, the  tag can also take a
 tag and these dependencies will be added to the classpath
when your plugin executes.
http://maven.apache.org/ref/2.0.3-SNAPSHOT/maven-model/maven.html#class_
plugin


-Original Message-
From: Dave Sowerby [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 23, 2006 12:17 PM
To: users@maven.apache.org
Subject: ant based plugin

Hi All,

I have been using an antrun execution to generate some code whilst
prototyping a maven build system.  I want to make a generic ant plugin
to do this but had some issues in doing so.

First of, I couldn't see how to use the paths as allowed in antrun -
such as maven.compile.classpath, I eventually got it to work with a
custom ant task and setting a property of type java.util.List - not
ideal, I can deal with it until it's fixed in a release but is there any
tidier way to do it?

Secondly my maven-plugin-plugin usage in my ant maven-plugin has it's
own dependencies - a generic set that should always be used with this
plugin but I can't see how to access these - any ideas?

Thanks for your time in advance.

Dave.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Dave Sowerby MEng MBCS

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: ant based plugin

2006-08-24 Thread Brian E. Fox
 I haven't written an ant plugin so I can't help you with the first
part. On the second question, the  tag can also take a
 tag and these dependencies will be added to the classpath
when your plugin executes.
http://maven.apache.org/ref/2.0.3-SNAPSHOT/maven-model/maven.html#class_
plugin


-Original Message-
From: Dave Sowerby [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 23, 2006 12:17 PM
To: users@maven.apache.org
Subject: ant based plugin

Hi All,

I have been using an antrun execution to generate some code whilst
prototyping a maven build system.  I want to make a generic ant plugin
to do this but had some issues in doing so.

First of, I couldn't see how to use the paths as allowed in antrun -
such as maven.compile.classpath, I eventually got it to work with a
custom ant task and setting a property of type java.util.List - not
ideal, I can deal with it until it's fixed in a release but is there any
tidier way to do it?

Secondly my maven-plugin-plugin usage in my ant maven-plugin has it's
own dependencies - a generic set that should always be used with this
plugin but I can't see how to access these - any ideas?

Thanks for your time in advance.

Dave.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]