From 5a3988c8e7e5592db382188438d65b73ab7e56fa Mon Sep 17 00:00:00 2001 From: Kevin Xu Date: Wed, 23 May 2018 15:36:36 +0800 Subject: [PATCH 1/7] Support debug mode whatever you were on win/linux --- core/conn/jdbcT4/Makefile | 4 +- core/conn/jdbcT4/pom.xml | 71 ++++++++++++++++++------------ core/conn/trafci/Makefile | 8 ++-- core/conn/trafci/installer_pom.xml | 25 +++++++++-- core/conn/trafci/pom.xml | 25 +++++++++-- 5 files changed, 90 insertions(+), 43 deletions(-) diff --git a/core/conn/jdbcT4/Makefile b/core/conn/jdbcT4/Makefile index 10ade68b41..51f86ea237 100644 --- a/core/conn/jdbcT4/Makefile +++ b/core/conn/jdbcT4/Makefile @@ -27,7 +27,7 @@ all: build_all build_all: LICENSE NOTICE echo "$(MAVEN) package -DskipTests" - set -o pipefail && $(MAVEN) package -DskipTests | tee build_jdbct4.log | grep --line-buffered -E -e '^\[[^WId]' -e '^\[INFO\] B[Uu][Ii][Ll][Dd]' -e 'to compile' + set -o pipefail && $(MAVEN) -Pproduction package -DskipTests | tee build_jdbct4.log | grep --line-buffered -E -e '^\[[^WId]' -e '^\[INFO\] B[Uu][Ii][Ll][Dd]' -e 'to compile' cp target/jdbcT4-${TRAFODION_VER}.jar ${TRAF_HOME}/export/lib mkdir -p ../clients mv target/jdbcT4-${TRAFODION_VER}.zip ../clients @@ -35,7 +35,7 @@ build_all: LICENSE NOTICE `cd ${TRAF_HOME}/export/lib;ln -sf jdbcT4-${TRAFODION_VER}.jar jdbcT4.jar` clean: - -$(MAVEN) clean | grep ERROR + -$(MAVEN) -Pproduction clean | grep ERROR $(RM) build_jdbct4.log ${TRAF_HOME}/export/lib/jdbcT4*.jar LICENSE: ../../../licenses/LICENSE-clients diff --git a/core/conn/jdbcT4/pom.xml b/core/conn/jdbcT4/pom.xml index 1750c4228a..bf3cbfd65c 100644 --- a/core/conn/jdbcT4/pom.xml +++ b/core/conn/jdbcT4/pom.xml @@ -27,18 +27,11 @@ --> 4.0.0 - org.apache.trafodion.jdbc.t4 jdbcT4 - ${env.TRAFODION_VER} Trafodion JDBC Type4 Driver http://wiki.trafodion.org - + ${INTERNAL_VERSION} apache.snapshots.https @@ -115,26 +108,6 @@ - - org.codehaus.mojo - properties-maven-plugin - 1.0.0 - - - initialize - - read-project-properties - - - - ${basedir}/../../sqf/export/include/SCMBuildMan.mf - ${basedir}/../../sqf/export/include/buildId - - - - - - maven-clean-plugin 2.4.1 @@ -161,7 +134,7 @@ dependency-jars/ - Version ${project.version} + Version ${project.version} ${TRAFODION_VER_PROD} Release ${project.version} ${Implementation-Version-3} ${Implementation-Version-4} @@ -213,6 +186,46 @@ + + dev + + 0.1 + + + true + + + + production + + ${env.TRAFODION_VER} + ${basedir}/../../sqf/export/include/SCMBuildMan.mf + ${basedir}/../../sqf/export/include/buildId + + + + + org.codehaus.mojo + properties-maven-plugin + 1.0.0 + + + initialize + + read-project-properties + + + + ${mfFile} + ${buildIdFile} + + + + + + + + apache-release diff --git a/core/conn/trafci/Makefile b/core/conn/trafci/Makefile index bc0b26f3ba..c02f628e7f 100644 --- a/core/conn/trafci/Makefile +++ b/core/conn/trafci/Makefile @@ -27,15 +27,15 @@ all:Trafci_deploy Trafci_deploy:Trafci_installer Trafci_installer:Trafci_jar Trafci_jar: - mvn clean install -DskipTests$ + mvn -Pproduction install -DskipTests$ Trafci_installer: ./getBuildInfo export buildId=`head -n 1 buildId` - mvn -f installer_pom.xml -DbldId=${buildId} clean package -DskipTests + mvn -Pproduction -f installer_pom.xml -DbldId=${buildId} package -DskipTests Trafci_deploy: zip -r ../clients/trafci.zip -j target/trafciInstaller.jar utils/README java -jar target/trafciInstaller.jar -silent -installDir ${TRAF_HOME} clean: - mvn -f installer_pom.xml clean - mvn -f pom.xml clean + mvn -Pproduction -f installer_pom.xml clean + mvn -Pproduction -f pom.xml clean diff --git a/core/conn/trafci/installer_pom.xml b/core/conn/trafci/installer_pom.xml index 242d68752e..6ed8b1688a 100644 --- a/core/conn/trafci/installer_pom.xml +++ b/core/conn/trafci/installer_pom.xml @@ -22,12 +22,12 @@ org.trafodion trafciInstaller jar - ${TRAFODION_VER} + ${INTERNAL_VERSION} Trafodion Trafci . - ${TRAFODION_VER} - ${TRAFODION_VER} + ${project.version} + ${project.version} @@ -38,7 +38,7 @@ org.apache.trafodion.jdbc.t4 jdbcT4 - ${TRAFODION_VER} + ${project.version} @@ -116,4 +116,21 @@ + + + dev + + 0.1 + + + true + + + + production + + ${env.TRAFODION_VER} + + + diff --git a/core/conn/trafci/pom.xml b/core/conn/trafci/pom.xml index 4f37fb36d9..461f62bd7a 100644 --- a/core/conn/trafci/pom.xml +++ b/core/conn/trafci/pom.xml @@ -30,19 +30,19 @@ org.trafodion trafci jar - ${TRAFODION_VER} + ${INTERNAL_VERSION} Trafodion Trafci 9.2.6.v20141205 - ${TRAFODION_VER} - ${TRAFODION_VER} + ${project.version} + ${project.version} 2.12 org.apache.trafodion.jdbc.t4 jdbcT4 - ${TRAFODION_VER} + ${project.version} provided @@ -137,4 +137,21 @@ + + + dev + + 0.1 + + + true + + + + production + + ${env.TRAFODION_VER} + + + From 94f91acd37cefa24517482d1703cbacb122a4fba Mon Sep 17 00:00:00 2001 From: Kevin Xu Date: Wed, 23 May 2018 17:46:58 +0800 Subject: [PATCH 2/7] support compile in IDE --- core/conn/jdbc_type2/Makefile | 4 +- core/conn/jdbc_type2/pom.xml | 87 ++++++++++++++++++++++++++--------- dcs/Makefile | 6 +-- dcs/pom.xml | 67 ++++++++++++++++++--------- 4 files changed, 116 insertions(+), 48 deletions(-) diff --git a/core/conn/jdbc_type2/Makefile b/core/conn/jdbc_type2/Makefile index 9ed2b4fc3b..910ba07d15 100644 --- a/core/conn/jdbc_type2/Makefile +++ b/core/conn/jdbc_type2/Makefile @@ -86,7 +86,7 @@ all: LICENSE NOTICE $(LIBEXPDIR)/libjdbcT2.so $(EXPROOT)/lib/jdbcT2.jar: ./getBuildInfo - $(MAVEN) install -DskipTests + $(MAVEN) -Pproduction install -DskipTests $(CP) target/trafjdbcT2-${TRAFODION_VER}.jar $(EXPROOT)/lib `cd ${TRAF_HOME}/export/lib;$(LN) trafjdbcT2-${TRAFODION_VER}.jar jdbcT2.jar` $(JAVAH) -cp $(EXPROOT)/lib/jdbcT2.jar -d native $(CSES) @@ -99,7 +99,7 @@ $(OBJS): $(EXPROOT)/lib/jdbcT2.jar $(OUTDIR)/type2version.o: $(TRAF_HOME)/export/include/SCMBuildStr.h clean: - $(MAVEN) clean + $(MAVEN) -Pproduction clean $(RM) $(LIBEXPDIR)/libjdbcT2.so $(RM) -f $(EXPROOT)/lib/jdbcT2*.jar $(RM) -rf $(OUTDIR) diff --git a/core/conn/jdbc_type2/pom.xml b/core/conn/jdbc_type2/pom.xml index 038b349858..2f8724645d 100644 --- a/core/conn/jdbc_type2/pom.xml +++ b/core/conn/jdbc_type2/pom.xml @@ -26,9 +26,67 @@ org.apache.trafodion.jdbc trafjdbcT2 jar - ${env.TRAFODION_VER} + ${INTERNAL_VERSION} jdbcT2 http://maven.apache.org + + + dev + + 0.1 + + + true + + + + production + + ${env.TRAFODION_VER} + + + + + org.codehaus.mojo + properties-maven-plugin + 1.0.0 + + + initialize + + read-project-properties + + + + ${basedir}/../../sqf/export/include/SCMBuildMan.mf + ${basedir}/buildId + + + + + + + maven-antrun-plugin + 1.8 + + + generate-sources + + + + + + + + run + + + + + + + + junit @@ -39,25 +97,6 @@ - - org.codehaus.mojo - properties-maven-plugin - 1.0.0 - - - initialize - - read-project-properties - - - - ${basedir}/../../sqf/export/include/SCMBuildMan.mf - ${basedir}/buildId - - - - - maven-antrun-plugin 1.8 @@ -69,8 +108,6 @@ - - @@ -104,4 +141,10 @@ + + + mvnrepository + https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-resources-plugin + + diff --git a/dcs/Makefile b/dcs/Makefile index 76c64b92d2..9eb014afd5 100644 --- a/dcs/Makefile +++ b/dcs/Makefile @@ -32,9 +32,9 @@ GENVERS =./genvers all: build_all build_all: build_chk - echo "$(MAVEN) site package -DskipTests" + echo "$(MAVEN) -Pproduction site package -DskipTests" echo "### For full Maven output, see file build_dcs.log" - set -o pipefail && $(MAVEN) site package -DskipTests | tee build_dcs.log | grep --line-buffered -E -e '^\[[^WId]' -e '^\[INFO\] B[Uu][Ii][Ll][Dd]' -e 'to compile' + set -o pipefail && $(MAVEN) -Pproduction site package -DskipTests | tee build_dcs.log | grep --line-buffered -E -e '^\[[^WId]' -e '^\[INFO\] B[Uu][Ii][Ll][Dd]' -e 'to compile' $(RM) $(VFILE) build_chk: @@ -43,7 +43,7 @@ build_chk: @if [ $(TRAF_HOME)/export/include/SCMBuildStr.h -nt target/$(BLD_TRAFODION_DCS_TARNAME) ]; then echo "update manifest"; $(RM) -f target/$(BLD_TRAFODION_DCS_TARNAME); fi clean: - -$(MAVEN) clean | grep ERROR + -$(MAVEN) -Pproduction clean | grep ERROR $(RM) build_dcs.log $(RM) $(VFILE) $(RM) ../${DISTRIBUTION_DIR}/$(BLD_TRAFODION_DCS_TARNAME) diff --git a/dcs/pom.xml b/dcs/pom.xml index 206e424489..f7ae125585 100644 --- a/dcs/pom.xml +++ b/dcs/pom.xml @@ -34,10 +34,10 @@ org.trafodion dcs jar - ${env.TRAFODION_VER} + ${INTERNAL_VERSION} Trafodion Database Connectivity Services http://wiki.trafodion.org - + matbrown @@ -305,7 +305,7 @@ - ${basedir}/target/test-classes/jdbcT4-${TRAFODION_VER}.jar + ${basedir}/target/test-classes/jdbcT4-${project.version}.jar ${integrationtest.include} @@ -471,7 +471,7 @@ 1.6 - ${env.HADOOP_DEP_VER} + ${HADOOP_DEP_VER} 1.2 1.4 2.1 @@ -650,32 +650,45 @@ jamon-runtime ${jamon.runtime.version} + + + org.apache.trafodion.jdbc.t4 + jdbcT4 + ${jdbct4.version} + + + + org.apache.trafodion.jdbc + trafjdbcT2 + ${jdbct2.version} + - - jdbc + dev + + 0.1 + 2.6.0 + true - - - - org.apache.trafodion.jdbc.t4 - jdbcT4 - ${jdbct4.version} - - - - org.apache.trafodion.jdbc - trafjdbcT2 - ${jdbct2.version} - - + + + + production + + ${env.TRAFODION_VER} + ${env.HADOOP_DEP_VER} + runSmallTests + + ${env.TRAFODION_VER} + ${env.HADOOP_DEP_VER} + false @@ -688,6 +701,10 @@ runMediumTests + + ${env.TRAFODION_VER} + ${env.HADOOP_DEP_VER} + false @@ -700,6 +717,10 @@ runLargeTests + + ${env.TRAFODION_VER} + ${env.HADOOP_DEP_VER} + false @@ -712,6 +733,10 @@ runAllTests + + ${env.TRAFODION_VER} + ${env.HADOOP_DEP_VER} + false From f061bc3f63adc4a7ceccb38cc3555449c6f663e1 Mon Sep 17 00:00:00 2001 From: kevinxu021 Date: Tue, 29 May 2018 05:28:30 +0000 Subject: [PATCH 3/7] fixed exiting issue while mvn error --- core/Makefile | 2 +- core/conn/jdbcT4/Makefile | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/Makefile b/core/Makefile index bbd0878fbb..cfef026a91 100644 --- a/core/Makefile +++ b/core/Makefile @@ -68,7 +68,7 @@ foundation: sqroot dbsecurity $(MPI_TARGET) $(SEAMONSTER_TARGET) cd sqf && $(MAKE) all jdbc_jar: verhdr - cd conn/jdbcT4 && $(MAKE) 2>&1 && $(MAVEN) install | sed -e "s/$$/ ##(JDBCT4)/";exit $${PIPESTATUS[0]} + cd conn/jdbcT4 && $(MAKE) 2>&1 | sed -e "s/$$/ ##(JDBCT4)/";exit $${PIPESTATUS[0]} dcs: jdbc_jar jdbc_type2_jar cd ../dcs && $(MAKE) 2>&1 | sed -e "s/$$/ ##(DCS)/" ; exit $${PIPESTATUS[0]} diff --git a/core/conn/jdbcT4/Makefile b/core/conn/jdbcT4/Makefile index 51f86ea237..0ef0764da7 100644 --- a/core/conn/jdbcT4/Makefile +++ b/core/conn/jdbcT4/Makefile @@ -27,7 +27,7 @@ all: build_all build_all: LICENSE NOTICE echo "$(MAVEN) package -DskipTests" - set -o pipefail && $(MAVEN) -Pproduction package -DskipTests | tee build_jdbct4.log | grep --line-buffered -E -e '^\[[^WId]' -e '^\[INFO\] B[Uu][Ii][Ll][Dd]' -e 'to compile' + set -o pipefail && $(MAVEN) -Pproduction install -DskipTests | tee build_jdbct4.log | grep --line-buffered -E -e '^\[[^WId]' -e '^\[INFO\] B[Uu][Ii][Ll][Dd]' -e 'to compile'; exit $${PIPESTATUS[0]} cp target/jdbcT4-${TRAFODION_VER}.jar ${TRAF_HOME}/export/lib mkdir -p ../clients mv target/jdbcT4-${TRAFODION_VER}.zip ../clients @@ -35,7 +35,7 @@ build_all: LICENSE NOTICE `cd ${TRAF_HOME}/export/lib;ln -sf jdbcT4-${TRAFODION_VER}.jar jdbcT4.jar` clean: - -$(MAVEN) -Pproduction clean | grep ERROR + @$(MAVEN) -Pproduction clean; exit $$? $(RM) build_jdbct4.log ${TRAF_HOME}/export/lib/jdbcT4*.jar LICENSE: ../../../licenses/LICENSE-clients From 3ebfc89102d21d98f338c83e900c2aa0e3d1bc0a Mon Sep 17 00:00:00 2001 From: kevinxu021 Date: Tue, 29 May 2018 09:03:37 +0000 Subject: [PATCH 4/7] Change to tofile for antrun plugin --- core/conn/jdbc_type2/Makefile | 2 +- core/conn/jdbc_type2/pom.xml | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/core/conn/jdbc_type2/Makefile b/core/conn/jdbc_type2/Makefile index 910ba07d15..1add1204ae 100644 --- a/core/conn/jdbc_type2/Makefile +++ b/core/conn/jdbc_type2/Makefile @@ -86,7 +86,7 @@ all: LICENSE NOTICE $(LIBEXPDIR)/libjdbcT2.so $(EXPROOT)/lib/jdbcT2.jar: ./getBuildInfo - $(MAVEN) -Pproduction install -DskipTests + $(MAVEN) -Pproduction install -DskipTests|echo "";exit $${PIPESTATUS} $(CP) target/trafjdbcT2-${TRAFODION_VER}.jar $(EXPROOT)/lib `cd ${TRAF_HOME}/export/lib;$(LN) trafjdbcT2-${TRAFODION_VER}.jar jdbcT2.jar` $(JAVAH) -cp $(EXPROOT)/lib/jdbcT2.jar -d native $(CSES) diff --git a/core/conn/jdbc_type2/pom.xml b/core/conn/jdbc_type2/pom.xml index 2f8724645d..35b7355577 100644 --- a/core/conn/jdbc_type2/pom.xml +++ b/core/conn/jdbc_type2/pom.xml @@ -29,6 +29,9 @@ ${INTERNAL_VERSION} jdbcT2 http://maven.apache.org + + 1.8 + dev @@ -67,14 +70,14 @@ maven-antrun-plugin - 1.8 + ${ANTRUN_VER} generate-sources - - + + @@ -99,7 +102,7 @@ maven-antrun-plugin - 1.8 + ${ANTRUN_VER} generate-sources From 52c7426825ae1a736a0fb593439fab5b0e917b2c Mon Sep 17 00:00:00 2001 From: kevinxu021 Date: Tue, 29 May 2018 10:06:51 +0000 Subject: [PATCH 5/7] print jdbct2 error message --- core/conn/jdbc_type2/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/conn/jdbc_type2/Makefile b/core/conn/jdbc_type2/Makefile index 1add1204ae..7b05e5c291 100644 --- a/core/conn/jdbc_type2/Makefile +++ b/core/conn/jdbc_type2/Makefile @@ -86,7 +86,7 @@ all: LICENSE NOTICE $(LIBEXPDIR)/libjdbcT2.so $(EXPROOT)/lib/jdbcT2.jar: ./getBuildInfo - $(MAVEN) -Pproduction install -DskipTests|echo "";exit $${PIPESTATUS} + $(MAVEN) -Pproduction install -DskipTests|tee build_jdbct2.log | grep --line-buffered -E -e '^\[[^WId]' -e '^\[INFO\] B[Uu][Ii][Ll][Dd]' -e 'to compile'; exit $${PIPESTATUS[0]};exit $${PIPESTATUS} $(CP) target/trafjdbcT2-${TRAFODION_VER}.jar $(EXPROOT)/lib `cd ${TRAF_HOME}/export/lib;$(LN) trafjdbcT2-${TRAFODION_VER}.jar jdbcT2.jar` $(JAVAH) -cp $(EXPROOT)/lib/jdbcT2.jar -d native $(CSES) From 96e5a6447b64f53cd2ee8e030008789860b5d823 Mon Sep 17 00:00:00 2001 From: kevinxu021 Date: Wed, 30 May 2018 01:48:31 +0000 Subject: [PATCH 6/7] Support antrun in different profile --- core/conn/jdbc_type2/Makefile | 1 + core/conn/jdbc_type2/pom.xml | 45 ++++++++++++++++++++--------------- 2 files changed, 27 insertions(+), 19 deletions(-) diff --git a/core/conn/jdbc_type2/Makefile b/core/conn/jdbc_type2/Makefile index 7b05e5c291..14338b5443 100644 --- a/core/conn/jdbc_type2/Makefile +++ b/core/conn/jdbc_type2/Makefile @@ -104,6 +104,7 @@ clean: $(RM) -f $(EXPROOT)/lib/jdbcT2*.jar $(RM) -rf $(OUTDIR) $(RM) -rf $(BUILD_PLAT) + $(RM) -rf src/main/java/org/apache/trafodion/jdbc/t2/DriverInfo.java echo '$(CSES)'|sed -e 's/\./_/g' -e 's/[[:space:]]/\n/g' |xargs -i rm -f 'native/{}.h' cleanall: clean diff --git a/core/conn/jdbc_type2/pom.xml b/core/conn/jdbc_type2/pom.xml index 35b7355577..bbe53dfe1e 100644 --- a/core/conn/jdbc_type2/pom.xml +++ b/core/conn/jdbc_type2/pom.xml @@ -41,6 +41,29 @@ true + + + + maven-antrun-plugin + ${ANTRUN_VER} + + + initialize + + + + + + + + + run + + + + + + production @@ -78,6 +101,9 @@ + + + @@ -100,25 +126,6 @@ - - maven-antrun-plugin - ${ANTRUN_VER} - - - generate-sources - - - - - - - - - run - - - - org.apache.maven.plugins maven-jar-plugin From 6aed705b54c63d7b395708206dcfbd076ea64862 Mon Sep 17 00:00:00 2001 From: kevinxu021 Date: Sat, 2 Jun 2018 07:30:37 +0000 Subject: [PATCH 7/7] support production profile --- dcs/pom.xml | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/dcs/pom.xml b/dcs/pom.xml index f7ae125585..28b6f11d69 100644 --- a/dcs/pom.xml +++ b/dcs/pom.xml @@ -664,6 +664,15 @@ + + disable-javadoc-doclint + + [1.8,) + + + -Xdoclint:none + + dev @@ -685,14 +694,12 @@ runSmallTests - - ${env.TRAFODION_VER} - ${env.HADOOP_DEP_VER} - false + ${env.TRAFODION_VER} + ${env.HADOOP_DEP_VER} false true org.trafodion.dcs.SmallTests @@ -701,14 +708,12 @@ runMediumTests - - ${env.TRAFODION_VER} - ${env.HADOOP_DEP_VER} - false + ${env.TRAFODION_VER} + ${env.HADOOP_DEP_VER} false true org.trafodion.dcs.MediumTests @@ -717,14 +722,12 @@ runLargeTests - - ${env.TRAFODION_VER} - ${env.HADOOP_DEP_VER} - false + ${env.TRAFODION_VER} + ${env.HADOOP_DEP_VER} false true org.trafodion.dcs.LargeTests @@ -733,14 +736,12 @@ runAllTests - - ${env.TRAFODION_VER} - ${env.HADOOP_DEP_VER} - false + ${env.TRAFODION_VER} + ${env.HADOOP_DEP_VER} false false org.trafodion.dcs.SmallTests @@ -767,6 +768,7 @@ ${maven.javadoc.plugin.version} true + ${javadoc.opts}