Open eeverman opened 3 years ago
@eeverman I would like to take it, but I'm not sure I understand the idea.
If we create new module andow-bom
with dependencyManagment
section and import it in example-app-2
as
<dependencyManagement>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>andhow-bom</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
Then we anyway should reference those dependencies andhow-annotation-processor
and anyhow-core
in dependencies
section, otherwise they won't be include.
@alex-kar Right, its low priority. This is really intended for people who want to create as small a jar as possible - Probably because they want a lambda to startup quickly. Only 'core' is needed at runtime - you can leave out the annotation-processor. But, to do that, you have to know what you are doing and get the scopes of the dependencies correct. This was intended to simplify that because the dependency management will bring in the scopes.
This would require some testing to make sure it works as expected (I didn't test this out, but this seems like the way BOMs are supposed to work - I'm not sure if the provided scope adds any wrinkles).
I'll pull the 'help wanted tag' off and assign to you - feel free to ignore for as long as you want.
AndHow is currently distributed as a 'fat' jar created from the contents of two jars:
anyhow-core.jar
andandhow-annotation-processor.jar
, both of which are created in this project.This is really just to simplify things so AndHow can be included as a single Maven dependency, however, if you want to create the smallest deployable artifact possible for an application, you can do better. The actual requirement for AndHow in an application is this:
andhow-annotation-processor.jar
This annotation processor is required at compile time only. It is not required at runtime so it does not need to be deployed with the application.anyhow-core.jar
Required at compile time and at runtime.andhow-junit5-extensions.jar
for testingThus, a BOM style pom file with a dependencyManagement section that includes
andhow-annotation-processor.jar
asprovided
scope andanyhow-core.jar
ascompile
scope would provide an easy path for users who want to create the smallest possible app.To complete this:
andhow-bom
with a pom file of package typepom
. It should have a dependency management section as described above.