You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ol...@apache.org on 2016/09/21 20:14:24 UTC

svn commit: r1761806 - /sling/trunk/testing/org.apache.sling.testing.paxexam/README.md

Author: olli
Date: Wed Sep 21 20:14:24 2016
New Revision: 1761806

URL: http://svn.apache.org/viewvc?rev=1761806&view=rev
Log:
extend README

* add section for required dependencies
* add section for depends-maven-plugin
* add note for SlingVersionResolver#setVersionFromProject(\u2026)

Modified:
    sling/trunk/testing/org.apache.sling.testing.paxexam/README.md

Modified: sling/trunk/testing/org.apache.sling.testing.paxexam/README.md
URL: http://svn.apache.org/viewvc/sling/trunk/testing/org.apache.sling.testing.paxexam/README.md?rev=1761806&r1=1761805&r2=1761806&view=diff
==============================================================================
--- sling/trunk/testing/org.apache.sling.testing.paxexam/README.md (original)
+++ sling/trunk/testing/org.apache.sling.testing.paxexam/README.md Wed Sep 21 20:14:24 2016
@@ -15,6 +15,50 @@ Apache Sling Testing Pax Exam
 Getting Started
 ---------------
 
+Add required dependencies:
+
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.sling</groupId>
+      <artifactId>org.apache.sling.testing.paxexam</artifactId>
+      <version>${org.apache.sling.testing.paxexam.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.ops4j.pax.exam</groupId>
+      <artifactId>pax-exam</artifactId>
+      <version>${org.ops4j.pax.exam.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.ops4j.pax.exam</groupId>
+      <artifactId>pax-exam-cm</artifactId>
+      <version>${org.ops4j.pax.exam.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.ops4j.pax.exam</groupId>
+      <artifactId>pax-exam-container-forked</artifactId>
+      <version>${org.ops4j.pax.exam.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.ops4j.pax.exam</groupId>
+      <artifactId>pax-exam-junit4</artifactId>
+      <version>${org.ops4j.pax.exam.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.ops4j.pax.exam</groupId>
+      <artifactId>pax-exam-link-mvn</artifactId>
+      <version>${org.ops4j.pax.exam.version}</version>
+      <scope>test</scope>
+    </dependency>
+
 Configure the build artifact (*bundle*) to use in integration testing in `pom.xml`:
 
       <plugin>
@@ -39,6 +83,21 @@ Configure the build artifact (*bundle*)
         </configuration>
       </plugin>
 
+Add `depends-maven-plugin` when using `TestSupport#baseConfiguration()` or `SlingVersionResolver#setVersionFromProject(…)` (see below):
+
+      <plugin>
+        <groupId>org.apache.servicemix.tooling</groupId>
+        <artifactId>depends-maven-plugin</artifactId>
+        <version>1.3.1</version>
+        <executions>
+          <execution>
+            <goals>
+              <goal>generate-depends-file</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+
 Create a test class (extend `TestSupport` to use helper methods and `Option`s) and provide a *Configuration* (`Option[]`) for Pax Exam:
 
     @Configuration
@@ -66,3 +125,7 @@ Create a test class (extend `TestSupport
 **Overriding (or adding) versions:**
 
     SlingOptions.versionResolver.setVersion(SLING_GROUP_ID, "org.apache.sling.jcr.oak.server", "1.1.0");
+
+using a version from project (`pom.xml`):
+
+    SlingOptions.versionResolver.setVersionFromProject(SLING_GROUP_ID, "org.apache.sling.jcr.oak.server");
\ No newline at end of file