Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
@Grab(group='org.codehaus.gpars', module='gpars', version='1.12.0')

Snapshots

Code Block
@GrabResolver(name='gpars', root='http://snapshots.repository.codehaus.org/', m2Compatible=true)
@Grab(group='org.codehaus.gpars', module='gpars', version='1.23-SNAPSHOT')

Grape config (optional)

...

Code Block
repositories {
    mavenCentral()

    //add repositories for optional dependencies
    mavenRepo urls: ['http://repository.jboss.org/maven2/']
}

dependencies {
    compile "org.codehaus.gpars:gpars:1.12.0"
}

Snapshots

Code Block
repositories {
    mavenRepo urls: ["http://snapshots.repository.codehaus.org/"]

    //add repositories for optional dependencies
    mavenRepo urls: ['http://repository.jboss.org/maven2/']
}
dependencies {
    compile "org.codehaus.gpars:gpars:1.23-SNAPSHOT"
}

Maven

To include GPars in your project add the following (optional) repositories and dependencies into your project:

Code Block
<repositories>
        <repository>
            <id>jboss</id>
            <url>http://repository.jboss.org/maven2/</url>
        </repository>
    </repositories>

    <dependencies>
        <dependency>
            <groupId>org.codehaus.gpars</groupId>
            <artifactId>gpars</artifactId>
            <version>0<version>1.12<2.0</version>
        </dependency>
    </dependencies>

Sample maven-based Java API demo project

You may also like a stand-alone maven-based Java API sample project showing how to use GPars from Java and how to integrate GPars with Maven.

...

Code Block
<repositories>
        <repository>
            <id>jboss</id>
            <url>http://repository.jboss.org/maven2/</url>
        </repository>
        <repository>
            <id>codehaus.snapshots</id>
            <url>http://snapshots.repository.codehaus.org</url>
        </repository>
</repositories>

    <dependencies>
        <dependency>
            <groupId>org.codehaus.gpars</groupId>
            <artifactId>gpars</artifactId>
            <version>1.23-SNAPSHOT</version>
        </dependency>
    </dependencies>

Grails

...

Grails

...

Grails since 1.2

Leveraging the build in dependency management you can instad installing the plugins update the BuildConfig.groovy file accordingly:

Code Block
repositories {
    mavenCentral()
    //  mavenRepo 'http://snapshots.repository.codehaus.org'  //enable if using GPars snapshots
    mavenRepo 'http://repository.jboss.org/maven2/'
}
dependencies {
    build 'org.codehaus.gpars:gpars:1.12.0'
}

Griffon

Using the Griffon built-in dependency management:

Code Block
griffon.project.dependency.resolution = {
    inherits "global"

    default dependencies
        repositories {
            griffonHome()
            mavenCentral()
        }
        dependencies {
            runtime org.codehaus.gpars:gpars:1.12.0
        }
    }
}

You may also consider using the plugins to enable GPars for older Griffon versions

GPars Griffon plugin - griffon install-plugin gpars

Dependencies

GPars itself depends on a couple of libraries from the maven central repository. Check out the GPars public pom:

Code Block
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.codehaus.gpars</groupId>
  <artifactId>gpars</artifactId>
  <version>1.02.0</version>
  <name>GPars</name>
  <description>The Groovy and Java high-level concurrency library offering actors, dataflow, CSP, agents, parallel collections, fork/join and more</description>
  <url>http://gpars.codehaus.org</url>
  <inceptionYear>2009</inceptionYear>
  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <dependencies>

    <dependency>
      <groupId>org.codehaus.jsr166-mirror<multiverse</groupId>
      <artifactId>jsr166y<<artifactId>multiverse-core</artifactId>
      <version>1<version>0.7.0</version>
      <scope>compile</scope>
    </dependency>

    <dependency>
      <groupId>org.codehaus.jcsp</groupId>
      <artifactId>jcsp</artifactId>
      <version>1.1-rc5</version>
      <scope>compile</scope>
      <optional>true</optional>
    </dependency>

    <dependency>
      <groupId>org.multiverse<codehaus.jsr166-mirror</groupId>
      <artifactId>multiverse-beta<<artifactId>jsr166y</artifactId>
      <version>0<version>1.7-RC-1<.0</version>
      <scope>compile</scope>
    </dependency>

<optional>true</optional>    <dependency>
      <groupId>org.codehaus.groovy</groupId>
      <artifactId>groovy-all</artifactId>
      <version>2.1.9</version>
      <scope>compile</scope>
    </dependency>

    <dependency>
      <groupId>org.jboss.netty</groupId>
      <artifactId>netty</artifactId>
      <version>3.2.79.Final</version>
      <scope>compile</scope>
      <optional>true</optional>
    </dependency>
  </dependencies>
</project>

...