deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From johndam...@apache.org
Subject deltaspike git commit: Added documentation to add DeltaSpike to a gradle project.
Date Sun, 03 Apr 2016 01:05:42 GMT
Repository: deltaspike
Updated Branches:
  refs/heads/master 07003cc9b -> 9879847f4


Added documentation to add DeltaSpike to a gradle project.


Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/9879847f
Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/9879847f
Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/9879847f

Branch: refs/heads/master
Commit: 9879847f45522b1dd385e7e884eb6ff57a616372
Parents: 07003cc
Author: John D. Ament <johndament@apache.org>
Authored: Sat Apr 2 21:04:40 2016 -0400
Committer: John D. Ament <johndament@apache.org>
Committed: Sat Apr 2 21:04:40 2016 -0400

----------------------------------------------------------------------
 documentation/src/main/asciidoc/configure.adoc | 58 ++++++++++++++++++---
 template/document.html.erb                     |  2 +-
 2 files changed, 52 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltaspike/blob/9879847f/documentation/src/main/asciidoc/configure.adoc
----------------------------------------------------------------------
diff --git a/documentation/src/main/asciidoc/configure.adoc b/documentation/src/main/asciidoc/configure.adoc
index c42befb..b3c03c0 100644
--- a/documentation/src/main/asciidoc/configure.adoc
+++ b/documentation/src/main/asciidoc/configure.adoc
@@ -2,11 +2,11 @@
 
 :Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license
agreements. See the NOTICE file distributed with this work for additional information regarding
copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with the License. You may
obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required
by applicable law or agreed to in writing, software distributed under the License is distributed
on an "AS IS" BASIS, WITHOUT WARRANTIES OR  CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and limitations under the
License.
 
-DeltaSpike is available for use in Maven-based and Maven-independent projects. Instructions
are given here for obtaining released final versions of DeltaSpike for both approaches.
+DeltaSpike is available for use in projects of many build tools. Instructions are given here
for obtaining released final versions of DeltaSpike for both approaches.
 
 NOTE: You can also opt to use the lastest DeltaSpike snapshots; for more information, see
<<snapshots#,Use DeltaSpike Snapshots>>.
 
-== Maven-based Projects
+== Maven Projects
 DeltaSpike released versions are available from the Maven Central repository for use in Maven-based
projects. This means that you do not need to modify your Maven configuration `settings.xml`
file; when building projects, Maven automatically searches the online Maven Central repository
for project dependencies and downloads sources to your local Maven repository. 
 
 To begin use the DeltaSpike releases from Maven Central, you simply need to configure the
project `pom.xml` file for each project with information about the release version and modules
you want to use. At a minimum, you must add the DeltaSpike Core module, which provides the
DeltaSpike API and utility classes.
@@ -25,24 +25,34 @@ To begin use the DeltaSpike releases from Maven Central, you simply need
to conf
 +
 [source,xml]
 ----
+<dependencyManagement>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.deltaspike.distribution</groupId>
+            <artifactId>distributions-bom</artifactId>
+            <version>${deltaspike.version}</version>
+            <type>pom</type>
+            <scope>import</scope>
+        </dependency>
+    </dependencies>
+</dependencyManagement>
+
 <dependency>
     <groupId>org.apache.deltaspike.core</groupId>
     <artifactId>deltaspike-core-api</artifactId>
-    <version>${deltaspike.version}</version>
     <scope>compile</scope>
 </dependency>
 
 <dependency>
     <groupId>org.apache.deltaspike.core</groupId>
     <artifactId>deltaspike-core-impl</artifactId>
-    <version>${deltaspike.version}</version>
     <scope>runtime</scope>
 </dependency>
 ----
 +
 . Save the `pom.xml` file changes
 
-TIP: The API is scoped for compile time and implementation only included for runtime, assisting
to prevent you from inadvertantly depending on an implementation class.
+TIP: The API is scoped for compile time and implementation only included for runtime, assisting
to prevent you from inadvertently depending on an implementation class.
 
 For instructions on adding the optional DeltaSpike modules, see the relevant module page:
 
@@ -57,9 +67,43 @@ For instructions on adding the optional DeltaSpike modules, see the relevant
mod
 * <<servlet#,Servlet>>
 * <<test-control#,Test-Control>>
 
+[[config-gradle]]
+== Gradle Projects
+
+Setting up DeltaSpike in a Gradle based project is just as easy as Maven.
+[source,subs="+attributes"]
+----
+// setup the Spring Dependency Management Plugin for Gradle, to import BOMs.
+plugins {
+    id "io.spring.dependency-management" version "0.5.6.RELEASE"
+    id "java" // you'll likely also want the WAR plugin
+}
+repositories {
+    mavenCentral()
+}
+dependencyManagement {
+    imports {
+        mavenBom 'org.apache.deltaspike.distribution:distributions-bom:{latestStable}'
+    }
+}
+dependencies {
+     compile 'org.apache.deltaspike.core:deltaspike-core-api'
+     runtime 'org.apache.deltaspike.core:deltaspike-core-impl'
+}
+sourceSets {
+   main {
+     //For CDI to work, need to put the resources and classes in the same directory
+     output.resourcesDir = 'build/classes/main'
+     output.classesDir   = 'build/classes/main'
+   }
+ }
+----
+
+This will give you a Gradle build setup to run DeltaSpike.
+
 [[config-maven-indep]]
-== Maven-independent Projects
-Deltaspike is provided as a set of downloadable .jar files for projects not utilizing the
Maven build system. Alternatively, you can build the DeltaSpike .jar files from source; for
instructions, see <<build#,Build DeltaSpike from Source>>. In both cases, you
must add the DeltaSpike .jar files directly to your projects. 
+== Other Projects
+DeltaSpike is provided as a set of downloadable .jar files for projects not utilizing the
Maven build system. Alternatively, you can build the DeltaSpike .jar files from source; for
instructions, see <<build#,Build DeltaSpike from Source>>. In both cases, you
must add the DeltaSpike .jar files directly to your projects.
 
 To use DeltaSpike without Maven from the downloadable .jar files, complete the following
steps:
 

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/9879847f/template/document.html.erb
----------------------------------------------------------------------
diff --git a/template/document.html.erb b/template/document.html.erb
index 58a4675..52e92f1 100644
--- a/template/document.html.erb
+++ b/template/document.html.erb
@@ -286,7 +286,7 @@
     <div class="row">
         <hr>
         <footer>
-            <p>Copyright &copy; 2011-2015 The Apache Software Foundation,
+            <p>Copyright &copy; 2011-2016 The Apache Software Foundation,
                 Licensed under the Apache License, Version 2.0.</p>
 
             <p>Apache and the Apache feather logo are trademarks of The Apache Software
Foundation.</p>


Mime
View raw message