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

RHPAM-4970 locate pom with snapshot versioning on Springboot #277

Merged
merged 2 commits into from
Aug 12, 2024

Conversation

albfan
Copy link
Contributor

@albfan albfan commented Jul 17, 2024

Ignore timestamped SNAPSHOT replacements to find and parse pom artifact

JIRA: https://issues.redhat.com/browse/RHPAM-4970

@albfan
Copy link
Contributor Author

albfan commented Jul 17, 2024

@elguardian related with JBPM-9829

@elguardian
Copy link
Member

@albfan why are your replacing timestamps ?

@albfan
Copy link
Contributor Author

albfan commented Jul 17, 2024

Trying to identify any kjar installed from a maven repository.

When it uses local maven repository, pom name contains SNAPSHOT, but from external maven repository pom has that pattern replaced with timestamp, pom is not located and InJar fails

For an artifact named kjar-1.0.0-SNAPSHOT, this will create the pattern .*kjar-1.0.0-.*.pom that will match:

BOOT-INF/clases/KIE-INF/lib/kjar-1.0.0-SNAPSHOT.pom

or

BOOT-INF/clases/KIE-INF/lib/kjar-1.0.0-20240717-173300-1.pom

Covering usage of external maven repositories on build pipelines

@elguardian
Copy link
Member

@albfan @gmunozfe @fjtirado I am fine with this.
The only problem I see is that the effective pom was computed prior to artifact resolver. So not very sure this code will work properly

@albfan
Copy link
Contributor Author

albfan commented Jul 18, 2024

effectivePom only look for files ending in "pom". I tested and it's working for

BOOT-INF/clases/KIE-INF/lib/kjar-1.0.0-SNAPSHOT.pom

or

BOOT-INF/clases/KIE-INF/lib/kjar-1.0.0-20240717-173300-1.pom

@albfan
Copy link
Contributor Author

albfan commented Jul 18, 2024

Added an initial test for both scenarios (artifact retrieved from local repository and external repository)

Refactoring Resolvers it might be possible to Mock them instead

@tkobayas
Copy link
Contributor

ok to test

@albfan albfan force-pushed the RHPAM-4970 branch 2 times, most recently from 0b1dcb8 to ee35707 Compare July 23, 2024 08:54
@albfan
Copy link
Contributor Author

albfan commented Jul 31, 2024

Should I remove the test? Feedback from reporter is positive, can this change be merged?

@fjtirado
Copy link
Contributor

jenkins run fdb

@fjtirado fjtirado added backport-7.67.x Generate backport PR for 7.67.x branch backport-7.67.x-blue Generate backport PR for 7.67.x-blue branch labels Jul 31, 2024
@albfan albfan force-pushed the RHPAM-4970 branch 3 times, most recently from c9c01a0 to 3bc0cb5 Compare August 1, 2024 11:53
@fjtirado
Copy link
Contributor

fjtirado commented Aug 1, 2024

jenkins run fdb

@gmunozfe
Copy link
Member

gmunozfe commented Aug 5, 2024

jenkins do fdb

2 similar comments
@gmunozfe
Copy link
Member

gmunozfe commented Aug 6, 2024

jenkins do fdb

@gmunozfe
Copy link
Member

gmunozfe commented Aug 6, 2024

jenkins do fdb

@fjtirado
Copy link
Contributor

fjtirado commented Aug 7, 2024

jenkins run fdb
(after merging other pending PRs)

@fjtirado fjtirado merged commit 31a0a74 into kiegroup:main Aug 12, 2024
3 of 4 checks passed
github-actions bot pushed a commit that referenced this pull request Aug 12, 2024
* prepare classes for testing

* locate pom with snapshot

---------

Co-authored-by: Alberto Fanjul <[email protected]>
github-actions bot pushed a commit that referenced this pull request Aug 12, 2024
* prepare classes for testing

* locate pom with snapshot

---------

Co-authored-by: Alberto Fanjul <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-7.67.x Generate backport PR for 7.67.x branch backport-7.67.x-blue Generate backport PR for 7.67.x-blue branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants