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

Add ability to add paths to the computed classpath #1642

Merged
merged 11 commits into from
Apr 23, 2019
Merged

Conversation

briandealwis
Copy link
Member

@briandealwis briandealwis commented Apr 17, 2019

Fixes #1157

Adds a new extraClasspath container element for Maven and Gradle to allow specifying additional paths for the container classpath. This is part of #894.

Gradle:

jib {
  container {
    extraClasspath = ['/d1', '/d2']
  }
}

Maven:

<jib>
  <container>
    <extraClasspath>
      <path>/d1</path>
      <path>/d2</path>
    </extraClasspath>
  </container>
</jib>

Settings can also be set via jib.container.extraClasspath system and project properties.

Copy link
Member

@chanseokoh chanseokoh left a comment

Choose a reason for hiding this comment

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

Please update the title.

jib-gradle-plugin/README.md Outdated Show resolved Hide resolved
jib-gradle-plugin/README.md Outdated Show resolved Hide resolved
@@ -445,6 +454,9 @@ public void testExecute_complex()
buildAndRunComplex(
targetImage, "testuser2", "testpassword2", localRegistry2, "pom-complex.xml"));
assertWorkingDirectory("", targetImage);
assertEntrypoint(
"[java -Xms512m -Xdebug -cp /app/resources:/app/classes:/app/libs/* com.test.HelloWorld]",
Copy link
Member

Choose a reason for hiding this comment

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

Can we have a test where extraClasspath is in action?

Copy link
Member Author

Choose a reason for hiding this comment

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

🤦‍♂️ I clearly did something wrong here as this is clearly missing the extraClasspath.

@briandealwis briandealwis changed the title I894mkii Add ability to add paths to the computed classpath Apr 18, 2019
Copy link
Member

@chanseokoh chanseokoh left a comment

Choose a reason for hiding this comment

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

LGMT. Don't forget to update CHANGELOG.

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.

Support extra classpath folders at runtime
4 participants