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

Use junit-bom to set versions of junit dependencies #346

Merged
merged 3 commits into from
Sep 29, 2020

Conversation

dwalluck
Copy link
Contributor


PR checklist

The following checklist shall help the PR's author, the reviewers and maintainers to ensure the quality of this project.
It is based on our contributors guidelines, especially the "writing code" section.
It shall help to check for completion of the listed points.
If a point does not apply to the given PR's changes, the corresponding entry can be simply marked as done.

Documentation (general)

  • There is documentation (Javadoc and site documentation; added or updated)
  • There is implementation information to describe why a non-obvious source code / solution got implemented
  • Site documentation has its own .adoc file in the docs folder, e.g. docs/report-entries.adoc
  • Only one sentence per line (especially in .adoc files)
  • Javadoc uses formal style, while sites documentation may use informal style (see Documentation: Personal or formal style #265)

Documentation (new extension)

  • The docs/docs-nav.yml navigation has an entry for the new extension
  • The package-info.java contains information about the new extension

Code

  • Code adheres to code style, naming conventions etc.
  • Successful tests cover all changes
  • There are checks which validate correct / false usage / configuration of a functionality and there are tests to verify those checks (see Require configuration failiure tests? #164)
  • Tests use AssertJ or our own PioneerAssert (which are based on AssertJ)

Contributing

  • A prepared commit message exists
  • The list of contributions inside README.md mentions the new contribution (real name optional)

I hereby agree to the terms of the JUnit Pioneer Contributor License Agreement.

@dwalluck
Copy link
Contributor Author

This PR adds the following to the generated pom.xml:

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.junit</groupId>
        <artifactId>junit-bom</artifactId>
        <version>5.5.2</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

Then the versions of the dependencies are left defined by the junit-bom. This helps org.junit.junit automatically use the correct org.junit.platform version rather than having to manually specify it.

@dwalluck
Copy link
Contributor Author

The .gitattribues is required by spotless to prevent build failure on non-\n newline operating systems (e.g., Windows).

@Bukama
Copy link
Member

Bukama commented Sep 29, 2020

The .gitattribues is required by spotless to prevent build failure on non-\n newline operating systems (e.g., Windows).

In my opinion it's not, as you overwrite the files setting with your local git-configuration, but we discuss this in #341.
Regardless this file change has nothing to do with the topic of this PR.

@pr I like the idea, will have a look at it!

@dwalluck
Copy link
Contributor Author

In my opinion it's not, as you overwrite the files setting with your local git-configuration, but we discuss this in #341.
Regardless this file change has nothing to do with the topic of this PR.

I 100% agree and I can remove it from the PR. I needed this fix in order to be able to pass the build locally. Now that it's passed in the CI, I don't need it.

But, I assume you are not testing on Windows, only Ubuntu, or you would catch the failure.

@dwalluck
Copy link
Contributor Author

I 100% agree and I can remove it from the PR. I needed this fix in order to be able to pass the build locally. Now that it's passed in the CI, I don't need it.

I mean, I agree it is not part of this PR. I am not sure I agree that it's overwritten (this does not seem to be the case).

@dwalluck
Copy link
Contributor Author

The .gitattributes file has been removed. I guess we can continue any discussion over at #341.

@beatngu13
Copy link
Member

But, I assume you are not testing on Windows, only Ubuntu, or you would catch the failure.

Windows build is currently disabled (via #342) because of #324.

And thx for the PR! 🙏

@@ -106,6 +106,7 @@ The least we can do is to thank them and list some of their accomplishments here
* [Allon Murienik](https://github.com/mureinik) contributed [the range sources](https://junit-pioneer.org/docs/range-sources/) (#44 / #123)
* [Bradford Hovinen](https://github.com/hovinen) improved the execution of the EnvironmentVariableUtils on different OS (#287 / #288)
* [Daniel Kraus](https://github.com/beatngu13) contributed [the system property extension](https://junit-pioneer.org/docs/system-properties/) (#129 / #133), further improved it as well as the environment variable extension (#180 / #248), and helped with build infrastructure (e.g. #269)
* [David Walluck](https://github.com/dwalluck) introduced JUnit 5 BOM (#343 / #346)
Copy link
Member

Choose a reason for hiding this comment

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

We'd like to list your contribution @dwalluck, is that ok with you?

@dwalluck
Copy link
Contributor Author

@nicolaiparlog It seemed that platform() needs to take the <groupId>:<artifactId>:<version> format. I was wondering why the group = <group>, name = <name> is preferred elsewhere? To me it seems easier to use <groupId>:<artifactId>.

@sonarcloud
Copy link

sonarcloud bot commented Sep 29, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@nipafx
Copy link
Member

nipafx commented Sep 29, 2020

Thanks @dwalluck, I streamlined the configuration a bit and added you to the list of contributors (see ☝️).

As soon as David ok'ed his inclusion, I consider this done and ready to be merged.

@nipafx
Copy link
Member

nipafx commented Sep 29, 2020

@nicolaiparlog It seemed that platform() needs to take the <groupId>:<artifactId>:<version> format. I was wondering why the group = <group>, name = <name> is preferred elsewhere? To me it seems easier to use <groupId>:<artifactId>.

I'm not sure who started it, but I like it for the clarity - seeing group = and name = makes it easier for me (Gradle noob) to see what's going on. 😊

@nipafx nipafx merged commit 61f8839 into junit-pioneer:master Sep 29, 2020
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.

None yet

4 participants