You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by Bourzeix, Hervé <He...@Genesys.com> on 2007/09/29 17:30:38 UTC

uptodate and ivy

Hello,

I am looking into making my build process a liitle bit smarter and avoid module build if not necessary. I use the uptodate task. My issue is how to handle dependency changes as I am not retrieving them, I am referencing dependency using cachepath. Is someone has a solution to build only if a dependency changed.

regards,

Hervé

Re: uptodate and ivy

Posted by Gilles Scokart <gs...@gmail.com>.
I guess you could also compare resolution report files.

Gilles

2007/10/1, Bourzeix, Hervé <He...@genesys.com>:
>
> Hello, I found a solution :
>
>         <target name="pre_build">
>                 <ivy:cachepath pathid="ivy.allconfs" conf="*" />
>                 <pathconvert targetos="unix" property="classpath.converted"
> refid="ivy.allconfs" />
>                 <property file="${dist.dir}/.uptodate" />
>                 <condition property="build.notRequired">
>                         <and>
>                                 <equals arg1="${classpath.persisted}"
> arg2="${classpath.converted}" />
>                                 <uptodate targetfile="${dist.dir
> }/.uptodate">
>                                         <srcfiles dir="${src.dir}"
> includes="**/*" />
>                                         <srcfiles dir="${test.dir}"
> includes="**/*" />
>                                         <srcfiles dir="${config.dir}"
> includes="**/*" />
>                                 </uptodate>
>                         </and>
>                 </condition>
>                 <condition property="_build.isBuildRequired" value="Build
> is NOT required" else="Build is required">
>                         <isset property="build.notRequired" />
>                 </condition>
>         </target>
>
>
> at the end of my build process :
>
>
>         <target name="post_build">
>                 <echo file="${dist.dir}/.uptodate">
> classpath.persisted=${classpath.converted}</echo>
>                 <touch file="${dist.dir}/.uptodate" />
>         </target>
>
>
>
> then i use the if/unless target attribute set to build.notRequired.
>
>
> hope it would help someone else...
>
>
> -----Original Message-----
> From: Bourzeix, Hervé [mailto:Herve.Bourzeix@Genesys.com]
> Sent: Saturday, September 29, 2007 5:31 PM
> To: ivy-user@incubator.apache.org
> Subject: uptodate and ivy
>
>
> Hello,
>
> I am looking into making my build process a liitle bit smarter and avoid
> module build if not necessary. I use the uptodate task. My issue is how to
> handle dependency changes as I am not retrieving them, I am referencing
> dependency using cachepath. Is someone has a solution to build only if a
> dependency changed.
>
> regards,
>
> Hervé
>



-- 
Gilles SCOKART

RE: uptodate and ivy

Posted by Bourzeix, Hervé <He...@Genesys.com>.
Hello, I found a solution :

	<target name="pre_build">
		<ivy:cachepath pathid="ivy.allconfs" conf="*" />
		<pathconvert targetos="unix" property="classpath.converted" refid="ivy.allconfs" />
		<property file="${dist.dir}/.uptodate" />
		<condition property="build.notRequired">
			<and>
				<equals arg1="${classpath.persisted}" arg2="${classpath.converted}" />
				<uptodate targetfile="${dist.dir}/.uptodate">
					<srcfiles dir="${src.dir}" includes="**/*" />
					<srcfiles dir="${test.dir}" includes="**/*" />
					<srcfiles dir="${config.dir}" includes="**/*" />
				</uptodate>
			</and>
		</condition>
		<condition property="_build.isBuildRequired" value="Build is NOT required" else="Build is required">
			<isset property="build.notRequired" />
		</condition>
	</target>


at the end of my build process :


	<target name="post_build">
		<echo file="${dist.dir}/.uptodate">classpath.persisted=${classpath.converted}</echo>
		<touch file="${dist.dir}/.uptodate" />
	</target>



then i use the if/unless target attribute set to build.notRequired.


hope it would help someone else...


-----Original Message-----
From: Bourzeix, Hervé [mailto:Herve.Bourzeix@Genesys.com]
Sent: Saturday, September 29, 2007 5:31 PM
To: ivy-user@incubator.apache.org
Subject: uptodate and ivy 


Hello,

I am looking into making my build process a liitle bit smarter and avoid module build if not necessary. I use the uptodate task. My issue is how to handle dependency changes as I am not retrieving them, I am referencing dependency using cachepath. Is someone has a solution to build only if a dependency changed.

regards,

Hervé