You are viewing a plain text version of this content. The canonical link for it is here.
Posted to codereview@trafodion.apache.org by kevinxu021 <gi...@git.apache.org> on 2018/11/30 09:26:24 UTC
[GitHub] trafodion pull request #1753: [TRAFODION-3241]support both jdk1.7 and jdk1.8
GitHub user kevinxu021 opened a pull request:
https://github.com/apache/trafodion/pull/1753
[TRAFODION-3241]support both jdk1.7 and jdk1.8
Previously, it doesnot support jdk1.8 because of site. Here use profile as a solution. By the way, to accelerate to the compilation speed, add if-else in Makefile that if you want to re-compile, please do make clean first. With my experiences, most of the time if the error is not in DCS/JDBC, you might not want to recompile this module.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/kevinxu021/incubator-trafodion javadoc
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/trafodion/pull/1753.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1753
----
commit b1a5d7b38e4efbdfad607907783f908c71b202e9
Author: Kevin Xu <ka...@...>
Date: 2018-11-30T09:20:15Z
support both jdk1.7 and jdk1.8
----
---
[GitHub] trafodion pull request #1753: [TRAFODION-3241]support both jdk1.7 and jdk1.8
Posted by narendragoyal <gi...@git.apache.org>.
Github user narendragoyal commented on a diff in the pull request:
https://github.com/apache/trafodion/pull/1753#discussion_r239623274
--- 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 --
Instead of target/*.jar, should it check for the exact file that we are trying to build. What if TRAFODION_VER changes or there is some other JAR already in the 'target' directory.
---
[GitHub] trafodion pull request #1753: [TRAFODION-3241]support both jdk1.7 and jdk1.8
Posted by narendragoyal <gi...@git.apache.org>.
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).
---
[GitHub] trafodion pull request #1753: [TRAFODION-3241]support both jdk1.7 and jdk1.8
Posted by svarnau <gi...@git.apache.org>.
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
Posted by kevinxu021 <gi...@git.apache.org>.
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
Posted by kevinxu021 <gi...@git.apache.org>.
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.
---