Skip to main content

Maven

Simple Story

This page sets out to show, step by step, how the head teacher prints the rules onto the grading instructions beforehand. Nobody has written it yet, so for now it only lists what it is going to cover.

Who is who

This page is a stub

Ares supports the four JAVA_USING_MAVEN_* configurations, so Precompile generation works for Maven. What does not exist is a written, verified walkthrough: the existing Precompile documentation only ever covered Gradle, and there is no runnable Maven Precompile example to derive one from. Until this page is written, follow the Gradle Precompile page for the generator steps, which are build-tool independent, and the Maven Postcompile page for the Maven-side wiring.

What this page will cover​

The same six steps as the Gradle page, with the Maven wiring in place of the Gradle wiring: defining the policy, running the generator, what lands in the project, the pom.xml changes, the reserved-package boundary, and verification with both controls.

What has to be established first​

The generated artefacts have to be compiled and, for an _ASPECTJ configuration, woven by the exercise's own build. The Maven equivalents of the Gradle steps therefore need to be written against a working example rather than inferred from the Gradle page.

One prerequisite is already settled: the generator looks up every class in theFollowingClassesAreTestClasses in target/test-classes and stops with an error if one is missing, so compile the exercise's tests with mvn test-compile before running it.

What already applies​

The reserved-package boundary is not generated in either mode, so the Maven snippet from the Maven Postcompile page applies unchanged here.

Notes​

  • Do not assume the Gradle build.gradle changes translate one to one. They are written against the freefair AspectJ plugin, which has no Maven counterpart with the same behaviour.