aboutsummaryrefslogtreecommitdiffstats
path: root/testing-util
diff options
context:
space:
mode:
authorAlexander Kriegisch <Alexander@Kriegisch.name>2021-05-05 16:21:53 +0700
committerAlexander Kriegisch <Alexander@Kriegisch.name>2021-05-05 16:21:53 +0700
commit99476f7d8231d0c78c43057767397f1ff5964ea9 (patch)
treeb1212e65b234515f32ef7cb4c0b07d18242a5048 /testing-util
parentbdb89385dd387464ab02d7655ac8d5486d32c2fc (diff)
downloadaspectj-99476f7d8231d0c78c43057767397f1ff5964ea9.tar.gz
aspectj-99476f7d8231d0c78c43057767397f1ff5964ea9.zip
Provision libraries in 'lib' automatically
Upon special request by Andy Clement, I included 'lib' as a child module in the parent POM again, making several modules which refer to downloaded library files dependent the 'lib' module. I am not sure I caught all of them, but I hope so. Now after cloning the project and configuring the token for reading from GitHub Packages (sorry!), you can just run a Maven build for the main project and no longer need to fail the first build, read the Maven Enforcer message and run 'cd lib && mvn compile' as a first step. This convenience comes at the price of a more complex POM and two new profiles: - Profile 'provision-libs' is auto-activated by the absence of a marker file, kicking off the library provisioning process and creating same marker file at the end, if successful. Therefore, during subsequent builds libraries will not be re-provisioned, because the marker file exists and Maven skips all download and (un)zip steps, which saves build time and bandwidth. Otherwise offline builds would not work either. - Profile 'clean-libs' needs to be activated manually, because by default 'mvn clean' will not erase provisioned libraries. In most cases, even after a clean a developer does not want to re-provision all libraries if they have not changed (e.g. new JDT Core build). But if you do wish too erase the libraries and the marker file, just call 'cd lib && mvn -P clean-libs clean'. Please note: The Maven Enforcer build step, which additionally checks for existence of other files, still exists and was moved from the parent POM to 'libs'. No matter if provisioning was just done or skipped because the main marker file exists, a quick heuristic check for that list of files is done during each build, failing the build with a comprehensive message if an inconsistency was found. The error message says which files are missing and tells the user: "There is an inconsistency in module subdirectory 'lib'. Please run 'mvn --projects lib -P clean-libs clean compile'. This should take care of cleaning and freshly downloading all necessary libraries to that directory, where some tests expect them to be." This should cover the topic. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Diffstat (limited to 'testing-util')
-rw-r--r--testing-util/pom.xml5
1 files changed, 5 insertions, 0 deletions
diff --git a/testing-util/pom.xml b/testing-util/pom.xml
index 384852893..0acc00a08 100644
--- a/testing-util/pom.xml
+++ b/testing-util/pom.xml
@@ -13,6 +13,11 @@
<dependencies>
<dependency>
+ <!-- All modules referencing files inside 'lib' need this dependency -->
+ <groupId>org.aspectj</groupId>
+ <artifactId>lib</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.aspectj</groupId>
<artifactId>util</artifactId>
<version>${project.version}</version>