You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by db...@apache.org on 2016/01/27 23:48:09 UTC

[2/4] incubator-trafodion git commit: Make JDBC dependencies optional

Make JDBC dependencies optional

For DCS & REST, move JDBC driver dependencies to profile in pom.xml
file. The profile is enabled by default, but this allows a command
line option to ignore them. This enables building the docs without
building the drivers.


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

Branch: refs/heads/master
Commit: a41cb8c262bbfb99fbd27f09f504685a21f1a91d
Parents: e5b4ea6
Author: Steve Varnau <st...@esgyn.com>
Authored: Tue Jan 26 00:01:05 2016 +0000
Committer: Steve Varnau <st...@esgyn.com>
Committed: Tue Jan 26 00:01:05 2016 +0000

----------------------------------------------------------------------
 core/rest/pom.xml                  | 22 +++++++++++++++------
 dcs/pom.xml                        | 34 +++++++++++++++++++++------------
 docs/src/site/markdown/document.md |  2 ++
 3 files changed, 40 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/a41cb8c2/core/rest/pom.xml
----------------------------------------------------------------------
diff --git a/core/rest/pom.xml b/core/rest/pom.xml
index e7f2505..540660a 100644
--- a/core/rest/pom.xml
+++ b/core/rest/pom.xml
@@ -699,16 +699,26 @@
       <artifactId>jettison</artifactId>
       <version>${jettison.version}</version>
     </dependency>
-    <!-- JDBCT4 dependencies -->    
-    <dependency>    
-      <groupId>org.trafodion.jdbc.t4.T4Driver</groupId>
-      <artifactId>t4driver</artifactId>
-      <version>${jdbct4.version}</version>
-    </dependency>
  
   </dependencies>
   
   <profiles>
+    <!-- JDBC drivers needed for compile, but not site docs
+         This allows turning off dependency on command line (-P '!jdbc') -->
+    <profile>
+      <id>jdbc</id>
+      <activation>
+        <activeByDefault>true</activeByDefault>
+      </activation>
+      <dependencies>    
+        <!-- JDBCT4 dependencies -->    
+        <dependency>    
+          <groupId>org.trafodion.jdbc.t4.T4Driver</groupId>
+          <artifactId>t4driver</artifactId>
+          <version>${jdbct4.version}</version>
+        </dependency>
+      </dependencies>    
+    </profile>
     <profile>
       <id>runSmallTests</id>
       <activation>

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/a41cb8c2/dcs/pom.xml
----------------------------------------------------------------------
diff --git a/dcs/pom.xml b/dcs/pom.xml
index 284420b..1fb2938 100644
--- a/dcs/pom.xml
+++ b/dcs/pom.xml
@@ -798,21 +798,31 @@
       <artifactId>displaytag-export-poi</artifactId>
       <version>${displaytag.version}</version>
     </dependency> 
-    <!-- JDBCT4 dependencies -->    
-    <dependency>    
-      <groupId>org.trafodion.jdbc.t4.T4Driver</groupId>
-      <artifactId>t4driver</artifactId>
-      <version>${jdbct4.version}</version>
-    </dependency>
-    <!-- JDBCT2 dependencies -->    
-    <dependency>    
-      <groupId>org.trafodion.jdbc.t2.T2Driver</groupId>
-      <artifactId>t2driver</artifactId>
-      <version>${jdbct2.version}</version>
-    </dependency>
   </dependencies>
   
   <profiles>
+    <!-- JDBC drivers needed for compile, but not site docs 
+	 This allows turning off dependency on command line (-P '!jdbc') -->
+    <profile>
+      <id>jdbc</id>
+      <activation>
+        <activeByDefault>true</activeByDefault>
+      </activation>
+      <dependencies>
+         <!-- JDBCT4 dependencies -->    
+         <dependency>    
+            <groupId>org.trafodion.jdbc.t4.T4Driver</groupId>
+            <artifactId>t4driver</artifactId>
+            <version>${jdbct4.version}</version>
+         </dependency>
+         <!-- JDBCT2 dependencies -->    
+         <dependency>    
+            <groupId>org.trafodion.jdbc.t2.T2Driver</groupId>
+            <artifactId>t2driver</artifactId>
+            <version>${jdbct2.version}</version>
+         </dependency>
+      </dependencies>
+    </profile>
     <profile>
       <id>runSmallTests</id>
       <activation>

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/a41cb8c2/docs/src/site/markdown/document.md
----------------------------------------------------------------------
diff --git a/docs/src/site/markdown/document.md b/docs/src/site/markdown/document.md
index fe400cb..9af80de 100644
--- a/docs/src/site/markdown/document.md
+++ b/docs/src/site/markdown/document.md
@@ -72,6 +72,7 @@ Once you have made the desired changes, then do the following:
 
 1. Be sure to source env.sh, so that the TRAFODION_VER environment variable is defined.
 2. Build the document using **```mvn clean site```** in the directory containing the document; for example: **```dcs```** or **```docs/odb_user```**.
+   * If you have not previously built the JDBC drivers, the DCS and REST documents will give spurious errors about missing that dependency. The documents can be built fine, skipping over that dependency using **```mvn -P'!jdbc' site```**.
 3. Verify the content in the generated **```target```** directory. 
    * The **```target/index.html```** file provides the entry point for the web book. 
    * For those that have API documentation, the **```target/apidocs/index.html```** file contains the entry point.
@@ -81,6 +82,7 @@ Once you have made the desired changes, then do the following:
 
 1. Be sure to source env.sh, so that the TRAFODION_VER environment variable is defined.
 2. Build everything using **```mvn clean post-site```** in the top-level directory.
+   * As above, to skip over JDBC dependency, use **```mvn -P'!jdbc' post-site```**.
 3. Verify the contents in the generated **```docs/target```** directory.
    * All documents are in **```docs/target/docs```** directory.