ArchUnit-Examples icon indicating copy to clipboard operation
ArchUnit-Examples copied to clipboard

Maven examples & Gradle update

Open hankem opened this issue 1 year ago • 4 comments

This PR

  • adds pom.xml files to run the examples with Maven
  • updates Gradle to support more modern Java versions
  • improves the user experience when running the junit5 examples with IntelliJ IDEA

hankem avatar Apr 22 '25 20:04 hankem

FYI: TNG/ArchUnit#1450 will update these pom.xmls with every release of ArchUnit.

hankem avatar Apr 24 '25 18:04 hankem

I appreciate the initiative to also make these examples work with Maven, but do you think it's easy to understand if both Maven and Gradle are mixed together? Or should we have dedicated examples? 🤔 In the end we're updating those automatically anyway, right? We could also adapt that to generate two sets of examples, one for Gradle and one for Maven?

Also, would it make sense to use the https://maven.apache.org/wrapper/ analogously to Gradle?

codecholeric avatar Apr 27 '25 14:04 codecholeric

do you think it's easy to understand if both Maven and Gradle are mixed together? Or should we have dedicated examples?

As this repository is about ArchUnit examples, I thought it would be fair to support multiple build tools in the same module (and not duplicate the examples just because there are several ways to run them). Would it be more clear to state in the README:

You can run them

  • with Gradle (using the provided build.gradle scripts):
    ./gradlew test
    
  • with Maven (using the provided pom.xml files in the same directories):
    ./mvnw test
    
  • or directly from your IDE.

hankem avatar May 04 '25 10:05 hankem

would it make sense to use the https://maven.apache.org/wrapper/

Good idea!

hankem avatar May 04 '25 10:05 hankem