Ivy Plugin

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Ivy Plugin

Martin Ficker
Hi,

yesterday I asked for help on ivy and hudson at the user mailing list
and was pointed to the existing ivy plugin. The plugin seems to be at
an  early stage, the dependency resolving is not working at all and
seems to be quite wired. But it is still a starting point and I think I
can adjust it to my needs with a little help. Here are a couple of
questions:

1. How would I submit changes to that plugin? Is there person
responsible for this specific plugin?  Is it possible to get  a cvs account?
2. The plugin depends on (Jayasoft) Ivy 1.4. I  would  like to move this
dependency to (Apache) Ivy 2.0.0-alpha2.
     It would be a nice to have this version of ivy in the repository
http://download.java.net/maven/2/org/jvnet/hudson/ivy/...
    Is it possible to add it?
3.  config.jelly of the plugin contains:
  <f:entry title="Ivy file">
    <input class="setting-input validated" name="ivy_file"
         type="text" value="${instance.ivyFile}"
         
checkUrl="'../../publisher/IvyBuildTrigger/checkIvyFile?value='+escape(this.value)"/>
  </f:entry>
 The relativ "checkUrl" is  a bug, since it does not work when the
Project is acces from a within a group/Tab, since the urls for config
differ:
http://localhost:8080/view/Group1/job/job1/configure
http://localhost:8080/job/job1/configure
But what's the correct way to reference the  publisher?

4. The plugin depends on ivy file for reach project. Currently this is
configured using an absolute path. I would like to reference it relativ
to the projects working directory. Unfortunately this is harder than I
would have imagend. On my way I found to problems:
a) Within the Plugins Implementation of Descriptor<Publisher> there
exist a method checkIvyFile (referenced from the config.jelly) How can I
get a reference to the current project in this context?
b) If I had a reference to the project, I could get the Workspace via
getWorspace(). This is an instance of FilePath. How can I use this
equivalent to:
Java.io.File ws;
...
new Java.io.File (ws, "ivy.xml").isFile()


Thanks for you patience,

Best regards,

Martin


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Ivy Plugin

Nicolas Lalevée-2
Le mardi 20 novembre 2007, M. Ficker a écrit :

> Hi,
>
> yesterday I asked for help on ivy and hudson at the user mailing list
> and was pointed to the existing ivy plugin. The plugin seems to be at
> an  early stage, the dependency resolving is not working at all and
> seems to be quite wired. But it is still a starting point and I think I
> can adjust it to my needs with a little help. Here are a couple of
> questions:
>
> 1. How would I submit changes to that plugin? Is there person
> responsible for this specific plugin?  Is it possible to get  a cvs
> account?

I don't know about the responsabilities, but I provided this first version of
this plugin.
About cvs account, I don't know exactly what are the politics here, Kohsuke
might answer.

> 2. The plugin depends on (Jayasoft) Ivy 1.4. I  would  like to
> move this dependency to (Apache) Ivy 2.0.0-alpha2.
>      It would be a nice to have this version of ivy in the repository
> http://download.java.net/maven/2/org/jvnet/hudson/ivy/...
>     Is it possible to add it?

I think it will, but then about the plugin, we will have to different released
plugin : one with the stable version of ivy, another one with the latest.
I am very newbee with maven, I don't know how far it is possible to maintain a
such configuration.

> 3.  config.jelly of the plugin contains:
>   <f:entry title="Ivy file">
>     <input class="setting-input validated" name="ivy_file"
>          type="text" value="${instance.ivyFile}"
>
> checkUrl="'../../publisher/IvyBuildTrigger/checkIvyFile?value='+escape(this
>.value)"/> </f:entry>
>  The relativ "checkUrl" is  a bug, since it does not work when the
> Project is acces from a within a group/Tab, since the urls for config
> differ:
> http://localhost:8080/view/Group1/job/job1/configure
> http://localhost:8080/job/job1/configure
> But what's the correct way to reference the  publisher?

OK, mistake of mine, I should have used this :
${rootURL}/publisher/

> 4. The plugin depends on ivy file for reach project. Currently this is
> configured using an absolute path.

oops, I forgot that.

