buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diggory Hardy <>
Subject adding custom hooks to tasks
Date Thu, 01 Jan 1970 00:00:00 GMT
Hello list,

I'm trying to add some extra operations to tasks. What I'm doing at the moment 

define 'myproject' do
	package(:jar).tap to |jar|
		# do stuff here

but I notice that these operations happen even when not running the 'package' 
task — even when I run 'buildr clean'! On the contrary, if I remove the '.tap' 
bit my code never gets run.

Actually, that appears to be the case for the 'package' task. Same if I remove 
the '(:jar)' part. But for the 'compile' task, this works fine (only run when 

compile do ||
	# extra stuff...

So what gives with the 'package' task?
View raw message