jbertram commented on code in PR #5533:
URL: https://github.com/apache/activemq-artemis/pull/5533#discussion_r1973921165
##########
artemis-commons/pom.xml:
##########
@@ -83,6 +83,10 @@
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.apache.activemq</groupId>
+ <artifactId>artemis-boot</artifactId>
Review Comment:
The `artemis-commons` module does have a handful of dependencies, but the
important part is that it doesn't depend on any other Artemis modules (aside
from logging which isn't really a concern). The whole notion of a "commons"
module is that it allows modules to share classes when otherwise there would be
problems with circular or otherwise unwanted dependencies. By making
`artemis-commons` depend on `artemis-boot` you're now adding `artemis-boot` as
a transitive dependency to anything that depends on `artemis-commons`.
At the end of the day the dependency only exists for a constant defining
`java.io.tmpdir` which is a [well-known Java system
property](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/System.html#getProperties()).
In my opinion we should just use the literal `"java.io.tmpdir"` in both places
and dispense with the constant and the new dependency. We use literals like
this for well-known Java system properties in a number of places in the
code-base so a precedent exists.
It's also worth noting that the class in `artemis-commons` which uses the
constant from `artemis-boot` (i.e.
`org.apache.activemq.artemis.utils.SpawnedVMSupport`) is only used in tests.
That class should probably be moved to a test-specific module (e.g.
`artemis-unit-test-support`) if possible.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact