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

Support to JEP-229 / Fixing compilation on multimodule projects #318

Merged
merged 4 commits into from
Nov 24, 2021

Conversation

imonteroperez
Copy link
Contributor

  • 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"
Copy link
Member

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.

@jglick jglick requested a review from Vlatombe November 19, 2021 20:43
@imonteroperez imonteroperez marked this pull request as ready for review November 23, 2021 08:59
Copy link
Member

@jglick jglick left a 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?

if (!StringUtils.startsWith(line.trim(), "<string>")) {
continue;
}
String mvnModule = line.replace("<string>", "").replace("</string>", "").trim();
Copy link
Member

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.

Copy link
Contributor Author

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

Copy link
Member

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.

Comment on lines +148 to +150
if (localCheckoutDir != null) {
return false;
}
Copy link
Member

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.

Copy link
Contributor Author

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)

Copy link
Member

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.

Co-authored-by: Jesse Glick <jglick@cloudbees.com>
@imonteroperez
Copy link
Contributor Author

Looks OK. Does it in fact work?

Yes! it worked fine, before this PR

[ERROR] Failed to execute goal on project aws-java-sdk-ec2: Could not resolve dependencies for project org.jenkins-ci.plugins.aws-java-sdk:aws-java-sdk-ec2:hpi:1.12.101-999999-SNAPSHOT: Could not find artifact org.jenkins-ci.plugins.aws-java-sdk:aws-java-sdk-minimal:jar:1.12.101-999999-SNAPSHOT

and after this PR

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Amazon Web Services SDK :: Parent 1.12.101-999999-SNAPSHOT:
[INFO] 
[INFO] Amazon Web Services SDK :: Parent .................. SUCCESS [  0.477 s]
[INFO] Amazon Web Services SDK :: Minimal ................. SUCCESS [  0.130 s]
[INFO] Amazon Web Services SDK :: EC2 ..................... SUCCESS [  0.065 s]
[INFO] ------------------------------------------------------------------------
[...]
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running InjectedTest
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 8.335 s - in InjectedTest
[INFO] 
[INFO] Results:
[INFO] 
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0

@jglick
Copy link
Member

jglick commented Nov 23, 2021

Probably we should be adding the AWS SDK plugin to jenkinsci/bom once this is released.

Copy link
Contributor

@cathychan cathychan left a comment

Choose a reason for hiding this comment

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

LGTM!

@imonteroperez imonteroperez merged commit 5a9f15e into jenkinsci:master Nov 24, 2021
@jglick jglick added the bug label Nov 29, 2021
@jglick
Copy link
Member

jglick commented Nov 29, 2021

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants