Skip to content
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

SDK-344 - SDK should support including spa from a maven artifact #303

Merged
merged 4 commits into from
Nov 11, 2024

Conversation

mseaton
Copy link
Member

@mseaton mseaton commented Nov 8, 2024

spa.artifactId=openmrs-frontend-zl
spa.groupId=org.pih.openmrs
spa.version=1.3.0
spa.include=openmrs-frontend-zl-1.3.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably obvious and I'm just missing it, but why do we have to limit to "openmrs-frontend-zl-1.3.0"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a hack/feature I had to add in, which I had originally hoped to avoid, because when we build our frontend zips we don't just include the files but we include them in a nested directory with this name. So this is how I am providing an option to say "don't just unpack the entire zip as-is, but unpack it and copy in the contents of this subdirectory within the zip".

@ibacher
Copy link
Member

ibacher commented Nov 9, 2024

Not essential to this, but the unpack goal we’re using has an includes option which we could leverage. Same outcome, but involves less copying.

@mseaton
Copy link
Member Author

mseaton commented Nov 9, 2024

Not essential to this, but the unpack goal we’re using has an includes option which we could leverage. Same outcome, but involves less copying.

Interesting - I'll look to see if I can switch this to use that, thanks @ibacher . If nothing else, it gives me more confidence in my choice of property name, which I struggled over. Maybe I'll update it from include to includes.

@mseaton
Copy link
Member Author

mseaton commented Nov 11, 2024

So, I tried out using the includes property of the unpack goal, and it did not work as I wanted. As far as I can tell, there isn't a way to tell it to include the contents of a subdirectory but not the subdirectory itself. So I kept my initial implementation. I did change the property name from include to includes to leave room to support indicating multiple includes rather than just one, though the current implementation just assumes one.

@mseaton mseaton merged commit c8a4644 into master Nov 11, 2024
2 checks passed
@mseaton mseaton deleted the SDK-344 branch November 11, 2024 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants