Create War file using Buildr

I am very much new to buildr. I am trying to create war file using buildr as i installed Jruby and buildr on my system but i am not able to build the war file.buildfile content: repositories.remote << "http://repo1.maven.org/maven2" define "Sample", :version=>"1.0.0" do package :war endI run the command buildr buildfrom cmd it showing the result like building Sample completed in xx secondsbut i am not able to see any war file Kindly help me I am not sure where i am missing or doing any wrong stepThanks....Read more

Buildr - Filter web.xml in packaging war

Is it possible to filter the web.xml file when packaging a war using Buildr?Buildr documentation: Without much prompting, package :war picks the contents of the src/main/webapp directory and places it at the root of the WARI have a place holder or token defined in the web.xml and I would like to replace it when packaging the war depending on which env I am building. What is the best way to go about it? Is there a filtering option for the package method?...Read more

Buildr workspace dependency

I have two projects, project A and project B. Project A is a library project, so it has its own buildfile. I can build jar and everything works fine. In project B i want to use project A as a workspace dependency in Eclipse. I don't wan't to install project A to local repo each time i make changes in project A.Also when i run buildr eclipse i want it to setup my eclipse project so it adds project A as required project on build path:<classpathentry combineaccessrules="false" kind="src" path="/A"/>It should work as:compile.with project('A'...Read more

buildr: specify project base dir

I'm new to buildr so apologies if this is trivial.I refactored all my projects so that they now follow the Apache convention (src/main/java etc) but I have one big java project which is divided into three logical sub projects.In other words my directory structure looks something like this:[root] buildfile [project-a] [project-b] [directory-for-projects-c-d-e] [project-c] [project-d] [project-e]Each individual project follows the Apache convention, but the problem is that buildr thinks [directory-for-projects-c-d-e] is, itself, a...Read more

Buildr Manifest generate class-path from EAR package

I am using (and learning) Buildr to build and package my projects. I would like to auto generate the class-path attribute in an EJB projects MANIFEST file. Currently I am doing:manifest_cp = compile.dependencies.map { |d| "#{File.basename(d.name)}"}.join(" ")package(:jar).with :manifest=>manifest.merge('Class-Path'=>manifest_cp)I am new to Ruby and Buildr so there probably is a better way to do this. However I was actually hoping to be able to generate the jars I define and package in my EAR as opposed to getting the compile dependenc...Read more

Using buildr for non compilation tasks

I want to use buildr for task automation. The feature I want to use is the buildr cc which (by default) runs compilation when source folder is changed.My goal is to setup buildr for a specific directory to execute a custom task (e.g.a system call)My latest version (not working because I define build) is the following. define "directory_watcher" do compile.sources << _(".") compile.from(_(".")).using(:javac) compile do p "Calling pandoc in compile" system "pandoc 0*.txt -o directory_watcher.html -s -c css/base.css" end build d...Read more

local properties file for buildr

the buildr docs suggest using profiles.yaml for managing settings. however, i would like a way to define settings which an individual dev would use to run locally and thus shouldn't be in scm. is there a preferred way of doing this?...Read more

Using generated sources in a buildr project

I'm trying to use a code generator inside a buildr-based java project. I would like to...call the generatorcompile the generated classes, package themeclipse to see the generated stuff (i.e. have the .classpath contain those sources)I've spend lots of time googling around for a complete example, but to no avail. the example here: https://cwiki.apache.org/confluence/display/BUILDR/How+to+generate+sources+before+compilationgives be plenty of errors. this is what I've tried: define 'generator' do compile.with ALL_COMMON_MODULES end define 'ex...Read more

buildr - share profiles.yaml file across projects

The profiles file is a YAML file called profiles.yaml that you place in the same directory as the BuildfileI was wondering is it possible to share the same profiles file for more than one project, i.e. specifying a different location to where to find the profiles.yaml file as opposed to defaulting to the same directory as the build file?...Read more

Buildr include jar files

I have an old project with files layout still in "src/" and jars in "lib/". I defined the layout to point to src.compile.with(Dir[_("lib/*.jar")])But when I run buildr build, it still stays package <name> does not exist.How can I resolve this?Thank you....Read more