You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-commits@incubator.apache.org by "Iain Coulter (JIRA)" <ji...@apache.org> on 2006/12/19 12:45:24 UTC

[jira] Created: (IVY-357) Update -Automatically invoke Any build scripts for dependencies

Update -Automatically invoke Any build scripts for dependencies
---------------------------------------------------------------

                 Key: IVY-357
                 URL: http://issues.apache.org/jira/browse/IVY-357
             Project: Ivy
          Issue Type: New Feature
          Components: Ant
            Reporter: Iain Coulter
         Assigned To: Xavier Hanin
             Fix For: 1.4-RC1


See this forum thread for more details: http://jayasoft.org/node/218
The following is from one message in that thread:
A resolver that wraps another resolver but also can invoke an ant build script for a dependency if an Ant script is available. The build script would be invoked at most once per build for each dependency. Something like this:
1. Need latest version for dependency "A".
2. Is there an Ant script for dependency "A"?
- If yes: invoke script if it has not yet been invoked for this build
3. Call wrapped resolver to actually retrieve the published artifact(s).

Note: I don't think this would apply if a specific version is being referenced - only if something like "test.integration" is being referenced?
The trick then would be to figure out if a) a dependency has an Ant build script, b) where the script is located, and c) what target to call on the script.
Then, all I do is tell Ivy to resolve in my main Ant build and it will do the rest to ensure that all my dependencies are up-to-date.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (IVY-357) Update -Automatically invoke Any build scripts for dependencies

Posted by "Maarten Coene (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/IVY-357?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Maarten Coene updated IVY-357:
------------------------------

        Fix Version/s:     (was: 1.4-RC1)
    Affects Version/s: 1.4-RC1

Switched Affected/Fixed versions...

> Update -Automatically invoke Any build scripts for dependencies
> ---------------------------------------------------------------
>
>                 Key: IVY-357
>                 URL: https://issues.apache.org/jira/browse/IVY-357
>             Project: Ivy
>          Issue Type: New Feature
>          Components: Ant
>    Affects Versions: 1.4-RC1
>            Reporter: Iain Coulter
>            Assignee: Xavier Hanin
>         Attachments: ZipUtil.java
>
>
> See this forum thread for more details: http://jayasoft.org/node/218
> The following is from one message in that thread:
> A resolver that wraps another resolver but also can invoke an ant build script for a dependency if an Ant script is available. The build script would be invoked at most once per build for each dependency. Something like this:
> 1. Need latest version for dependency "A".
> 2. Is there an Ant script for dependency "A"?
> - If yes: invoke script if it has not yet been invoked for this build
> 3. Call wrapped resolver to actually retrieve the published artifact(s).
> Note: I don't think this would apply if a specific version is being referenced - only if something like "test.integration" is being referenced?
> The trick then would be to figure out if a) a dependency has an Ant build script, b) where the script is located, and c) what target to call on the script.
> Then, all I do is tell Ivy to resolve in my main Ant build and it will do the rest to ensure that all my dependencies are up-to-date.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (IVY-357) Update -Automatically invoke Any build scripts for dependencies

Posted by "Iain Coulter (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/IVY-357?page=comments#action_12459625 ] 
            
Iain Coulter commented on IVY-357:
----------------------------------

This is only half fixed in my opinion, I've only just started using Ivy but did create the following setup.  Module A has a zip file which I can set to automatically unzip during the resolve but any dependent zips do not get unzipped.

Would it be possible to create a trigger for retrieve so that when I do a retrieve I can invoke an ant task (like is available for resolve) and also for any dependencies (ie retrieve module A and dependency B, both are zips so using a trigger for zip files both will be unzipped to a location of my choice)

> Update -Automatically invoke Any build scripts for dependencies
> ---------------------------------------------------------------
>
>                 Key: IVY-357
>                 URL: http://issues.apache.org/jira/browse/IVY-357
>             Project: Ivy
>          Issue Type: New Feature
>          Components: Ant
>            Reporter: Iain Coulter
>         Assigned To: Xavier Hanin
>             Fix For: 1.4-RC1
>
>
> See this forum thread for more details: http://jayasoft.org/node/218
> The following is from one message in that thread:
> A resolver that wraps another resolver but also can invoke an ant build script for a dependency if an Ant script is available. The build script would be invoked at most once per build for each dependency. Something like this:
> 1. Need latest version for dependency "A".
> 2. Is there an Ant script for dependency "A"?
> - If yes: invoke script if it has not yet been invoked for this build
> 3. Call wrapped resolver to actually retrieve the published artifact(s).
> Note: I don't think this would apply if a specific version is being referenced - only if something like "test.integration" is being referenced?
> The trick then would be to figure out if a) a dependency has an Ant build script, b) where the script is located, and c) what target to call on the script.
> Then, all I do is tell Ivy to resolve in my main Ant build and it will do the rest to ensure that all my dependencies are up-to-date.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (IVY-357) Update -Automatically invoke Any build scripts for dependencies

