Forge - Gradle Addon Parent

Parent POM for JBoss projects. Provides default project build configuration.

License

License

Categories

Categories

JBoss Container Application Servers Gradle Build Tools
GroupId

GroupId

org.jboss.forge.addon
ArtifactId

ArtifactId

gradle-parent
Last Version

Last Version

3.0.0.Alpha3
Release Date

Release Date

Type

Type

pom
Description

Description

Forge - Gradle Addon Parent
Parent POM for JBoss projects. Provides default project build configuration.
Project Organization

Project Organization

JBoss by Red Hat
Source Code Management

Source Code Management

http://github.com/forge/addon-gradle

Download gradle-parent

How to add to project

<!-- https://jarcasting.com/artifacts/org.jboss.forge.addon/gradle-parent/ -->
<dependency>
    <groupId>org.jboss.forge.addon</groupId>
    <artifactId>gradle-parent</artifactId>
    <version>3.0.0.Alpha3</version>
    <type>pom</type>
</dependency>
// https://jarcasting.com/artifacts/org.jboss.forge.addon/gradle-parent/
implementation 'org.jboss.forge.addon:gradle-parent:3.0.0.Alpha3'
// https://jarcasting.com/artifacts/org.jboss.forge.addon/gradle-parent/
implementation ("org.jboss.forge.addon:gradle-parent:3.0.0.Alpha3")
'org.jboss.forge.addon:gradle-parent:pom:3.0.0.Alpha3'
<dependency org="org.jboss.forge.addon" name="gradle-parent" rev="3.0.0.Alpha3">
  <artifact name="gradle-parent" type="pom" />
</dependency>
@Grapes(
@Grab(group='org.jboss.forge.addon', module='gradle-parent', version='3.0.0.Alpha3')
)
libraryDependencies += "org.jboss.forge.addon" % "gradle-parent" % "3.0.0.Alpha3"
[org.jboss.forge.addon/gradle-parent "3.0.0.Alpha3"]

Dependencies

test (1)

Group / Artifact Type Version
junit : junit jar 4.11

Project Modules

  • api
  • impl
  • impl-projects
  • addon
  • tests

Gradle Addon for JBoss Forge 3

Build Status

This addon exports services for use in other addons. The Gradle addon implements extension points in several addons, enabling them to function using Gradle (in fact Maven or Ivy) dependency resolution, project building, and additionally provides Gradle build script manipulation services.

Depends on

Addon Exported Optional

dependencies

yes

no

resources

yes

no

projects

yes

no

parser-java

yes

no

ui

no

yes

maven

no

no

configuration

no

no

org.jboss.forge.furnace.container:cdi

no

no

Setup

This Addon requires the following installation steps.

Add configuration to pom.xml

To use this addon, you must add it as a dependency in the pom.xml of your forge-addon classified artifact:

<dependency>
   <groupId>org.jboss.forge.addon</groupId>
   <artifactId>gradle</artifactId>
   <classifier>forge-addon</classifier>
   <version>${version}</version>
</dependency>

Features

Gradle DSL API mapping

This addon provides model for Gradle build script elements such as tasks, dependencies, source sets, plugins, etc.

GradleModelBuilder builder = GradleModelBuilder.create();

model.addTask(GradleTaskBuilder.create()
		.setName("newTask")
		.setDependendsOn(GradleTaskBuilder.create().setName("otherTask"))
		.setCode("println 'Hello!'"));
Forge-Gradle library

During setup, addon creates and installs forge.gradle library in the project directory. It adds few enhancements to build script which are not currently supported in default Gradle installation:

  • dependency management - implementation of Maven dependencyManagement, performed by two pseudoconfigurations named managed and direct

  • profiles - equivalent of Maven profiles, each profile is represented by name-profile.gradle script in project directory, profile is chosen by setting profile project build property

  • setting output archive name - changes output artifact name of the default build task (such as jar)

    In future, forge.gradle will probably be replaced with forge Gradle plugin or other alternative which won’t require adding anything to the project.

Project facets implementation

Gradle addon implements basic project facets from projects and parser-java addon, and adds a GradleFacet which is entry point for Gradle addon API:

  • GradleFacet

  • MetadataFacet

  • DependencyFacet

  • PackagingFacet

  • ResourcesFacet

  • JavaSourceFacet

Gradle manager

GradleManager service allows other addons to run Gradle builds using Gradle tooling API. It takes care of downloading Gradle installation if GRADLE_HOME environment property is not set, and makes Gradle builds synchronous.

org.jboss.forge.addon

JBoss Forge

JBoss Forge is a software development tool that extends your Java IDE, providing wizards and extensions (add-ons) for different technologies and solutions

Versions

Version
3.0.0.Alpha3
2.12.2.Final
2.5.0.Final
2.3.0.Final
2.0.0.Final