Skip to content

Commit

Permalink
Merge pull request #429 from andrerod/dev
Browse files Browse the repository at this point in the history
Wait for finished processes
  • Loading branch information
André Rodrigues committed Jun 13, 2014
2 parents ad4d907 + a0a76df commit 9f561ed
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
5 changes: 5 additions & 0 deletions parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>com.microsoft.windowsazure.storage</groupId>
<artifactId>microsoft-windowsazure-storage-sdk</artifactId>
<version>1.0.0</version>
</dependency>

<!-- Test dependencies -->
<dependency>
Expand Down
13 changes: 10 additions & 3 deletions tasks/generate.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,14 @@ def nuget(String... args) { run('./nuget.exe', args) }
def hydra(String hydraExePath, String... args)
{
def commands = [exePrefix(), hydraExePath, args].flatten()
commands.execute()
return commands.execute()
}

// Generate code for the given specInfo
def generate(hydraExePath, specInfo)
{
def specDLL = findFileInPackagesDirectory(specInfo.specificationDllFileName)
hydra(hydraExePath, '-f', 'java', '-s', 'namespace',
return hydra(hydraExePath, '-f', 'java', '-s', 'namespace',
'-c', specInfo.clientType,
'-d', "../${specInfo.generatedCodeDestinationRootDirectoryName}/src/main/java/com",
specDLL)
Expand Down Expand Up @@ -158,7 +158,14 @@ ensureEnvironment()
download("http://www.nuget.org/nuget.exe")
restorePackages()
def hydraPath = findFileInPackagesDirectory('hydra.exe')

def processes = [];
hydraSpecs.each {
System.out.println("generating code for ${it.specificationDllFileName}")
generate hydraPath, it
processes.push(generate(hydraPath, it))
}
// Wait for all generations to finish
processes.each() {
it.waitFor()
}
System.out.println("Finished generating")

0 comments on commit 9f561ed

Please sign in to comment.