Compiling Flink for Scala 2.11

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Compiling Flink for Scala 2.11

M. Dale
I cloned the Apache Flink source code from
https://github.com/apache/flink and
want to build the 1.2-SNAPSHOT with Scala 2.11.

git clone [hidden email]:apache/flink.git
cd flink
git checkout remotes/origin/release-1.2

Following instructions from the 1.2 docs at
https://ci.apache.org/projects/flink/flink-docs-release-1.2/setup/building.html
I then:

tools/change-scala-version.sh 2.11
mvn clean install -DskipTests (I am using Maven 3.3.9)

This gets to flink-dist and then:
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-assembly-plugin:2.4:single (opt)
on project flink-dist_2.11: Failed to create assembly: Error adding file
to archive:
/<MyBuildDir>/flink/flink-dist/../flink-libraries/flink-cep/target/flink-cep_2.10-1.2-SNAPSHOT.jar
isn't a file.

It seems that flink/flink-dist/src/main/assemblies/opt.xml does not get
changed
by the change-scala-version.sh script and still has some 2.10 dependencies.

Did I miss a step? There are 2.11 artifacts in the Maven repos. I see
the parent pom has a scala.version variable but mostly
the scala version is just hardcoded in the poms and controlled via the tools
script. Changing the _2.10 references in opt.xml allows for successful
compile.
Please advise whether I should file a Jira and pull request to add
opt.xml to
the change-scala-version.sh script? Or is there a new/different way to
build for 2.11?

Thanks,
Markus

Reply | Threaded
Open this post in threaded view
|

Re: Compiling Flink for Scala 2.11

Fabian Hueske-2
Hi Markus,

thanks for reporting this issue. This bug was introduced when the opt.xml file was added to the repository a few days ago.
There are two open JIRAs, FLINK-5392 and FLINK-5396, each one with a pull request to fix the problem.

Best, Fabian

2016-12-26 2:16 GMT+01:00 M. Dale <[hidden email]>:
I cloned the Apache Flink source code from https://github.com/apache/flink and
want to build the 1.2-SNAPSHOT with Scala 2.11.

git clone [hidden email]:apache/flink.git
cd flink
git checkout remotes/origin/release-1.2

Following instructions from the 1.2 docs at
https://ci.apache.org/projects/flink/flink-docs-release-1.2/setup/building.html
I then:

tools/change-scala-version.sh 2.11
mvn clean install -DskipTests (I am using Maven 3.3.9)

This gets to flink-dist and then:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.4:single (opt)
on project flink-dist_2.11: Failed to create assembly: Error adding file to archive:
/<MyBuildDir>/flink/flink-dist/../flink-libraries/flink-cep/target/flink-cep_2.10-1.2-SNAPSHOT.jar isn't a file.

It seems that flink/flink-dist/src/main/assemblies/opt.xml does not get changed
by the change-scala-version.sh script and still has some 2.10 dependencies.

Did I miss a step? There are 2.11 artifacts in the Maven repos. I see the parent pom has a scala.version variable but mostly
the scala version is just hardcoded in the poms and controlled via the tools
script. Changing the _2.10 references in opt.xml allows for successful compile.
Please advise whether I should file a Jira and pull request to add opt.xml to
the change-scala-version.sh script? Or is there a new/different way to build for 2.11?

Thanks,
Markus