[
https://issues.apache.org/jira/browse/BUILDR-275?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Antoine Toulme resolved BUILDR-275.
-----------------------------------
Resolution: Fixed
This has been resolved in ruby itself.
> race condition in ant.rb when using parallel build
> --------------------------------------------------
>
> Key: BUILDR-275
> URL: https://issues.apache.org/jira/browse/BUILDR-275
> Project: Buildr
> Issue Type: Bug
> Components: Test frameworks
> Affects Versions: 1.3.4
> Environment: linux 2.6, jruby 1.1.5, java project, junit
> Buildr.options.parallel=true
> Reporter: Tuomas Karkkainen
> Priority: Minor
> Fix For: 1.5
>
> Attachments: buildr-ant-race.zip
>
>
> When Buildr.options.parallel=true
> If two projects start executing a junit test task at the same time they fail
> with:
> Test framework error: uninitialized constant Antwrap::AntProject
> or
> Test framework error: uninitialized constant Antwrap::AntProject::Main
> or
> wrong # of arguments(0 for 1) for using
> --
> the problem is in ant.rb
> in the method def ant(name, &block)
> synchronizing the method fixes the problem.
> my buildfile:
> VERSION_NUMBER = "1.0.0"
> GROUP = "bu"
> COPYRIGHT = ""
> repositories.remote << "http://repo1.maven.org/maven2/"
> repositories.remote << "http://www.ibiblio.org/maven2/"
> Buildr.options.parallel=true
> desc "The Bu project"
> define "bu" do
> project.version = VERSION_NUMBER
> project.group = GROUP
> manifest["Implementation-Vendor"] = COPYRIGHT
> define "sub1" do
> package(:jar)
> end
> define "sub2" do
> package(:jar)
> end
> end
> my layout:
> .
> ./sub1
> ./sub1/src
> ./sub1/src/test
> ./sub1/src/test/java
> ./sub1/src/test/java/TestClazz.java
> ./sub1/src/main
> ./sub1/src/main/java
> ./sub2
> ./sub2/src
> ./sub2/src/test
> ./sub2/src/test/java
> ./sub2/src/test/java/TestClazz.java
> ./sub2/src/main
> ./sub2/src/main/java
> ./buildfile
> and TestClazz.java is:
> import org.junit.*;
> public class TestClazz {
> @Test
> public void testMethod() throws Exception {
> }
> }
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)