deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From johndam...@apache.org
Subject svn commit: r1653533 - /deltaspike/site/trunk/content/documentation/test-control.html
Date Wed, 21 Jan 2015 13:14:44 GMT
Author: johndament
Date: Wed Jan 21 13:14:43 2015
New Revision: 1653533

URL: http://svn.apache.org/r1653533
Log:
Site checkin for project Apache DeltaSpike Documentation

Modified:
    deltaspike/site/trunk/content/documentation/test-control.html

Modified: deltaspike/site/trunk/content/documentation/test-control.html
URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/documentation/test-control.html?rev=1653533&r1=1653532&r2=1653533&view=diff
==============================================================================
--- deltaspike/site/trunk/content/documentation/test-control.html (original)
+++ deltaspike/site/trunk/content/documentation/test-control.html Wed Jan 21 13:14:43 2015
@@ -236,6 +236,7 @@ body {
 <li><a href="#_known_restrictions">Known Restrictions</a>
 <ul class="sectlevel3">
 <li><a href="#_liquibase">Liquibase</a></li>
+<li><a href="#_gradle">Gradle</a></li>
 </ul>
 </li>
 <li><a href="#_spi">SPI</a>
@@ -781,6 +782,29 @@ mocking-support via:</p>
 <p>Further details are available at deactivatable.</p>
 </div>
 </div>
+<div class="sect3">
+<h4 id="_gradle">Gradle</h4>
+<div class="paragraph">
+<p>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:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="groovy">sourceSets {
+    main {
+        output.resourcesDir = <span class="string"><span class="delimiter">'</span><span
class="content">build/classes/main</span><span class="delimiter">'</span></span>
+        output.classesDir   = <span class="string"><span class="delimiter">'</span><span
class="content">build/classes/main</span><span class="delimiter">'</span></span>
+    }
+    test {
+        output.resourcesDir = <span class="string"><span class="delimiter">'</span><span
class="content">build/classes/test</span><span class="delimiter">'</span></span>
+        output.classesDir   = <span class="string"><span class="delimiter">'</span><span
class="content">build/classes/test</span><span class="delimiter">'</span></span>
+    }
+}</code></pre>
+</div>
+</div>
+</div>
 </div>
 <div class="sect2">
 <h3 id="_spi">SPI</h3>



Mime
View raw message