Package method having no effect in Buildr

I'm trying to package a scala project into a jar and write properties to the Manifest using Buildrs package() method.

The package seems to have no affect on the Manifest. Here's the build file:

VERSION_NUMBER = "1.0.0"
GROUP = "Green"
COPYRIGHT = "Green CopyRight"

require 'buildr/scala'

Buildr::Scala::Scalac::REQUIRES.library = '2.8.0-SNAPSHOT'
Buildr::Scala::Scalac::REQUIRES.compiler = '2.8.0-SNAPSHOT'
Java.classpath.reject! { |c| c.to_s.index('scala') }
Java.classpath << Buildr::Scala::Scalac::REQUIRES

ENV['USE_FSC'] = 'yes'

repositories.remote << "http://www.ibiblio.org/maven2/"

desc "The Green project"
define "Green" do
    project.version = VERSION_NUMBER
    project.group = GROUP
    package(:jar).with :manifest=>manifest.merge(
        'Main-Class'=>'com.acme.Main',
        'Implementation-Vendor'=>COPYRIGHT
    )
end

And here's the resulting Manifest:

Build-By: brianheylin
Build-Jdk: 1.6.0_17
Implementation-Title: The Green project
Implementation-Version: 
Implementation-Vendor: 
Main-Class: green.GreenMain
Manifest-Version: 1.0
Created-By: Buildr

Notice that neither the Implementation-Vendor or Main-Class property has been overwritten. I run Buildr as follows:

jruby -S buildr clean package

I'm using jRuby 1.4.0 and Buildr 1.3.5 (installed as a gem). Anyone any ideas on why this is the case?

Answers


I tested this quickly using buildr 1.3.5 + Ruby 1.8.6 and got the correct manifest. I made a few small changes to the buildfile which seem like they shouldn't matter in regards to your manifest problem. Here is my test buildfile:

ENV['JAVA_HOME'] = 'C:\Java\32\jdk1.6.0_17'

VERSION_NUMBER = "1.0.0"
GROUP = "Green"
COPYRIGHT = "Green CopyRight"

require 'buildr/scala'

desc "The Green project"
define "Green" do
    project.version = VERSION_NUMBER
    project.group = GROUP
    package(:jar).with :manifest=>manifest.merge(
        'Main-Class'=>'com.acme.Main',
        'Implementation-Vendor'=>COPYRIGHT
    )
end

And here is the resulting manifest:

Implementation-Vendor: Green CopyRight
Manifest-Version: 1.0
Build-By: Travis
Created-By: Buildr
Build-Jdk: 1.6.0_17
Implementation-Title: The Green project
Implementation-Version: 
Main-Class: com.acme.Main

Sorry I can't tell you why it works for me but maybe my post will spawn some ideas.


Need Your Help

Intermediate variable in a list comprehension for simultaneous filtering and transformation

python list mapping filtering list-comprehension

I have a list of vectors (in Python) that I want to normalize, while at the same time removing the vectors that originally had small norms.

PHP: Waiting time so function can't be executed untill x minutes

php mysql mysqli

I am trying to make a function for a small game, where I'am trying to look into setting a waiting time for x minutes, so that the script can't be refreshed whenever someone would like to. The plan ...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.