> I would like to reference it relativ
> to the projects working directory. Unfortunately this is harder than I
> would have imagend. On my way I found to problems:
> a) Within the Plugins Implementation of Descriptor<Publisher> there
> exist a method checkIvyFile (referenced from the config.jelly) How can I
> get a reference to the current project in this context?
> b) If I had a reference to the project, I could get the Workspace via
> getWorspace(). This is an instance of FilePath. How can I use this
> equivalent to:
> Java.io.File ws;
> ...
> new Java.io.File (ws, "ivy.xml").isFile()

It seems that FormFieldValidator.WorkspaceDirectory is nearly what is needed
here. We just have to improve it so it can also check for files.

I aslo have locally a patch that will make the ivy plugin populate the
dependency graph, so the user will able to view the upstream and downstream
projects computed by ivy. As I am new to maven and cvs, I have difficulties
to make it work, but the work is in progress ;)

cheers,
Nicolas

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Ivy Plugin

stephenconnolly
On Nov 21, 2007 10:58 AM, Nicolas Lalevée
<[hidden email]> wrote:

> Le mardi 20 novembre 2007, M. Ficker a écrit:
> > Hi,
> >
> > yesterday I asked for help on ivy and hudson at the user mailing list
> > and was pointed to the existing ivy plugin. The plugin seems to be at
> > an  early stage, the dependency resolving is not working at all and
> > seems to be quite wired. But it is still a starting point and I think I
> > can adjust it to my needs with a little help. Here are a couple of
> > questions:
> >
> > 1. How would I submit changes to that plugin? Is there person
> > responsible for this specific plugin?  Is it possible to get  a cvs
> > account?
>
> I don't know about the responsabilities, but I provided this first version of
> this plugin.
> About cvs account, I don't know exactly what are the politics here, Kohsuke
> might answer.

Kohsuke seems to have a liberal policy.  Just request developer role
on the project, and email Kohsuke to let him know who you are so that
he can pick your access request out of the bag of requests.

If he's started to implement a tighter policy, I'd prepare a patch or
two for submission, or develop a plugin

-Stephen

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Ivy Plugin

Jean-Baptiste Quenot
In reply to this post by Nicolas Lalevée-2
2007/11/21, Nicolas Lalevée <[hidden email]>:

>
> > 2. The plugin depends on (Jayasoft) Ivy 1.4. I  would  like to
> > move this dependency to (Apache) Ivy 2.0.0-alpha2.
> >      It would be a nice to have this version of ivy in the repository
> > http://download.java.net/maven/2/org/jvnet/hudson/ivy/...
> >     Is it possible to add it?
>
> I think it will, but then about the plugin, we will have to different released
> plugin : one with the stable version of ivy, another one with the latest.
> I am very newbee with maven, I don't know how far it is possible to maintain a
> such configuration.

Don't bother to maintain multiple configurations.  If I were you I
would just use the latest version, as it aims to be
backwards-compatible.
--
Jean-Baptiste Quenot
http://caraldi.com/jbq/blog/

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Ivy Plugin

Kohsuke Kawaguchi
Administrator
In reply to this post by Martin Ficker
2007/11/20, M. Ficker <[hidden email]>:
> Hi,
>
> yesterday I asked for help on ivy and hudson at the user mailing list
> and was pointed to the existing ivy plugin. The plugin seems to be at
> an  early stage, the dependency resolving is not working at all and
> seems to be quite wired. But it is still a starting point and I think I
> can adjust it to my needs with a little help. Here are a couple of
> questions:

Wonderful!

> 1. How would I submit changes to that plugin? Is there person
> responsible for this specific plugin?  Is it possible to get  a cvs account?

I'd like you and Nicolas to talk and arrange the set up about how to
go about changes. This is plugin-by-plugin basis, and I'd like
existing developers to feel comfortable. Some do this by first
creating a branch, some do this by just committing and have existing
developers review, some do this by sending patches. I hope you two can
estimate the amount of changes and figure out the reasonabel way to go
about this.

In the mean time, I can assign the commit access to you, so let me
know your java.net ID. But again, please talk to Nicolas before making
a commit.

Maybe it's time to capture this in Wiki.

--
Kohsuke Kawaguchi

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Ivy Plugin

