rjb-1.1.9 does not build on Windows with JDK in default location

2009-12-17 Thread Will Rogers
I just went through an unpleasant two hours trying to get buildr to install
on Windows. May I make two suggestions to improve your Installing on
Windows section at http://buildr.apache.org/installing.html ?

1. Installing the Ruby one-click installer is not enough, you also need the
devkit so you have a compiler and make. The devkit is a 7zip file available
on the same page as the one-click installer. You just extract it to your
Ruby directory and make sure the paths in devkit/msys/1.0.11/etc/fstab are
accurate.

2. The version rjb-1.1.9 required by buildr-1.3.5 does not build when your
JAVA_HOME has spaces in the path. The default install location is in
C:/Program Files, which means rjb will not build. rjb-1.2.0 works, so
please either release an updated buildr gem that works with this fixed
version of rjb or suggest a work-around of installing the JDK to a
non-default location with no spaces in the path.


Thanks,

-- Will


Re: rjb-1.1.9 does not build on Windows with JDK in default location

2009-12-17 Thread Will Rogers
On Thu, Dec 17, 2009 at 1:23 PM, Assaf Arkin as...@labnotes.org wrote:
  2. The version rjb-1.1.9 required by buildr-1.3.5 does not build when your
  JAVA_HOME has spaces in the path

 I'm not sure why you're getting the all-platforms gem with RJB 1.1.9
 dependency, but you shouldn't.   Could be one of the gems was in the
 switchover from Rubyforge to Gemcutter?

The latest versions of the Ruby one click installer are compiled with
mingw, not msvc6, and I believe that means they are not binary
compatible with -mswin32 gems. Rubygems selects the basic
all-platforms gems with this build of Ruby.


Re: rjb-1.1.9 does not build on Windows with JDK in default location

2009-12-19 Thread Will Rogers
On Thu, Dec 17, 2009 at 1:43 PM, Assaf Arkin as...@labnotes.org wrote:
 I think they're just using a different platform identifier, because their
 suggestion is:

 gem install --platform=mswin32

Thanks for clarifying the problem. To follow up, I can confirm that
buildr installs and works with:

gem install buildr --platform mswin32

Maybe that's what you should put in your installation guide? Contrary
to what I said in my first mail, with this fix the ruby installer
devkit is not necessary because rubygems installs the binary gems as
you intended. It might also be worth mentioning that you need Ruby
1.8, not Ruby 1.9, because the ruby installer page lists both without
guidance. Users might tend to choose the higher number ;)


-- Will


buildr + XMLBeans documentation?

2009-12-19 Thread Will Rogers
I have not been able to find any documentation for buildr's XMLBeans
support other than a short comment within addon/buildr/xmlbeans.rb
itself. That comment got it working for me, but I have more questions.
Is there documentation hiding somewhere?

If not, can anyone help me with these two questions?

1. In the few examples I've been able to find so far on the web, I've
seen buildfiles with require 'tasks/xmlbeans', but the documentation
in xmlbeans.rb says to use require 'buildr/xmlbeans'. What's the
difference? Which is preferred?

2. Is there a way to make a task that generates and compiles the
XMLBeans only, without going on to compile the rest of the project?


Thanks

-- Will


end-to-end build and deploy including Subversion checkout?

2009-12-28 Thread Will Rogers
Hi Buildr folks,

My ultimate goal in adopting a Java build system is to have a
single-command process that can check code out of source control,
build it, and deploy it. Now that I've read through all the Buildr
documentation, it seems that Buildr is perfect for building, and I
also think it can be comfortably pressed into service for deployment
using custom tasks that stop/start Windows services and copy files
around (we are using JBoss + wrapper).

However, I'm still not sure of the best way to automate the first
step, getting the code (and buildfile!) out of Subversion. Does anyone
use Buildr for this? How do you approach it? Or do you use a
non-Buildr Rakefile or just a shell script as a bootstrap step? I'd
really appreciate some tips or, better yet, example scripts.


-- Will


Re: end-to-end build and deploy including Subversion checkout?

2009-12-28 Thread Will Rogers
Thanks, Alex. I know what I want to accomplish, but I'm still getting
a feel for the Java ecosystem, so I'm not always sure what the popular
steps are along the way. Your pointers toward fresh research material
are very helpful.


-- Will


generate geronimo-application.xml during EAR packaging?

2010-02-24 Thread Will Rogers
Buildr's EAR packaging automatically generates an application.xml and
includes it in the output's META-INF directory. I would like to do
something similar to generate a geronimo-application.xml for inclusion
in the EAR. I can handle the actual file generation part, but I'm not
sure how/where to hook that into buildr's packaging.

Where do I stick my code for generating and including a file in the
EAR package so it works similar to the built-in application.xml
generation?


Thanks,

-- Will


Re: dzone

2010-02-24 Thread Will Rogers
On Sat, Jan 23, 2010 at 12:25 PM, Alex Boisvert alex.boisv...@gmail.com wrote:
 solid.  Whitelisting dependencies has worked very well for many of us on big
 projects and is probably an under-appreciated feature.

