flink icon indicating copy to clipboard operation
flink copied to clipboard

[FLINK-27640] Suggest use of maven wrapper (mvnw)

Open rmetzger opened this issue 2 years ago • 2 comments

This is a small improvement to the "build from source" instructions, to use the maven wrapper, which will use the right maven version, avoiding various issues.

rmetzger avatar May 21 '22 07:05 rmetzger

CI report:

  • 12923ba3ec92ee6a76d9905fb83d462a612c690f Azure: SUCCESS
Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

flinkbot avatar May 21 '22 07:05 flinkbot

Probably also makes sense to add this to docs/content/docs/flinkDev/ide_setup.md

7. Set up maven home path to maven-wrapper. 
   Go to "File" → "Settings" → "Build,Execution,Deployment" → "Build Tools" → "Maven".
   For "Maven home path" select "Use maven-wrapper".
8. Open the "Maven" tab (or right-click on the imported project and find "Maven") and run
   "Generate Sources and Update Folders". Alternatively, you can run
   `./mvnw clean package -DskipTests`.
9. Build the Project ("Build" → "Build Project").

snuyanzin avatar Sep 07 '22 09:09 snuyanzin

Thanks for the approval. I see that @snuyanzin proposal has been merged in a different PR in the meantime. Sorry that I haven't been responsive on this PR. I've rebased the PR. Once CI is happy, I'll merge it.

rmetzger avatar Nov 18 '22 08:11 rmetzger

@rmetzger to make things clear

I see that @snuyanzin proposal has been merged in a different PR in the meantime.

NO, it was not merged, it was just closed in favor of this one Also it was suggested to modify .m2/settings.xml in https://issues.apache.org/jira/browse/FLINK-29201

snuyanzin avatar Nov 18 '22 08:11 snuyanzin

Oh, thanks a lot. Then I'll incorporate your changes and ping you again for a review ;)

rmetzger avatar Nov 18 '22 08:11 rmetzger

@snuyanzin Thanks again for interrupting me. What do you suggest to add to the .m2/settings.xml file?

rmetzger avatar Nov 24 '22 14:11 rmetzger

something like this

<settings>
    <mirrors>
        <mirror>
            <id>conjars-https</id>
            <url>https://conjars.org/repo/</url>
            <mirrorOf>conjars</mirrorOf>
        </mirror>
    </mirrors>
</settings>

Initially it was suggested by Chesnay at https://issues.apache.org/jira/browse/FLINK-27640#comment-17539474

snuyanzin avatar Nov 24 '22 14:11 snuyanzin

Note: I've created https://github.com/apache/flink/pull/21529 to deal with the conjars issue

MartijnVisser avatar Dec 21 '22 10:12 MartijnVisser