flynn-archive / slugbuilder

Archived -- see https://github.com/flynn/flynn

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Doesn't honor system.properties while building

davidkarlsen opened this issue · comments

Even though my system.properties file in the root of the project contains :
java.runtime.version=1.7

flynn still uses openjdk 1.6 to build it.

Do you have an example app that I can test with? The buildpack should automatically pick that up with this function.

Not really - as the project is private.
But it's a bog-standard maven project.
It requires java7 to compile (not only run) - so it fails during the build.
I used https://github.com/flynn/flynn-demo inside vagrant - so I don't know if these docker images are up date?

@davidkarlsen I deployed the Heroku sample Java app firstly without a system.properties file, in which case it used OpenJDK 1.6, then with java.runtime.version=1.7 in system.properties and it used OpenJDK 1.7:

$ git clone https://github.com/heroku/java-sample.git
$ cd java-sample
$ flynn create java-app
Created java-app
$ cat system.properties                                                                                                             
cat: system.properties: No such file or directory
$ git push flynn master
...
-----> Building java-app...
-----> Java app detected
-----> Installing OpenJDK 1.6... done
-----> Installing Maven 3.0.3... done
...

$ echo 'java.runtime.version=1.7' > system.properties
$ git commit -a -m "Add system.properties"
$ git push flynn master
...
-----> Building java-app...
-----> Java app detected
-----> Installing OpenJDK 1.7... done
-----> Installing Maven 3.0.3... done
...

This is with the latest slugbuilder image:

$ docker images | grep slugbuilder
flynn/slugbuilder      latest              6ce287cb35af        2 weeks ago         853.1 MB

Could you gist your failed build output and system.properties file?

hang on! Sorry - this was caused by my git-ignorance. I pushed my master branch to flynns master, while I should have pushed my experiments/flynn onto flynn's master!
When looking around on the docker filesystems I saw that the system.properties file was not there.
Fixed now by pushing:
et2448@ubuntu:~/projects/tac/jfr/tac-jfr-server$ git push flynn experiments/flynn:master
Counting objects: 10678, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (4056/4056), done.
Writing objects: 100% (10678/10678), 1.48 MiB | 0 bytes/s, done.
Total 10678 (delta 3883), reused 9983 (delta 3554)
-----> Building tacjfrsrv...
-----> Java app detected

-----> Installing OpenJDK 1.7... done

Sorry for the noise!!