braintree / braintree_java

Braintree Java library
https://developer.paypal.com/braintree/docs/start/overview
MIT License
158 stars 98 forks source link

Maven failed to build this java package #67

Closed BrianHo888 closed 5 years ago

BrianHo888 commented 5 years ago

2018-11-02_11-07-31

General information

Issue description

Maven failed to build this package. Please see attachment for detail. Based on the ReadMe, I enter "mvn package" command to build this package with no success. Any suggestion?

Thanks,

crookedneighbor commented 5 years ago

SDK/Library version: JAVA 11

What version of the Braintree SDK are you trying to download? You put the version of Java you are using instead.

kmichalak commented 5 years ago

@BrianHo888 The issue does not seem to be related to the library itself, but rather to the javac provided by JDK 11. If you will try to compile any class, even one that does not belong to the project using plain javac compiler with 1.5 source/target parameters set you will get error message like this

warning: [options] bootstrap class path not set in conjunction with -source 5        
error: Source option 5 is no longer supported. Use 6 or later.                                                          
error: Target option 1.5 is no longer supported. Use 1.6 or later.         

You can check it on yourself by running command

javac SomeClass.java -source 1.5 -target 1.5

For sure you should be able to compile the library using JDK 8. Also suggestion from error message to force minimum version of source/target Java version 1.6 will do the trick.

kmichalak commented 5 years ago

There is JEP 182: Policy for Retiring javac -source and -target which should explain the root cause of the problem.

BrianHo888 commented 5 years ago

SDK/Library version: JAVA 11

What version of the Braintree SDK are you trying to download? You put the version of Java you are using instead.

I downloaded it from: https://github.com/braintree/braintree_java

BrianHo888 commented 5 years ago

@BrianHo888 The issue does not seem to be related to the library itself, but rather to the javac provided by JDK 11. If you will try to compile any class, even one that does not belong to the project using plain javac compiler with 1.5 source/target parameters set you will get error message like this

warning: [options] bootstrap class path not set in conjunction with -source 5        
error: Source option 5 is no longer supported. Use 6 or later.                                                          
error: Target option 1.5 is no longer supported. Use 1.6 or later.         

You can check it on yourself by running command

javac SomeClass.java -source 1.5 -target 1.5

For sure you should be able to compile the library using JDK 8. Also suggestion from error message to force minimum version of source/target Java version 1.6 will do the trick.

@BrianHo888 The issue does not seem to be related to the library itself, but rather to the javac provided by JDK 11. If you will try to compile any class, even one that does not belong to the project using plain javac compiler with 1.5 source/target parameters set you will get error message like this

warning: [options] bootstrap class path not set in conjunction with -source 5        
error: Source option 5 is no longer supported. Use 6 or later.                                                          
error: Target option 1.5 is no longer supported. Use 1.6 or later.         

You can check it on yourself by running command

javac SomeClass.java -source 1.5 -target 1.5

For sure you should be able to compile the library using JDK 8. Also suggestion from error message to force minimum version of source/target Java version 1.6 will do the trick.

Thanks for the clarification. It looks like I will need to fallback to JDK 8 and see if I can compile it. Oracle will end JDK 8 support in 1/2019. I upgraded to JDK 11 from https://www.oracle.com/technetwork/java/javase/overview/index.html

crookedneighbor commented 5 years ago

This should no longer be an issue as of 2.96.0