snowdrop / java-buildpack-client

A simple buildpack (https://buildpacks.io/) platform implementation as a library for java..
Apache License 2.0
13 stars 7 forks source link

A java-buildpack-client that can work with Java 8 #14

Closed fatiiates closed 2 years ago

fatiiates commented 2 years ago

I only changed one line of java code. Additionally, I have downgrade the version of the maven-compiler-plugin in pom.xml to Java 8.

BarDweller commented 2 years ago

I'll have a look at this later.. I want to look at what adding the commons util dep does to the overall size / dep graph.. with it only being used for the one place, I might just write my own mini stream copy method, if that means avoiding adding additional stuff that may conflict in projects that consume this one. Not a big problem, but worth understanding =)

fatiiates commented 2 years ago

I found a piece of code while researching earlier. However, I used the IOUtils class, thinking it would be healthier to give the job to a dependency. This piece of code does roughly the same things as the IOUtils.copy method. It just contains less error checking. And when I tested the system with this piece of code, I did not encounter an error. What do you think, should we remove the dependency ?

fatiiates commented 2 years ago

In addition, pom.xml creates a problem when compiling with java8. The release tag, which is in the maven-compiler-plugin(line 83) configuration as follows, started to be supported with java11.

      <configuration>
            <release>8</release>
      </configuration>

So we need to change that line as follows.

      <configuration>
            <source>1.8</source>
            <target>1.8</target>                
      </configuration>
iocanel commented 2 years ago

@fatiiates: To speed things up I created a new PR for this that includes your commits (squashed into one) plus the requested changes. Thanks for the pushing this forward and for your contribution!