What does whitelisting dependencies mean?

I have jumped into a project at the deep end and I'm still trying to
familiarize myself with how the Java ecosystem operates, so these
kinds of discussions are very useful to me. Thanks (for the blog too)!


-- Will


Re: generate geronimo-application.xml during EAR packaging?

2010-02-24 Thread Will Rogers
Thanks, that should help me get there.

Related follow-up question: it looks like I need to specify one of the
libs I'm packaging in my EAR as a module/connector in the
application.xml. Can I add arbitrary elements to Buildr's
application.xml output? Should I give up on the auto-EAR packaging and
just use a :zip package?


Re: generate geronimo-application.xml during EAR packaging?

2010-02-24 Thread Will Rogers
On Wed, Feb 24, 2010 at 3:50 PM, Alex Boisvert alex.boisv...@gmail.com wrote:
 Related follow-up question: it looks like I need to specify one of the
 libs I'm packaging in my EAR as a module/connector in the
 application.xml. Can I add arbitrary elements to Buildr's
 application.xml output?


 That's probably what I would do, yes.

Sorry for being a complete neophyte, but do you mean yes, you would
add arbitrary elements to Buildr's application.xml output? If so, how
do I go about doing that?



Re: generate geronimo-application.xml during EAR packaging?

2010-02-26 Thread Will Rogers
For the reference of others, here's what I came up with. I modeled my
task after the code for generating application.xml in Buildr's
EarTask. Don't take the list of dependencies too seriously, it's
probably missing stuff. Figuring that out is part of the next step.

http://gist.github.com/315869

I still want to make an extension out of it, but it works. It
generates the geronimo-application.xml and sticks it in the EAR
package. Now to work on automating deployment to geronimo including
dependencies... fun?


-- Will


xmlbeans problems

2010-03-02 Thread Will Rogers
I'm using 'buildr/xmlbeans' and 'compile_xml_beans _(:source, :main,
:xsd)' in my project definition.

1. I'm observing a similar problem to the one I reported yesterday
with the resources task. I edited one of my files in src/main/xsd and
ran buildr package. Output:

