-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HSC-252: Maven Parent: Set Ozone dependency in the archetype instead of the parent #63
Conversation
I've found a better approach which consists of using Maven properties to override the Ozone Maven coordinates. Eg: <properties>
...
<ozone.artifactId>ozone-haiti</ozone.artifactId>
...
</properties> I have not tested it yet though. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One small remark, but LGTM
maven-parent/assembly.xml
Outdated
<directory>${project.build.directory}/${project.artifactId}-${project.version}</directory> | ||
</fileSet> | ||
</fileSets> | ||
</assembly> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
</assembly> | |
</assembly> | |
@@ -30,13 +30,16 @@ | |||
|
|||
<properties> | |||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | |||
|
|||
<ozone.artifactId>ozone</ozone.artifactId> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think one other place we want to use this is in the Unpack Ozone
step, in the includeArtifactIds
, so that we automatically unpack the artifact (it's probably fine to leave the directory things are unpacked into called "ozone".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for pointing it out.
This is now fixed.
Regarding the directory names, I've updated them too so they use the provided artifact ID. That sounds much cleaner. I don't know if you think that could bring potential issues?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I think that's much cleaner!
In order to achieve multi-level distributions, the Maven dependency on
ozone
must be overridden in the lower level distro to point to the higher level. Eg:Some additional steps are needed to achieve multi-level distros that will be documented in a follow-up PR on Ozone Docs.
As a reminder:
<id>Exclude unneeded Ozone files</id>
task must be overridden at the lower level to not exclude any higher level file (if that's what's intended)<id>Unpack Ozone</id>
task must be overridden to set the<includeArtifactIds></includeArtifactIds>
to be the parent artifact ID. Eg:<includeArtifactIds>ozone-haiti</includeArtifactIds>
This change however introduces an important limitation:⚠️ Ozone must be built with
-P parentBuild
.This is necessary for the Maven Parent to include the necessary dependencies that have been removed by this change.
Additionally, this PR adds the assembly.xml and the corresponding build phase to the Maven Archetype and Maven Parent.