10
Mar
10

using ruby from ant



An example on how you could use a fileset from a ruby script task:


<script language="ruby" classpathref="jruby_classpath">
	task = $project.createDataType("fileset")
	task.case_sensitive = false
	task.setDir java.io.File.new($basedir)
	task.setIncludes("**/*.*")
	task.setExcludes("**/*test*/**")
	scanner = task.getDirectoryScanner($project)
	scanner.getIncludedFiles.each {|f| puts f}
</script>

This snippet will include every file in the basedir, except those containing the string test.

Advertisements

0 Responses to “using ruby from ant”



  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Blog Stats

  • 222,570 hits

%d bloggers like this: