-
Notifications
You must be signed in to change notification settings - Fork 3
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
O3-3511: Content package to create zip file #1
Conversation
There is a conflict with pom.xml. @nravilla could you please check it out. |
Sure Amos, there's been some changes, the java code is moved to another location. will update and resubmit this PR. thank you for checking this out |
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 @nravilla! I've written up a few small comments on this. Also note that we have conventions for how PRs should appear, i.e., they must reference a ticket, the message should be written in "sentence casing", etc.
assembly.xml
Outdated
</includes> | ||
</fileSet> | ||
<fileSet> | ||
<directory>${project.basedir}/configs</directory> |
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.
<directory>${project.basedir}/configs</directory> | |
<directory>${project.basedir}/configs</directory> |
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.
is there a change suggested here?
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.
Removing whitespace
content.properties
Outdated
spa.frontendModules.@openmrs/esm-login-app=^3.0.0 | ||
spa.frontendModules.@openmrs/esm-patient-chart=^1.0.0 |
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.
Although this is good for demo purposes, I don't think we need this here.
content.properties
Outdated
# content.properties - Metadata for the content package and its dependencies | ||
|
||
# The name of this content package | ||
name=openmrs-content-hiv |
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.
name=openmrs-content-hiv | |
name=hiv |
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.
Ideally, however, this would be populated from the POM directly:
name=openmrs-content-hiv | |
name=${project.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.
The above recommended change has been implemented, I don't know much about the data in content.properties, Amos will be responsible for the data. i just have name and version for the time being.
pom.xml
Outdated
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-assembly-plugin</artifactId> | ||
<version>3.3.0</version> |
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.
We should always use the latest version available, if possible.
<version>3.3.0</version> | |
<version>3.7.1</version> |
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.
Done!
pom.xml
Outdated
<appendAssemblyId>false</appendAssemblyId> | ||
<!-- Ensure this is set to false --> |
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.
It'd likely be nice to have a why for this comment, but at least it should go with the right part.
<appendAssemblyId>false</appendAssemblyId> | |
<!-- Ensure this is set to false --> | |
<!-- Ensure this is set to false --> | |
<appendAssemblyId>false</appendAssemblyId> |
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.
Have added a comment, at the top instead of bottom.
pom.xml
Outdated
<modelVersion>4.0.0</modelVersion> | ||
<groupId>org.openmrs.content</groupId> | ||
<artifactId>openmrs-content-hiv</artifactId> | ||
<version>1.0-SNAPSHOT</version> |
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.
As discussed:
<version>1.0-SNAPSHOT</version> | |
<version>1.0.0-SNAPSHOT</version> |
pom.xml
Outdated
<goals> | ||
<goal>validate-assemble</goal> | ||
</goals> |
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.
<goals> | |
<goal>validate-assemble</goal> | |
</goals> | |
<goals> | |
<goal>validate-assemble</goal> | |
</goals> |
pom.xml
Outdated
<executions> | ||
<execution> | ||
<id>validate-assemble</id> | ||
<phase>package</phase> |
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.
<phase>package</phase> | |
<phase>package</phase> |
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 also think this should probably be run in the verify
phase rather than the package
phase. Technically, that comes after the Zip is generated, but in production usage, we're doing to be running the deploy
phase to publish this, and that will block that.
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.
done! updated it to verify phase instead of package phase.
Could you add the ticket number to the PR title and fix the merge conflicts please? This should be ready to go from there. |
Update from @nravilla by email: "I've updated the pom.xml to fetch the 1.8.0 packager-plugin that I released this morning. I also added another execution for validate-configuration as requested, but it's failing. Should we remove it, or can you fix it? It's unrelated to the new plugin I introduced. For now, could you comment out the validate-configuration execution and merge my changes into the main branch? This will complete my task." |
Hey @alaboso & @wikumChamith - it would be great if you could help out with reviewing this, if you are available? (Well, re-reviewing, in Amos' case :) ) This PR is turning the repo into the model for future content packages, so it's important to get the whole setup correct - and Ian is very over-booked this week. |
@nravilla can we get the build errors fixed? |
Hi Wikum, Ian requested adding another verify step (validate-configurations) and it’s unrelated to my current work. If I comment out that step, the build works fine, please see Grace's message above (email from me) As asked, to fix build errors, I am commenting that step out for the time being, if Ian really needs it, we can address it as another PR. |
@nravilla That step needs to work in CI for the work here to be complete. I realize it's not something you built or changed, but it is validating that the configuration in the package is complete and self-contained which is a required property of content packages. |
@ibacher, had added that step earlier and i see some issues with it in CI, that's the reason i proposed we deal with it as a separate PR, please see the log at - https://ci.openmrs.org/browse/CH-CON-RTM-4/log |
It would be best to skip validation of the actual configuration files for now so to unblock Bamboo and publish the package as is. |
@rbuisson It's less configurations that are broken and more the validator itself... I guess we just by-pass this for now. I've been trying to play around with it, but I can't get the validator to run on my ARM-based Mac, I don't really have a good solution. |
Requirements
https://openmrs.atlassian.net/browse/O3-3511
Summary
To validate and create assembly, run : mvn clean package