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 "John Gill (JIRA)" <ji...@apache.org> on 2007/09/25 13:25:51 UTC

[jira] Created: (IVY-609) Add a new trigger event to ivysettings what will be called immediately.

Add a new trigger event to ivysettings what will be called immediately.
-----------------------------------------------------------------------

                 Key: IVY-609
                 URL: https://issues.apache.org/jira/browse/IVY-609
             Project: Ivy
          Issue Type: New Feature
          Components: Core
    Affects Versions: 2.0.0-alpha-2
            Reporter: John Gill


h3. Use Case
In our legacy build system, we have an ant file which has a series of property set in it which specify the versions of the dependencies in it. Basically, something like this:

{code:xml|title=depends.xml}
<project>
    <property name="projectA" value="1.2.3"/>
    <property name="projectB" value="4.5.6"/>
</project>
{code}

Unfortunately, these properties cannot be used in the ivy settings, as the ivy settings only supports reading of properties files via the <properties/> element.

What is needed is a new type of ivy trigger which is called immediately (as soon as it is defined) which can be used to call an ANT target which in my case can be used to read in our depends.xml and  convert it to a properties file.

It is suggested that this new type of trigger event be called "*now*".

h3. Example

{code:xml|title=ivysettings.xml}
<ivysettings>
    <triggers>
        <ant-build antfile="${ivy.settings.dir}/build.xml" target="make-ivy-properties" event="now"/>
        <properties file="ivy.properties" override="true"/>
    </triggers>
</ivysettings>
{code}

{code:xml|title=build.xml}
<project name="projectX">
    <target name="make-ivy-properties">
        <copy file="depends.xml" tofile="ivy.properties">
            <filterchain>
                <replaceregex pattern='&ltproperty="(.*)" value="(.*)"' replace="\1=\2" flags="gi"/>
            </filterchain>
        </copy>
    <target>
</project>
{code}

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


[jira] Updated: (IVY-609) Add a new trigger event to ivysettings that will be called immediately.

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

John Gill updated IVY-609:
--------------------------

    Summary: Add a new trigger event to ivysettings that will be called immediately.  (was: Add a new trigger event to ivysettings what will be called immediately.)

> Add a new trigger event to ivysettings that will be called immediately.
> -----------------------------------------------------------------------
>
>                 Key: IVY-609
>                 URL: https://issues.apache.org/jira/browse/IVY-609
>             Project: Ivy
>          Issue Type: New Feature
>          Components: Core
>    Affects Versions: 2.0.0-alpha-2
>            Reporter: John Gill
>
> h3. Use Case
> In our legacy build system, we have an ant file which has a series of property set in it which specify the versions of the dependencies in it. Basically, something like this:
> {code:xml|title=depends.xml}
> <project>
>     <property name="projectA" value="1.2.3"/>
>     <property name="projectB" value="4.5.6"/>
> </project>
> {code}
> Unfortunately, these properties cannot be used in the ivy settings, as the ivy settings only supports reading of properties files via the <properties/> element.
> What is needed is a new type of ivy trigger which is called immediately (as soon as it is defined) which can be used to call an ANT target which in my case can be used to read in our depends.xml and  convert it to a properties file.
> It is suggested that this new type of trigger event be called "*now*".
> h3. Example
> {code:xml|title=ivysettings.xml}
> <ivysettings>
>     <triggers>
>         <ant-build antfile="${ivy.settings.dir}/build.xml" target="make-ivy-properties" event="now"/>
>         <properties file="ivy.properties" override="true"/>
>     </triggers>
> </ivysettings>
> {code}
> {code:xml|title=build.xml}
> <project name="projectX">
>     <target name="make-ivy-properties">
>         <copy file="depends.xml" tofile="ivy.properties">
>             <filterchain>
>                 <replaceregex pattern='&ltproperty="(.*)" value="(.*)"' replace="\1=\2" flags="gi"/>
>             </filterchain>
>         </copy>
>     <target>
> </project>
> {code}

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