-
Notifications
You must be signed in to change notification settings - Fork 53
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
Support to JEP-229 / Fixing compilation on multimodule projects #318
Support to JEP-229 / Fixing compilation on multimodule projects #318
Conversation
imonteroperez
commented
Nov 18, 2021
- Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
- Ensure that the pull request title represents the desired changelog entry
- Please describe what you did
- Link to relevant issues in GitHub or Jira
- Link to relevant pull requests, esp. upstream and downstream changes
- Ensure you have provided tests - that demonstrates feature works or fixes the issue
throw new IOException(String.format("Something is really wrong here! %s is not the parent folder of %s", parentFolder, path.getAbsolutePath())); | ||
} | ||
// "process-test-classes" not working properly on multi-module plugin. See https://issues.jenkins.io/browse/JENKINS-62658 | ||
// using "mvn clean install -DskipTests -Dinvoker.skip -Denforcer.skip to skip testing and just compile and install dependencies" |
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.
BTW -Pquick-build
works but only for plugins using a tolerably recent parent.
plugins-compat-tester/src/main/java/org/jenkins/tools/test/hook/MultiParentCompileHook.java
Outdated
Show resolved
Hide resolved
plugins-compat-tester/src/main/java/org/jenkins/tools/test/hook/MultiParentCompileHook.java
Outdated
Show resolved
Hide resolved
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.
Looks OK. Does it in fact work?
plugins-compat-tester/src/main/java/org/jenkins/tools/test/PluginCompatTester.java
Outdated
Show resolved
Hide resolved
plugins-compat-tester/src/main/java/org/jenkins/tools/test/PluginCompatTester.java
Outdated
Show resolved
Hide resolved
plugins-compat-tester/src/main/java/org/jenkins/tools/test/PluginCompatTester.java
Outdated
Show resolved
Hide resolved
if (!StringUtils.startsWith(line.trim(), "<string>")) { | ||
continue; | ||
} | ||
String mvnModule = line.replace("<string>", "").replace("</string>", "").trim(); |
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.
This could be a regexp match perhaps, but why are you attempting to parse XML this way? Use e.g. DOM4j.
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.
Yep, I will update, trying a quick-and-dirty approach just to test the entire solution
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.
Yes. Good enough for now I think.
plugins-compat-tester/src/main/java/org/jenkins/tools/test/PluginCompatTester.java
Outdated
Show resolved
Hide resolved
plugins-compat-tester/src/main/java/org/jenkins/tools/test/hook/MultiParentCompileHook.java
Outdated
Show resolved
Hide resolved
if (localCheckoutDir != null) { | ||
return 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.
I do not understand why this clause is here. As discussed earlier, having a local checkout dir (with a plain old MRP plugin) is one of the reasons why you might in fact need this patch.
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.
🤔 you are right, I will review this in depth. I included at the very beginning because I wrongly understood #318 (comment)
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.
Definitely an edge case, not very important, just a point of confusion.
plugins-compat-tester/src/main/java/org/jenkins/tools/test/hook/MultiParentCompileHook.java
Show resolved
Hide resolved
plugins-compat-tester/src/main/java/org/jenkins/tools/test/hook/MultiParentCompileHook.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Jesse Glick <jglick@cloudbees.com>
Yes! it worked fine, before this PR
and after this PR
|
Probably we should be adding the AWS SDK plugin to |
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.
LGTM!
@imonteroperez you need to set a category label for CD before merging a PR. Running https://github.com/jenkinsci/plugin-compat-tester/actions/runs/1517465133 manually to compensate. |