瀏覽代碼

[dmbs] Little tweaks in the Makefile

Romain Rigaux 10 年之前
父節點
當前提交
d3f2728bd4
共有 2 個文件被更改,包括 34 次插入7 次删除
  1. 7 7
      desktop/libs/librdbms/Makefile
  2. 27 0
      desktop/libs/librdbms/java/pom.xml

+ 7 - 7
desktop/libs/librdbms/Makefile

@@ -50,15 +50,15 @@ compile: $(DESKTOP_PLUGIN_JAR)
 # Build the plugin jar iff the source is present
 ifneq (,$(wildcard $(PLUGIN_JAVA_DIR)))
 $(DESKTOP_PLUGIN_JAR): $(shell find $(PLUGIN_JAVA_DIR) -type f)
-  mkdir -p $(PLUGIN_JAVA_LIB)
-  @echo "--- Building DBProxy plugin"
-  cd $(PLUGIN_JAVA_DIR) && mvn clean install -DskipTests $(MAVEN_OPTIONS)
-  cp $(BLD_DIR_PLUGINS)/dbproxy-$(MAVEN_VERSION).jar $(DESKTOP_PLUGIN_JAR)
+	mkdir -p $(PLUGIN_JAVA_LIB)
+	@echo "--- Building DBProxy plugin"
+	cd $(PLUGIN_JAVA_DIR) && mvn clean install -DskipTests $(MAVEN_OPTIONS)
+	cp $(BLD_DIR_PLUGINS)/dbproxy-1.0-SNAPSHOT.jar $(DESKTOP_PLUGIN_JAR)
 
 clean::
-  rm -rf $(PLUGIN_JAVA_LIB)
-  cd $(PLUGIN_JAVA_DIR) && mvn clean $(MAVEN_OPTIONS) ||:
+	rm -rf $(PLUGIN_JAVA_LIB)
+	cd $(PLUGIN_JAVA_DIR) && mvn clean $(MAVEN_OPTIONS) ||:
 else
 $(DESKTOP_PLUGIN_JAR):
-  $(error Cannot build DBProxy plugin without source)
+	$(error Cannot build DBProxy plugin without source)
 endif

+ 27 - 0
desktop/libs/librdbms/java/pom.xml

@@ -22,6 +22,13 @@
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
+    <parent>
+      <groupId>com.cloudera.hue</groupId>
+      <artifactId>hue-parent</artifactId>
+      <relativePath>../../../../maven/pom.xml</relativePath>
+      <version>3.9.0-SNAPSHOT</version>
+    </parent>
+
     <groupId>com.cloudera.hue</groupId>
     <artifactId>dbproxy</artifactId>
     <version>1.0-SNAPSHOT</version>
@@ -36,6 +43,26 @@
 
     <build>
     <plugins>
+
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-compiler-plugin</artifactId>
+          <version>3.0</version>
+          <configuration>
+            <source>${sourceJavaVersion}</source>
+            <target>${targetJavaVersion}</target>
+          </configuration>
+          <executions>
+            <execution>
+              <id>default-testCompile</id>
+              <phase>test-compile</phase> 
+              <goals>
+                <goal>testCompile</goal>
+              </goals>
+            </execution>                  
+          </executions>
+        </plugin>
+
         <plugin>
             <groupId>org.apache.maven.plugins</groupId>
             <artifactId>maven-jar-plugin</artifactId>