This is an automated email from the ASF dual-hosted git repository.
jbertram pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
The following commit(s) were added to refs/heads/main by this push:
new cdd341a1e8 ARTEMIS-4640: move os-maven-plugin extension into a
profile, fix artemis-commons reproducibility
cdd341a1e8 is described below
commit cdd341a1e86dc2fa066e6b6ff6926b930857608f
Author: Robbie Gemmell <[email protected]>
AuthorDate: Wed Feb 7 15:29:08 2024 +0000
ARTEMIS-4640: move os-maven-plugin extension into a profile, fix
artemis-commons reproducibility
---
docs/hacking-guide/_building.adoc | 10 +++++++++-
pom.xml | 31 ++++++++++++++++++++++---------
2 files changed, 31 insertions(+), 10 deletions(-)
diff --git a/docs/hacking-guide/_building.adoc
b/docs/hacking-guide/_building.adoc
index e73d301bbd..40c2b3c21a 100644
--- a/docs/hacking-guide/_building.adoc
+++ b/docs/hacking-guide/_building.adoc
@@ -48,9 +48,17 @@ Generating the user manual's PDF adds almost a minute to the
build so this can b
== Offline
+Maven dependency:go-offline can be used to download various things the build
needs. This necessitates some properties the build doesnt normally need set, so
to make this work a helper profile called `go-offline` exists to have the
os-maven-plugin set these properties based on the current environment. To run
these together, do:
[,console]
----
-$ mvn dependency:go-offline
+$ mvn dependency:go-offline -Pgo-offline
+$ mvn -o ...
+----
+
+Alternatively you can simply specify the needed properties directly, based on
your environment preference. For example, on a Linux x86-64 environment you
could run:
+[,console]
+----
+$ mvn dependency:go-offline -Dos.detected.name=linux -Dos.detected.arch=x86_64
-Dos.detected.classifier=linux-x86_64
$ mvn -o ...
----
diff --git a/pom.xml b/pom.xml
index 329ccb5531..4bcf1cd70e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1576,18 +1576,31 @@
</plugins>
</build>
</profile>
+ <profile>
+ <!-- Use along with mvn dependency:go-offline to generate props need
to resolve netty deps -->
+ <id>go-offline</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>kr.motd.maven</groupId>
+ <artifactId>os-maven-plugin</artifactId>
+ <version>1.7.1</version>
+ <extensions>true</extensions>
+ <executions>
+ <execution>
+ <phase>initialize</phase>
+ <goals>
+ <goal>detect</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
</profiles>
<build>
- <extensions>
- <!-- Generate os.detected.classifier property for Netty native
dependencies -->
- <extension>
- <groupId>kr.motd.maven</groupId>
- <artifactId>os-maven-plugin</artifactId>
- <version>1.7.1</version>
- </extension>
- </extensions>
-
<pluginManagement>
<plugins>
<plugin>