[ 
https://issues.apache.org/jira/browse/AVRO-2594?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16973346#comment-16973346
 ] 

Ryan Skraba commented on AVRO-2594:
-----------------------------------

This looks like it might be an easy fix, especially if we consider that forrest 
0.9 doesn't work out of the box post-JDK 8 (which is the last release with Java 
1.5 source/target compatibility flags).

I propose modifying the build of the user Dockerfile to take into account the 
JAVA environment variable, similar to travis.  If unset (or equal to 8), the 
behaviour is unchanged, but if its greater than 8, it builds with the 
{{openjdk:$JAVA}} version and omits forrest.

What do you think?

{code}
# Generate avro-build-rskraba:latest based on openjdk:8 with forrest
./build.sh docker
# Generate avro-build-rskraba:latest based on openjdk:11 without forrest
JAVA=11 ./build.sh docker
{code}

> Make it easier to replicate JAVA=11 environment locally
> -------------------------------------------------------
>
>                 Key: AVRO-2594
>                 URL: https://issues.apache.org/jira/browse/AVRO-2594
>             Project: Apache Avro
>          Issue Type: Wish
>          Components: build
>            Reporter: Michael A. Smith
>            Priority: Minor
>
> ./build.sh docker adds some stuff to share/docker/Dockerfile so you can run 
> it locally;
>  
> When TravisCI runs the JAVA=11 environment, .travis/script.sh modifies the 
> Dockerfile to be openjdk:11 instead of openjdk:8, but if I locally modify 
> Dockerfile to be openjdk:11, then ./build.sh docker fails trying to install 
> forrest
>  
> {noformat}
> Successfully tagged avro-build-ci:latest
> + docker build -t avro-build -f share/docker/DockerfileLocal .
> Sending build context to Docker daemon  86.45MB
> Step 1/5 : FROM avro-build-ci
>  ---> 9d838b1234ee
> Step 2/5 : RUN curl -L -s 
> "https://www.apache.org/dyn/closer.lua?action=download&filename=/forrest/apache-forrest-0.9-sources.tar.gz";
>  | tar -xzf - -C /usr/local/ &&     curl -L -s 
> "https://www.apache.org/dyn/closer.lua?action=download&filename=/forrest/apache-forrest-0.9-dependencies.tar.gz";
>  | tar -xzf - -C /usr/local/ &&     mv /usr/local/apache-forrest-0.9 
> /usr/local/apache-forrest &&     cd /usr/local/apache-forrest/main &&     
> ./build.sh
>  ---> Running in 9be9f649ce33
> Using classpath: 
> ../lib/endorsed/jakarta-bcel-20040329.jar:../lib/endorsed/jakarta-regexp-1.5.jar:../lib/endorsed/xalan-2.7.1.jar:../lib/endorsed/xercesImpl-2.9.1.jar:../lib/endorsed/xml-apis-1.3.04.jar
> Buildfile: build.xmlinit:      
> --------------------------------------------------------------      Using 
> Apache Ant version 1.7.1 compiled on September 26 2008
>       Build file /usr/local/apache-forrest/main/build.xml
>       Use 'build.[sh|bat] -projecthelp' to see other options.
>       Build system home /usr/local/apache-forrest/tools/ant
>       Build number 0
>       Project Name Forrest build file
>       Java Version 1.6      
>       Timestamp 201910130035
>       This is: apache-forrest 0.9      
> --------------------------------------------------------------
>     compile:
> Created dir: /usr/local/apache-forrest/build/classes
> Compiling 33 source files to /usr/local/apache-forrest/build/classes
> 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.BUILD FAILED
> /usr/local/apache-forrest/main/build.xml:522: Compile failed; see the 
> compiler error output for details.Total time: 0 seconds
> The command '/bin/bash -o pipefail -c curl -L -s 
> "https://www.apache.org/dyn/closer.lua?action=download&filename=/forrest/apache-forrest-0.9-sources.tar.gz";
>  | tar -xzf - -C /usr/local/ &&     curl -L -s 
> "https://www.apache.org/dyn/closer.lua?action=download&filename=/forrest/apache-forrest-0.9-dependencies.tar.gz";
>  | tar -xzf - -C /usr/local/ &&     mv /usr/local/apache-forrest-0.9 
> /usr/local/apache-forrest &&     cd /usr/local/apache-forrest/main &&     
> ./build.sh' returned a non-zero code: 1{noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to