adriens / schemacrawler-snapcraft

A first attempt to create a java snap package
3 stars 0 forks source link

Java not found in snap #2

Closed adriens closed 6 years ago

adriens commented 6 years ago
0.87s$ sudo schemacrawler -help
/snap/schemacrawler/x1/schemacrawler-15.01.04-distribution/_schemacrawler/schemacrawler.sh: 3: /snap/schemacrawler/x1/schemacrawler-15.01.04-distribution/_schemacrawler/schemacrawler.sh: java: not found
adriens commented 6 years ago

https://forum.snapcraft.io/t/snapcraft-plugin-jdk-java-runtime-app-error/1403/3

adriens commented 6 years ago

https://github.com/ogra1/jtiledownloader/blob/master/snapcraft.yaml

adriens commented 6 years ago

https://docs.snapcraft.io/java-applications/7819

adriens commented 6 years ago

https://github.com/bsutton/tomcat-with-ssl-snap/blob/master/snapcraft.yaml

adriens commented 6 years ago

Asked for some help see https://forum.snapcraft.io/t/simple-jar-snap-with-bundled-jre/4598/4

adriens commented 6 years ago

Answer : https://forum.snapcraft.io/t/simple-jar-snap-with-bundled-jre/4598/5?u=adriens

apps:
  schemacrawler:
    command: schemacrawler-15.01.04-distribution/_schemacrawler/schemacrawler.sh
    environment: 
      JAVA_HOME: $SNAP/usr/lib/jvm/java-1.8.0-openjdk-$SNAP_ARCH
      PATH: $JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH
adriens commented 6 years ago

I guess.... it did the job ! https://travis-ci.org/adriens/schemacrawler-snapcraft/builds/451268195