Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-6582

Project from maven archetype is not buildable by default due to ${scala.binary.version}

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.3.0
    • Fix Version/s: 1.3.0, 1.4.0
    • Component/s: Build System, Quickstarts
    • Labels:
      None

      Description

      When creating a java project from maven-archetype dependencies to flink are unresolvable due to ${scala.binary.version} placeholder.

        Issue Links

          Activity

          Show
          rmetzger Robert Metzger added a comment - Fix for master/1.4: http://git-wip-us.apache.org/repos/asf/flink/commit/6ae759ae Fix for release-1.3/1.3: http://git-wip-us.apache.org/repos/asf/flink/commit/d1cff3ae
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

          https://github.com/apache/flink/pull/3910

          Show
          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/flink/pull/3910
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user rmetzger commented on the issue:

          https://github.com/apache/flink/pull/3910

          Thanks a lot for fixing the issue.

          I've tested it again, and it works.
          Merging.

          Show
          githubbot ASF GitHub Bot added a comment - Github user rmetzger commented on the issue: https://github.com/apache/flink/pull/3910 Thanks a lot for fixing the issue. I've tested it again, and it works. Merging.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user greghogan commented on the issue:

          https://github.com/apache/flink/pull/3910

          @rmetzger latest commit is simpler and tested successfully for java and scala: `mvn org.apache.maven.plugins:maven-archetype-plugin:2.4:generate -DarchetypeGroupId=org.apache.flink -DarchetypeArtifactId=flink-quickstart-java -DarchetypeCatalog=local -DarchetypeVersion=1.4-SNAPSHOT`.

          Show
          githubbot ASF GitHub Bot added a comment - Github user greghogan commented on the issue: https://github.com/apache/flink/pull/3910 @rmetzger latest commit is simpler and tested successfully for java and scala: `mvn org.apache.maven.plugins:maven-archetype-plugin:2.4:generate -DarchetypeGroupId=org.apache.flink -DarchetypeArtifactId=flink-quickstart-java -DarchetypeCatalog=local -DarchetypeVersion=1.4-SNAPSHOT`.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user rmetzger commented on the issue:

          https://github.com/apache/flink/pull/3910

          Thank you.

          Show
          githubbot ASF GitHub Bot added a comment - Github user rmetzger commented on the issue: https://github.com/apache/flink/pull/3910 Thank you.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user greghogan commented on the issue:

          https://github.com/apache/flink/pull/3910

          @rmetzger I am seeing the same issue and will look into this.

          Show
          githubbot ASF GitHub Bot added a comment - Github user greghogan commented on the issue: https://github.com/apache/flink/pull/3910 @rmetzger I am seeing the same issue and will look into this.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user rmetzger commented on the issue:

          https://github.com/apache/flink/pull/3910

          Not sure what's happening, but when I'm trying to generate a project from the archetype, I'm getting:

          ```
          Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.4:generate (default-cli) on project standalone-pom: The defined artifact is not an archetype
          ```

          Show
          githubbot ASF GitHub Bot added a comment - Github user rmetzger commented on the issue: https://github.com/apache/flink/pull/3910 Not sure what's happening, but when I'm trying to generate a project from the archetype, I'm getting: ``` Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.4:generate (default-cli) on project standalone-pom: The defined artifact is not an archetype ```
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user rmetzger commented on the issue:

          https://github.com/apache/flink/pull/3910

          the change looks good to merge. I'm currently building Flink to quickly try it out

          Show
          githubbot ASF GitHub Bot added a comment - Github user rmetzger commented on the issue: https://github.com/apache/flink/pull/3910 the change looks good to merge. I'm currently building Flink to quickly try it out
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user greghogan commented on the issue:

          https://github.com/apache/flink/pull/3910

          After asking the question I added the second commit which inherits the scala version as is the current / expected behavior.

          Show
          githubbot ASF GitHub Bot added a comment - Github user greghogan commented on the issue: https://github.com/apache/flink/pull/3910 After asking the question I added the second commit which inherits the scala version as is the current / expected behavior.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user rmetzger commented on the issue:

          https://github.com/apache/flink/pull/3910

          The script is deploying scala 2.10 for the quickstarts, yes.
          I think the reason for this is that scala 2.10 is still considered "default" in Flink.

          Show
          githubbot ASF GitHub Bot added a comment - Github user rmetzger commented on the issue: https://github.com/apache/flink/pull/3910 The script is deploying scala 2.10 for the quickstarts, yes. I think the reason for this is that scala 2.10 is still considered "default" in Flink.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user greghogan commented on the issue:

          https://github.com/apache/flink/pull/3910

          @rmetzger what is happening in `create_release_files.sh:deploy_to_maven`? Are we overwriting the 2.11 quickstart jars with 2.10 jars? Are we still looking to publish against Scala 2.10 rather than 2.11?

          Show
          githubbot ASF GitHub Bot added a comment - Github user greghogan commented on the issue: https://github.com/apache/flink/pull/3910 @rmetzger what is happening in `create_release_files.sh:deploy_to_maven`? Are we overwriting the 2.11 quickstart jars with 2.10 jars? Are we still looking to publish against Scala 2.10 rather than 2.11?
          Hide
          dawidwys Dawid Wysakowicz added a comment -

          Just out of curiosity I tried to create the archetype with 3.0.1 and had same output as you did. Maybe the last working version is 3.0.0.

          Show
          dawidwys Dawid Wysakowicz added a comment - Just out of curiosity I tried to create the archetype with 3.0.1 and had same output as you did. Maybe the last working version is 3.0.0 .
          Hide
          greghogan Greg Hogan added a comment -

          Interesting that the newer version of the plugin is working for your setup. Thanks for the clarification, I had originally thought that the issue was in creating the project but now see that the new project's pom has the placeholder variable.

          Show
          greghogan Greg Hogan added a comment - Interesting that the newer version of the plugin is working for your setup. Thanks for the clarification, I had originally thought that the issue was in creating the project but now see that the new project's pom has the placeholder variable.
          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user greghogan opened a pull request:

          https://github.com/apache/flink/pull/3910

          FLINK-6582 [docs] Project from maven archetype is not buildable by default

          The pom.xml for flink-quickstart-java and flink-quickstart-scala must specify scala.version and scala.binary.version.

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/greghogan/flink 6582_project_from_maven_archetype_is_not_buildable

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/flink/pull/3910.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #3910


          commit 986ebdb9964a87302c6c26d4eaa431e75b186351
          Author: Greg Hogan <code@greghogan.com>
          Date: 2017-05-15T13:35:36Z

          FLINK-6582 [docs] Project from maven archetype is not buildable by default

          The pom.xml for flink-quickstart-java and flink-quickstart-scala must
          specify scala.version and scala.binary.version.


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user greghogan opened a pull request: https://github.com/apache/flink/pull/3910 FLINK-6582 [docs] Project from maven archetype is not buildable by default The pom.xml for flink-quickstart-java and flink-quickstart-scala must specify scala.version and scala.binary.version. You can merge this pull request into a Git repository by running: $ git pull https://github.com/greghogan/flink 6582_project_from_maven_archetype_is_not_buildable Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/3910.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #3910 commit 986ebdb9964a87302c6c26d4eaa431e75b186351 Author: Greg Hogan <code@greghogan.com> Date: 2017-05-15T13:35:36Z FLINK-6582 [docs] Project from maven archetype is not buildable by default The pom.xml for flink-quickstart-java and flink-quickstart-scala must specify scala.version and scala.binary.version.
          Hide
          dawidwys Dawid Wysakowicz added a comment -

          Greg Hogan No, I don't see a message you posted. The project is generated fine. The difference I see is that I use maven-archetype-plugin:3.0.0.

          Show
          dawidwys Dawid Wysakowicz added a comment - Greg Hogan No, I don't see a message you posted. The project is generated fine. The difference I see is that I use maven-archetype-plugin:3.0.0 .
          Hide
          dawidwys Dawid Wysakowicz added a comment - - edited

          As for relation to FLINK-6166, I don't think there are any similarities. The project is created perfectly from the archetype, but the resulting project is not buildable as there is no ${scala.binary.version} defined.

          Show
          dawidwys Dawid Wysakowicz added a comment - - edited As for relation to FLINK-6166 , I don't think there are any similarities. The project is created perfectly from the archetype, but the resulting project is not buildable as there is no ${scala.binary.version} defined.
          Hide
          greghogan Greg Hogan added a comment -

          Dawid Wysakowicz how are you attributing the error to ${scala.binary.version}? Are you seeing

          [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.0.1:generate (default-cli) on project standalone-pom: archetypeCatalog 'https://repository.apache.org/content/repositories/snapshots/' is not supported anymore. Please read the plugin documentation for details. -> [Help 1]
          
          Show
          greghogan Greg Hogan added a comment - Dawid Wysakowicz how are you attributing the error to ${scala.binary.version}? Are you seeing [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.0.1:generate ( default -cli) on project standalone-pom: archetypeCatalog 'https: //repository.apache.org/content/repositories/snapshots/' is not supported anymore. Please read the plugin documentation for details. -> [Help 1]
          Hide
          greghogan Greg Hogan added a comment -

          I now see that this was filed as major and Aljoscha Krettek had bumped to blocker. Had not meant to override that decision.

          Show
          greghogan Greg Hogan added a comment - I now see that this was filed as major and Aljoscha Krettek had bumped to blocker . Had not meant to override that decision.
          Hide
          dawidwys Dawid Wysakowicz added a comment -

          I am using the one from documentation of SNAPSHOT:

          mvn archetype:generate                               \
                -DarchetypeGroupId=org.apache.flink              \
                -DarchetypeArtifactId=flink-quickstart-java      \
                -DarchetypeCatalog=https://repository.apache.org/content/repositories/snapshots/ \
                -DarchetypeVersion=1.4-SNAPSHOT
          
          Show
          dawidwys Dawid Wysakowicz added a comment - I am using the one from documentation of SNAPSHOT: mvn archetype:generate \ -DarchetypeGroupId=org.apache.flink \ -DarchetypeArtifactId=flink-quickstart-java \ -DarchetypeCatalog=https: //repository.apache.org/content/repositories/snapshots/ \ -DarchetypeVersion=1.4-SNAPSHOT
          Hide
          greghogan Greg Hogan added a comment -

          Dawid Wysakowicz thank for reporting this. What command are you using? I have not been able to reproduce. Is this related to FLINK-6166?

          Show
          greghogan Greg Hogan added a comment - Dawid Wysakowicz thank for reporting this. What command are you using? I have not been able to reproduce. Is this related to FLINK-6166 ?

            People

            • Assignee:
              greghogan Greg Hogan
              Reporter:
              dawidwys Dawid Wysakowicz
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development