Posted by "Iain Coulter (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IVY-357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12463532 ] 

Iain Coulter commented on IVY-357:
----------------------------------

I've created a partial fix for this.   This doesn't currently use an ant  task but instead modifies the retrieve code to handle a special "unzip" artifact type.   When a file of this type is encountered it is unzipped to the specified location instead of copying the file, this also follows for dependencies which are also of type unzip.

This is a patch from the 1.4.1 code base.

96a97
> import fr.jayasoft.ivy.util.ZipUtil;
1957c1958,1963
<                     if (!_checkUpToDate || !upToDate(archive, destFile)) {
---
>                     if ("unzip".equals(artifact.getType())) {
>                       Message.verbose("\t\tto and unzipping"+destFile.getParent());
>                       ZipUtil.unzip(archive,new File(destFile.getParent()), false);
>                        
>                     }
>                     else if (!_checkUpToDate || !upToDate(archive, destFile)) {

Also attached to this issue is ZipUtil.java which implements ZipUtil class referenced in the above code

> Update -Automatically invoke Any build scripts for dependencies
> ---------------------------------------------------------------
>
>                 Key: IVY-357
>                 URL: https://issues.apache.org/jira/browse/IVY-357
>             Project: Ivy
>          Issue Type: New Feature
>          Components: Ant
>            Reporter: Iain Coulter
>         Assigned To: Xavier Hanin
>             Fix For: 1.4-RC1
>
>         Attachments: ZipUtil.java
>
>
> See this forum thread for more details: http://jayasoft.org/node/218
> The following is from one message in that thread:
> A resolver that wraps another resolver but also can invoke an ant build script for a dependency if an Ant script is available. The build script would be invoked at most once per build for each dependency. Something like this:
> 1. Need latest version for dependency "A".
> 2. Is there an Ant script for dependency "A"?
> - If yes: invoke script if it has not yet been invoked for this build
> 3. Call wrapped resolver to actually retrieve the published artifact(s).
> Note: I don't think this would apply if a specific version is being referenced - only if something like "test.integration" is being referenced?
> The trick then would be to figure out if a) a dependency has an Ant build script, b) where the script is located, and c) what target to call on the script.
> Then, all I do is tell Ivy to resolve in my main Ant build and it will do the rest to ensure that all my dependencies are up-to-date.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (IVY-357) Update -Automatically invoke Any build scripts for dependencies

Posted by "Iain Coulter (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/IVY-357?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Iain Coulter updated IVY-357:
-----------------------------

    Attachment: ZipUtil.java

> Update -Automatically invoke Any build scripts for dependencies
> ---------------------------------------------------------------
>
>                 Key: IVY-357
>                 URL: https://issues.apache.org/jira/browse/IVY-357
>             Project: Ivy
>          Issue Type: New Feature
>          Components: Ant
>            Reporter: Iain Coulter
>         Assigned To: Xavier Hanin
>             Fix For: 1.4-RC1
>
>         Attachments: ZipUtil.java
>
>
> See this forum thread for more details: http://jayasoft.org/node/218
> The following is from one message in that thread:
> A resolver that wraps another resolver but also can invoke an ant build script for a dependency if an Ant script is available. The build script would be invoked at most once per build for each dependency. Something like this:
> 1. Need latest version for dependency "A".
> 2. Is there an Ant script for dependency "A"?
> - If yes: invoke script if it has not yet been invoked for this build
> 3. Call wrapped resolver to actually retrieve the published artifact(s).
> Note: I don't think this would apply if a specific version is being referenced - only if something like "test.integration" is being referenced?
> The trick then would be to figure out if a) a dependency has an Ant build script, b) where the script is located, and c) what target to call on the script.
> Then, all I do is tell Ivy to resolve in my main Ant build and it will do the rest to ensure that all my dependencies are up-to-date.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira