Skip to content
This repository has been archived by the owner on Jun 7, 2021. It is now read-only.

[TRAFODION-3241]support both jdk1.7 and jdk1.8 #1753

Closed
wants to merge 3 commits into from

Conversation

uamgo
Copy link
Contributor

@uamgo uamgo commented Nov 30, 2018

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.

@Traf-Jenkins
Copy link

Check Test Started: https://jenkins.esgyn.com/job/Check-PR-master/3046/

@Traf-Jenkins
Copy link

@Traf-Jenkins
Copy link

New Check Test Started: https://jenkins.esgyn.com/job/Check-PR-master/3049/

@Traf-Jenkins
Copy link

@DaveBirdsall
Copy link
Contributor

@svarnau, @selvaganesang, @narendragoyal, do any of you have concerns on this change?

Copy link
Contributor

@narendragoyal narendragoyal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple of comments.

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 \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If *.jar expands to more than one file, won't that generate a shell syntax error?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@narendragoyal @svarnau sure, it should be an exactly name.


clean:
-$(MAVEN) clean | grep ERROR
$(RM) build_jdbct4.log ${TRAF_HOME}/export/lib/jdbcT4*.jar
@if [ -f target/*.jar ]; then \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@Traf-Jenkins
Copy link

New Check Test Started: https://jenkins.esgyn.com/job/Check-PR-master/3055/

@Traf-Jenkins
Copy link

@selvaganesang
Copy link
Contributor

@kevinxu021 Are we compiling the sources to be compatible with JDK 1.7 or JDK 1.8? I am asking because I couldn't decipher from the changes and I am not familiar with maven rules. Also, I see the hard coded versions 1.7 is being changed to use property such as source.version and target.version

@uamgo
Copy link
Contributor Author

uamgo commented Dec 10, 2018

@selvaganesang it uses "[1.8,)" to activate the property "<javadoc.opts>-Xdoclint:none</javadoc.opts>", and with jdk1.8 you will got error while "mvn site". this is a preparation for our project running on jdk1.8. If this changes made, you can compile this project both on jdk1.7 and jdk1.8. So it's '-Xdoclint:none' stop JDK1.8 compatibility.

@selvaganesang
Copy link
Contributor

selvaganesang commented Dec 21, 2018

@kevinxu021 Thanks for the explanation. But, I am not sure if it answered my question. Can you please be specific if it is using JDK 1.8 or JDK1.7 to compile and produce JDK 1.7 compatible classes, This will allow the jar files to be used with JDK1.7 and JDK1.8. If so, you can proceed with merging this PR. BTW sorry for the delay in responding.

@uamgo
Copy link
Contributor Author

uamgo commented Dec 21, 2018

@selvaganesang Sorry for confused you. Here supporting JDK1.7 and JDK1.8 means compilation. Before the changes, those projects cannot be compiled on JDK1.8 actually. Then if we upgrade JDK from JDK1.7(current version) to JDK1.8, you will see some error on compilation time. This fixes are for that, to keep the code being compiled successfully on JDK1.7 and JDK1.8.

@uamgo
Copy link
Contributor Author

uamgo commented Jan 23, 2019

Closed because of conflict.

@uamgo uamgo closed this Jan 23, 2019
@uamgo uamgo deleted the javadoc branch January 23, 2019 12:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
6 participants