Repository: deltaspike
Updated Branches:
  refs/heads/master dbc9a6518 -> d0f59b542


DELTASPIKE-821 Added documentation for test control and gradle.


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

Branch: refs/heads/master
Commit: d0f59b54272d3680bb7195817f05bf91c4a51dc1
Parents: dbc9a65
Author: John D. Ament <john.am...@spartasystems.com>
Authored: Wed Jan 21 08:15:02 2015 -0500
Committer: John D. Ament <john.am...@spartasystems.com>
Committed: Wed Jan 21 08:15:02 2015 -0500

----------------------------------------------------------------------
 .../src/main/asciidoc/test-control.adoc         | 21 ++++++++++++++++++++
 1 file changed, 21 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltaspike/blob/d0f59b54/documentation/src/main/asciidoc/test-control.adoc
----------------------------------------------------------------------
diff --git a/documentation/src/main/asciidoc/test-control.adoc 
b/documentation/src/main/asciidoc/test-control.adoc
index 2e5238d..eec031d 100644
--- a/documentation/src/main/asciidoc/test-control.adoc
+++ b/documentation/src/main/asciidoc/test-control.adoc
@@ -463,6 +463,27 @@ 
org.apache.deltaspike.core.spi.activation.ClassDeactivator=myPackage.LiquibaseAw
 
 Further details are available at deactivatable.
 
+==== Gradle
+
+Gradle by default does not put resources and compiled sources in to the same 
directory.
+When running a test using Gradle, this means your classes will not be in bean 
archives as
+defined by the CDI spec.  To work around this, you need to set your main and 
test directories
+for resources to point to where the compiled code lives.  This is an example 
of how to do that:
+
+[source,groovy]
+----------------------------------------------------------------------------------------------------------
+sourceSets {
+    main {
+        output.resourcesDir = 'build/classes/main'
+        output.classesDir   = 'build/classes/main'
+    }
+    test {
+        output.resourcesDir = 'build/classes/test'
+        output.classesDir   = 'build/classes/test'
+    }
+}
+----------------------------------------------------------------------------------------------------------
+
 === SPI
 
 ==== ExternalContainer

Reply via email to