Building myproject
Running XMLBeans schema compiler
←[34mredefining Project←[0m
Time to build schema type system: 1.727 seconds
Time to generate code: 12.038 seconds
Compiling myproject into C:/blah/myproject/target/classes
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Packaging myproject
Running integration tests...
←[32mCompleted in 1m2.352s←[0m

NOTE: myproject.jar was NOT updated. I checked target/classes and
verified that the XMLBeans were recompiled and have newer modified
dates than the jar. Shouldn't that trigger the package task
reassembling the jar? Can anyone verify this?

2. Adding a brand new file to src/main/xsd is not detected by the
XMLBeans support at all. I did a buildr clean package, copied a new
XSD into src/main/xsd, and then did a buildr package. Output:

Building myproject
Packaging myproject
Running integration tests...
←[32mCompleted in 2.723s←[0m

Schema generation did not run, compile did not run, and packaging did
not run. The new file was ignored.

3. In addon/buildr/xmlbeans.rb, the compile_xml_beans function calls
'compile.using(:javac).from(generated).with(*XMLBeans.requires)'.
requires() is defined thus:

  @requires ||= REQUIRES.artifacts.each(:invoke).map(:to_s)

...which resolves to filesystem paths, not artifact specs. This
results in compile.dependencies containing two elements that are
string filesystem paths instead of Artifact instances, which is
screwing with some deployment scripting I am attempting. Removing the
'.map(:to_s)' from the end of that line makes requires() return
artifact specs instead and everything works nicely. Does that seem
like a reasonable change? I will file an enhancement ticket for this
unless someone points out something wrong with it.


-- Will

P.S. thanks for the excellent support thus far and sorry for
continuing to poke the bear ;)


Re: xmlbeans problems

2010-03-03 Thread Will Rogers
On Wed, Mar 3, 2010 at 10:08 AM, Alex Boisvert alex.boisv...@gmail.com wrote:
 Now tracking #1 and #2 with:
 https://issues.apache.org/jira/browse/BUILDR-393

Thank you for following up on these. I was pretty much exhausted by
the time you got back to me last night, so I wasn't going to get to it
until just now. Glad I checked my e-mail first :)

I just updated BUILDR-393 with the steps that reproduce the reported
issues for me.


-- Will


Re: xmlbeans problems

2010-03-03 Thread Will Rogers
FYI I have...

79 specs failing on Windows 7 + java 1.6.0_18-b07 + jruby 1.4.0 + buildr r918501
13 specs failing on ubuntu 9.10 + java 1.6.0_15-b03 + jruby 1.4.0 +
buildr r918501

...and one of the differences is Buildr::ZipTask 'should create new
archive when updating' (fails on Windows). If I can be of any more
help testing or verifying things on Windows, let me know.


-- Will


Re: Buildr 1.4.0RC2 is out

2010-04-26 Thread Will Rogers
On Sat, Apr 24, 2010 at 1:05 PM, Antoine Toulme anto...@lunar-ocean.com wrote:
 I pushed RC3 which fixes this bug. I will start a vote for this RC3 to be
 our GA now.
 http://people.apache.org/~toulmean/buildr/1.4.0RC3/

Thanks. Sorry I didn't file a bug; I hadn't gotten around to resetting
my issues.apache.org password after the break-in they had earlier this
month.

I ran buildr's tests w/ RC3 and got 52 failures on my Win7 install of
ruby 1.8.7 (2010-01-10 patchlevel 249) [i386-mingw32]. Here's the
output:

  http://dl.dropbox.com/u/26070/specs_buildr_1.4.0rc3.html.gz

Many of the problems appear to be Windows path issues (especially the
URI specs). There are some failures under Buildr::Application gems
that look like more fixable gem version mismatch problems, though,
e.g.:

should return one entry for each gem specified in buildr.yaml
can't activate rspec (= 1.3.0, runtime) for [], already activated
rspec-1.2.9 for []

...and it looks like calling File.utime throws a Permission denied
error every time.


On the upside, looks like you fixed the problems with not repackaging
when some files are changed, so thanks!

-- Will


Re: Buildr 1.4.0RC2 is out

2010-04-26 Thread Will Rogers
On Mon, Apr 26, 2010 at 1:34 PM, Antoine Toulme anto...@lunar-ocean.com wrote:
 Also, can you please open a bug with the output of the testing you made ?

https://issues.apache.org/jira/browse/BUILDR-427

Also, I just realized I get an error at the end of rake spec, too:

rake aborted!
Command C:/Ruby/bin/ruby.exe -Ilib
C:/Ruby/lib/ruby/gems/1.8/gems/rspec-1.3.0/bin/spec
spec/addon/drb_spec.rb spec/core/application_spec.rb
spec/core/build_spec.rb spec/core/cc_spec.rb
spec/core/checks_spec.rb spec/core/common_spec.rb
spec/core/compile_spec.rb spec/core/extension_spec.rb
spec/core/generate_spec.rb spec/core/project_spec.rb
spec/core/test_spec.rb spec/core/transport_spec.rb
spec/core/util_spec.rb spec/groovy/bdd_spec.rb
spec/groovy/compiler_spec.rb spec/ide/eclipse_spec.rb
spec/ide/idea7x_spec.rb spec/java/ant_spec.rb
spec/java/bdd_spec.rb spec/java/cobertura_spec.rb
spec/java/commands_spec.rb spec/java/compiler_spec.rb
spec/java/emma_spec.rb spec/java/java_spec.rb
spec/java/packaging_spec.rb spec/java/tests_spec.rb
spec/packaging/archive_spec.rb
spec/packaging/artifact_namespace_spec.rb
spec/packaging/artifact_spec.rb spec/packaging/packaging_spec.rb
spec/scala/bdd_spec.rb spec/scala/compiler_spec.rb
spec/scala/tests_spec.rb spec/version_requirement_spec.rb --format
specdoc --format failing_examples:failed --format
html:_reports/specs.html --backtrace --colour failed

Am I missing something required for generating test output?


 Will, the problem with the gem versions are something you need to fix on

I downloaded 
http://people.apache.org/~toulmean/buildr/1.4.0RC3/dist/buildr-1.4.0.gem
and installed it with gem install buildr-1.4.0.gem. I have rspec
(1.3.0, 1.2.9, 1.2.8) in gem list rspec. What should I do to fix the
problem? I also tried the file buildr-1.4.0-x86-mswin32.gem but got 59
spec failures including the same rspec gem version errors.

I admit I don't understand the difference between the plain .gem and
the -x86-mswin32.gem. I have been using the plain .gem because
-x86-mswin32 doesn't match my ruby version string. Is that wrong?


Re: Buildr 1.4.0RC2 is out

2010-04-26 Thread Will Rogers
On Mon, Apr 26, 2010 at 2:33 PM, Antoine Toulme anto...@lunar-ocean.com wrote:
 1882 examples, 48 failures
 rake aborted!
 Command C:/Ruby/bin/ruby.exe [...] failed

 Not sure. If you run with --trace, it gives a lot more info and should send
 a backtrace.

I think maybe the error I reported after running rake spec is
normal? It's rake saying, Hey, that task 'spec' you ran failed!
because the number of failures is non-zero. Can anyone who uses
rake/RSpec more than me confirm?

 The fix is to remove 1.3.0. What happens is that Buildr requires a few gems,
 which lazily require rspec with version 0, and your system picks up the
 latest version. When buildr gets around to dictate to start 1.2.9, rubygems
 throws an error.

Confirmed that uninstalling rspec 1.3.0 fixes those particular specs.
Still 48 failures mostly related to Windows filesystem stuff.


Thanks,

-- Will