Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #1450: CI builds with Maven Wrapper to ensure that Maven Wrapper files and configuration are correct #1451

Merged

Conversation

rohanKanojia
Copy link
Member

Fix #1450

  • Add Linux and Windows Github workflows for maven wrapper builds
  • Updated maven wrapper files as per maven 3.6.3

@rohanKanojia rohanKanojia force-pushed the pr/github-actions-mvn-wrapper branch from 53bc7da to 4ade096 Compare April 1, 2021 14:42
@rohanKanojia
Copy link
Member Author

@mabrarov: Could you please review?

@rohanKanojia rohanKanojia marked this pull request as ready for review April 1, 2021 15:07
mvnw Outdated
@@ -19,7 +19,7 @@
# ----------------------------------------------------------------------------
Copy link
Contributor

@mabrarov mabrarov Apr 1, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check c25e4cc where I made similar changes for Maven Wrapper and additionally added .gitattributes to ensure correct line ending for this file independent of Git configuration:

* text=auto
...
*.cmd text eol=crlf
mvnw text eol=lf

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've merged #1405 . I think it's okay to revert my changes regarding maven wrapper files in order to avoid conflicts

with:
java-version: ${{ matrix.java }}
- name: Build Project
run: ./mvnw.cmd clean install
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need ./ on Windows

Suggested change
run: ./mvnw.cmd clean install
run: mvnw.cmd clean install

?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried this but workflow fails when I don't add ./:

Run mvnw.cmd clean install
mvnw.cmd: D:\a\_temp\d8391a79-e7aa-498f-8996-6e39eb828a92.ps1:2
Line |
   2 |  mvnw.cmd clean install
     |  ~~~~~~~~
     | The term 'mvnw.cmd' is not recognized as a name of a cmdlet, function, script file, or executable
     | program. Check the spelling of the name, or if a path was included, verify that the path is correct
     | and try again.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got it. It's because the call of mvnw.cmd is performed from PowerShell script. My PowerShell suggests me to use .\mvnw.cmd, but I'm OK with ./mvnw.cmd.

@rohanKanojia rohanKanojia force-pushed the pr/github-actions-mvn-wrapper branch 2 times, most recently from 588a921 to b9742a2 Compare April 2, 2021 09:15
… Wrapper files and configuration are correct

+ Add Linux and Windows Github workflows for maven wrapper builds
@rohanKanojia rohanKanojia force-pushed the pr/github-actions-mvn-wrapper branch from 9c99380 to f7ff36a Compare May 15, 2021 08:54
@rohanKanojia rohanKanojia merged commit 34ea02e into fabric8io:master May 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CI builds with Maven Wrapper to ensure that Maven Wrapper files and configuration are correct
2 participants