Kohsuke Kawaguchi
Administrator
In reply to this post by Jean-Baptiste Quenot
2007/11/21, Jean-Baptiste Quenot <[hidden email]>:

> 2007/11/21, Nicolas Lalevée <[hidden email]>:
> >
> > > 2. The plugin depends on (Jayasoft) Ivy 1.4. I  would  like to
> > > move this dependency to (Apache) Ivy 2.0.0-alpha2.
> > >      It would be a nice to have this version of ivy in the repository
> > > http://download.java.net/maven/2/org/jvnet/hudson/ivy/...
> > >     Is it possible to add it?
> >
> > I think it will, but then about the plugin, we will have to different released
> > plugin : one with the stable version of ivy, another one with the latest.
> > I am very newbee with maven, I don't know how far it is possible to maintain a
> > such configuration.
>
> Don't bother to maintain multiple configurations.  If I were you I
> would just use the latest version, as it aims to be
> backwards-compatible.

I don't know much about Ivy, so mine is not a comment about whether
the interface with the old version should be maintained. But if you
do, perhaps using Groovy to interface with Ivy inside the plugin would
let you avoid dealing with two similar classes in different packages.

--
Kohsuke Kawaguchi

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Ivy Plugin

Martin Ficker
In reply to this post by Nicolas Lalevée-2
Hello,

Nicolas Lalevée schrieb:
<snip>

>> 2. The plugin depends on (Jayasoft) Ivy 1.4. I  would  like to
>> move this dependency to (Apache) Ivy 2.0.0-alpha2.
>>      It would be a nice to have this version of ivy in the repository
>> http://download.java.net/maven/2/org/jvnet/hudson/ivy/...
>>     Is it possible to add it?
>>    
>
> I think it will, but then about the plugin, we will have to different released
> plugin : one with the stable version of ivy, another one with the latest.
> I am very newbee with maven, I don't know how far it is possible to maintain a
> such configuration.
>  
I just noticed I don't actually use ivy 2.x features at the moment. It's
just  about renaming ivysettings to conf.  I don't have many
ivy files at the moment, so it not a problem for me.
I will defer this issue until a stable 2.x release exists. We could than
move the HEAD to this, since Ivy aims to be
upward  compatible.
<snip>
> OK, mistake of mine, I should have used this :
> ${rootURL}/publisher/
>  
Works fine. I will use this to test my cvs accout as soon as I have on :-).

>> 4. The plugin depends on ivy file for reach project. Currently this is
>> configured using an absolute path.
>>    
>
> oops, I forgot that.
>
>  
>> I would like to reference it relativ
>> to the projects working directory. Unfortunately this is harder than I
>> would have imagend. On my way I found to problems:
>> a) Within the Plugins Implementation of Descriptor<Publisher> there
>> exist a method checkIvyFile (referenced from the config.jelly) How can I
>> get a reference to the current project in this context?
>> b) If I had a reference to the project, I could get the Workspace via
>> getWorspace(). This is an instance of FilePath. How can I use this
>> equivalent to:
>> Java.io.File ws;
>> ...
>> new Java.io.File (ws, "ivy.xml").isFile()
>>    
>
> It seems that FormFieldValidator.WorkspaceDirectory is nearly what is needed
> here. We just have to improve it so it can also check for files.
>  
yes. I've found the FormFieldValidator and tried some ideas. But it
seems request.getParameter ("job") does always return null, leading to a
NPO.
I should say that I'm not used to web or client/server development. So
this Jelly - Java Communcation looks like some magic to me.
> I aslo have locally a patch that will make the ivy plugin populate the
> dependency graph, so the user will able to view the upstream and downstream
> projects computed by ivy. As I am new to maven and cvs, I have difficulties
> to make it work, but the work is in progress ;)
>  
I would be very interested to plug ivy dependencies into the normal
hudson dependency graph. How do you achieve this? What I can see is,
that the Graph is filled in Project.buildDependecyGraph. But in the
current implementation only the Publisher "BuildTrigger" is taken in
account. I would like to see a more open architecture here,  to allow a
plugin (like the ivy one) to add dependencies without having to override
(Abstract)Project (like MavenModule does).
This would basically mean to separate the "how to find dependencies"
from the "when to trigger which  build, once you know the dependencies".
The second part is not trivial as current discussion at the dev.
Mailinglist shows. It would be a good Idea to utilize a common behavior
here, rather than writing a own trigger for ivy (And each other dep.
Management plugin to come up). What do you think?

