Re: Want something like "failonerror" for artifactspublisher

Doug Breaux <[email protected]>
Newsgroups gmane.comp.java.cruise-control.user
Message-ID <[email protected]>
Thanks, I'm taking the same approach now, and we'll see if the it fails when 
the copy fails. Fingers crossed.

For future reference, here's what I've added to my config.xml:

<plugin name="antpublisher" anthome="apache-ant-1.7.0" 
antWorkingDir="${buildProjectDir}" target="ccPublish"/>

<antpublisher>
	<property name="publishDest" value="${artifactDir}"/>
	<property name="publishSource" 
value="${projectsRoot}/${project.name}/target/resources"/>
	<property name="publishInclude" value="*.ear"/>
</antpublisher>

And build.xml:

<!-- default if not specified -->
<property name="publishInclude" value="**/*"/>

<target name="ccPublish">
	<copy todir="${publishDest}/${projectname}/${cctimestamp}">
		<fileset dir="${publishSource}">
			<include name="${publishInclude}"/>
		</fileset>
	</copy>
</target>



On 7/26/2010 2:02 PM, Marc W. wrote:
> I found myself replacing my antpublisher tasks with an Ant script called by
> antpublisher.  I simply used the passed property, cctimestamp, to locate the
> proper artifact directory within Ant.
>
> I'm currently working on getting Ant's output logged (or copied) to the
> appropriate build's artifacts directory though.
>
> HTH,
> -Marc
>
>
> On Mon, Jul 26, 2010 at 11:50, Doug Breaux <[email protected]
> <mailto:[email protected]>> wrote:
>
>     So any advice/ideas here? I still need to see a CC build failure if the
>     artifactspublisher can't find its file(s) to copy.
>
>     On 5/26/2010 8:33 AM, [email protected]
>     <mailto:[email protected]> wrote:
>      > I just finished dealing with a similar problem with the CVS
>     bootstrapper. The
>      > CVS update generated some warnings, which caused the process to return a 1
>      > instead of 0. This prevented the subsequent ant build from running. Since
>      > there is no notification tied to the CVS failure, this problem went
>     unnoticed
>      > for over a week.
>      >
>      > Joel
>      >
>      > -----Original Message-----
>      > From: "Assaf Lavie" <[email protected] <mailto:[email protected]>>
>      > Sent: Wednesday, May 26, 2010 2:44am
>      > To: [email protected]
>     <mailto:[email protected]>
>      > Subject: Re: [Cruisecontrol-user] Want something like "failonerror" for
>      > artifactspublisher
>      >
>      > What sort of build task isn't failing on error? I'm aware of such a problem
>      > with Ant, for example, but it's fixable.
>      >
>      > On Mon, May 24, 2010 at 8:38 PM, Doug Breaux
>     <[email protected] <mailto:[email protected]>
>      > <mailto:[email protected]
>     <mailto:[email protected]>>> wrote:
>      >
>      >     Is there any way to get CC to consider the build failed if the
>      >     artifactspublisher fails? It's logging an error about not being
>     able to copy
>      >     the file in question, but CC still says the build was successful.
>      >
>      >     (I have some build-type tasks that are not causing the build to
>     fail when they
>      >     fail, despite failOnError="true", and it seems one of the simplest
>     ways to
>      >     catch all of them is to report a failure when the artifact doesn't
>     exist.)
>      >
>      >     Doug
>      >
>


------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share 
of $1 Million in cash or HP Products. Visit us here for more details:
http://ad.doubleclick.net/clk;226879339;13503038;l?
http://clk.atdmt.com/CRS/go/247765532/direct/01/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.