[GitHub] trafodion pull request #1753: [TRAFODION-3241]support both jdk1.7 and jdk1.8
Github user kevinxu021 commented on a diff in the pull request: https://github.com/apache/trafodion/pull/1753#discussion_r239761192 --- Diff: core/conn/jdbcT4/Makefile --- @@ -26,17 +26,20 @@ include ../../macros.gmk #top level 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' - cp target/jdbcT4-${TRAFODION_VER}.jar ${TRAF_HOME}/export/lib - mkdir -p ../clients - mv target/jdbcT4-${TRAFODION_VER}.zip ../clients - #ln -sf ${TRAF_HOME}/export/lib/jdbcT4-${TRAFODION_VER}.jar ${TRAF_HOME}/export/lib/jdbcT4.jar - `cd ${TRAF_HOME}/export/lib;ln -sf jdbcT4-${TRAFODION_VER}.jar jdbcT4.jar` + @if [ ! -f target/*.jar ]; then \ --- End diff -- @narendragoyal @svarnau sure, it should be an exactly name. ---
[GitHub] trafodion pull request #1753: [TRAFODION-3241]support both jdk1.7 and jdk1.8
Github user kevinxu021 commented on a diff in the pull request: https://github.com/apache/trafodion/pull/1753#discussion_r239762073 --- Diff: core/conn/jdbcT4/Makefile --- @@ -26,17 +26,20 @@ include ../../macros.gmk #top level 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' - cp target/jdbcT4-${TRAFODION_VER}.jar ${TRAF_HOME}/export/lib - mkdir -p ../clients - mv target/jdbcT4-${TRAFODION_VER}.zip ../clients - #ln -sf ${TRAF_HOME}/export/lib/jdbcT4-${TRAFODION_VER}.jar ${TRAF_HOME}/export/lib/jdbcT4.jar - `cd ${TRAF_HOME}/export/lib;ln -sf jdbcT4-${TRAFODION_VER}.jar jdbcT4.jar` + @if [ ! -f target/*.jar ]; then \ + echo "$(MAVEN) install -DskipTests"; \ + set -o pipefail && $(MAVEN) install -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; \ + cd ${TRAF_HOME}/export/lib;ln -sf jdbcT4-${TRAFODION_VER}.jar jdbcT4.jar; \ + fi clean: - -$(MAVEN) clean | grep ERROR - $(RM) build_jdbct4.log ${TRAF_HOME}/export/lib/jdbcT4*.jar + @if [ -f target/*.jar ]; then \ --- End diff -- The classes are in folder "target". if this folder does not exist, 'mvn clean' actually will do nothing. So here yes it should b -d target. ---
[GitHub] trafodion pull request #1753: [TRAFODION-3241]support both jdk1.7 and jdk1.8
Github user svarnau commented on a diff in the pull request: https://github.com/apache/trafodion/pull/1753#discussion_r239634533 --- Diff: core/conn/jdbcT4/Makefile --- @@ -26,17 +26,20 @@ include ../../macros.gmk #top level 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' - cp target/jdbcT4-${TRAFODION_VER}.jar ${TRAF_HOME}/export/lib - mkdir -p ../clients - mv target/jdbcT4-${TRAFODION_VER}.zip ../clients - #ln -sf ${TRAF_HOME}/export/lib/jdbcT4-${TRAFODION_VER}.jar ${TRAF_HOME}/export/lib/jdbcT4.jar - `cd ${TRAF_HOME}/export/lib;ln -sf jdbcT4-${TRAFODION_VER}.jar jdbcT4.jar` + @if [ ! -f target/*.jar ]; then \ --- End diff -- If *.jar expands to more than one file, won't that generate a shell syntax error? ---
[GitHub] trafodion pull request #1753: [TRAFODION-3241]support both jdk1.7 and jdk1.8
Github user narendragoyal commented on a diff in the pull request: https://github.com/apache/trafodion/pull/1753#discussion_r239625627 --- Diff: core/conn/jdbcT4/Makefile --- @@ -26,17 +26,20 @@ include ../../macros.gmk #top level 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' - cp target/jdbcT4-${TRAFODION_VER}.jar ${TRAF_HOME}/export/lib - mkdir -p ../clients - mv target/jdbcT4-${TRAFODION_VER}.zip ../clients - #ln -sf ${TRAF_HOME}/export/lib/jdbcT4-${TRAFODION_VER}.jar ${TRAF_HOME}/export/lib/jdbcT4.jar - `cd ${TRAF_HOME}/export/lib;ln -sf jdbcT4-${TRAFODION_VER}.jar jdbcT4.jar` + @if [ ! -f target/*.jar ]; then \ + echo "$(MAVEN) install -DskipTests"; \ + set -o pipefail && $(MAVEN) install -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; \ + cd ${TRAF_HOME}/export/lib;ln -sf jdbcT4-${TRAFODION_VER}.jar jdbcT4.jar; \ + fi clean: - -$(MAVEN) clean | grep ERROR - $(RM) build_jdbct4.log ${TRAF_HOME}/export/lib/jdbcT4*.jar + @if [ -f target/*.jar ]; then \ --- End diff -- Just my opinion :) : I think the 'clean' target should not be conditional on the existence of the target/*JAR, it should execute the commands and perhaps the 'maven clean' will cleanup the intermediate class files also (even when a target/*.jar does not exist). ---