> cheers,
> Nicolas
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
>  
Best regards,

Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Ivy Plugin

Nicolas Lalevée-2
Le mercredi 21 novembre 2007, M. Ficker a écrit :

> Hello,
>
> Nicolas Lalevée schrieb:
> <snip>
>
> >> 2. The plugin depends on (Jayasoft) Ivy 1.4. I  would  like to
> >> move this dependency to (Apache) Ivy 2.0.0-alpha2.
> >>      It would be a nice to have this version of ivy in the repository
> >> http://download.java.net/maven/2/org/jvnet/hudson/ivy/...
> >>     Is it possible to add it?
> >
> > I think it will, but then about the plugin, we will have to different
> > released plugin : one with the stable version of ivy, another one with
> > the latest. I am very newbee with maven, I don't know how far it is
> > possible to maintain a such configuration.
>
> I just noticed I don't actually use ivy 2.x features at the moment. It's
> just  about renaming ivysettings to conf.  I don't have many
> ivy files at the moment, so it not a problem for me.
> I will defer this issue until a stable 2.x release exists. We could than
> move the HEAD to this, since Ivy aims to be
> upward  compatible.

good, sounds good to me.

> <snip>
>
> > OK, mistake of mine, I should have used this :
> > ${rootURL}/publisher/
>
> Works fine. I will use this to test my cvs accout as soon as I have on :-).
>
> >> 4. The plugin depends on ivy file for reach project. Currently this is
> >> configured using an absolute path.
> >
> > oops, I forgot that.
> >
> >> I would like to reference it relativ
> >> to the projects working directory. Unfortunately this is harder than I
> >> would have imagend. On my way I found to problems:
> >> a) Within the Plugins Implementation of Descriptor<Publisher> there
> >> exist a method checkIvyFile (referenced from the config.jelly) How can I
> >> get a reference to the current project in this context?
> >> b) If I had a reference to the project, I could get the Workspace via
> >> getWorspace(). This is an instance of FilePath. How can I use this
> >> equivalent to:
> >> Java.io.File ws;
> >> ...
> >> new Java.io.File (ws, "ivy.xml").isFile()
> >
> > It seems that FormFieldValidator.WorkspaceDirectory is nearly what is
> > needed here. We just have to improve it so it can also check for files.
>
> yes. I've found the FormFieldValidator and tried some ideas. But it
> seems request.getParameter ("job") does always return null, leading to a
> NPO.
> I should say that I'm not used to web or client/server development. So
> this Jelly - Java Communcation looks like some magic to me.

It should look like the configuration of the JavadocArchiver. See
JavadocArchiver/config.jelly. There is :

checkUrl="'${rootURL}/publisher/JavadocArchiver/check?job=${it.fullName}&amp;value='+escape(this.value)"/>

> > I aslo have locally a patch that will make the ivy plugin populate the
> > dependency graph, so the user will able to view the upstream and
> > downstream projects computed by ivy. As I am new to maven and cvs, I have
> > difficulties to make it work, but the work is in progress ;)
>
> I would be very interested to plug ivy dependencies into the normal
> hudson dependency graph. How do you achieve this? What I can see is,
> that the Graph is filled in Project.buildDependecyGraph. But in the
> current implementation only the Publisher "BuildTrigger" is taken in
> account. I would like to see a more open architecture here,  to allow a
> plugin (like the ivy one) to add dependencies without having to override
> (Abstract)Project (like MavenModule does).
> This would basically mean to separate the "how to find dependencies"
> from the "when to trigger which  build, once you know the dependencies".
> The second part is not trivial as current discussion at the dev.
> Mailinglist shows. It would be a good Idea to utilize a common behavior
> here, rather than writing a own trigger for ivy (And each other dep.
> Management plugin to come up). What do you think?

exactly. I finally did a patch :
https://hudson.dev.java.net/issues/show_bug.cgi?id=1032

cheers,
Nicolas

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]