You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

pom.xml 1.4KB

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>
3 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <project xmlns="http://maven.apache.org/POM/4.0.0"
  2. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  4. <modelVersion>4.0.0</modelVersion>
  5. <parent>
  6. <groupId>org.aspectj</groupId>
  7. <artifactId>aspectj-parent</artifactId>
  8. <version>1.9.7.BUILD-SNAPSHOT</version>
  9. </parent>
  10. <artifactId>testing-util</artifactId>
  11. <dependencies>
  12. <dependency>
  13. <!-- All modules referencing files inside 'lib' need this dependency -->
  14. <groupId>org.aspectj</groupId>
  15. <artifactId>lib</artifactId>
  16. </dependency>
  17. <dependency>
  18. <groupId>org.aspectj</groupId>
  19. <artifactId>util</artifactId>
  20. <version>${project.version}</version>
  21. </dependency>
  22. <dependency>
  23. <groupId>org.aspectj</groupId>
  24. <artifactId>bridge</artifactId>
  25. <version>${project.version}</version>
  26. </dependency>
  27. <dependency>
  28. <groupId>junit</groupId>
  29. <artifactId>junit</artifactId>
  30. <!-- Yes, not 'test' here -->
  31. <scope>compile</scope>
  32. </dependency>
  33. <dependency>
  34. <!-- Identical to lib/jdiff/jdiff.jar, a former system-scoped dependency. Now to be found on GitHub Packages. -->
  35. <groupId>jdiff</groupId>
  36. <artifactId>jdiff</artifactId>
  37. <version>1.3</version>
  38. </dependency>
  39. </dependencies>
  40. </project>