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

Fix 226 #265

Merged
merged 3 commits into from
May 2, 2023
Merged

Fix 226 #265

merged 3 commits into from
May 2, 2023

Conversation

anthonydahanne
Copy link
Member

@anthonydahanne anthonydahanne commented May 1, 2023

Summary

Support new env. variable BP_MAVEN_ACTIVE_PROFILES

  • append its profiles last

Support new env. variable BP_MAVEN_ADDITIONAL_BUILD_ARGUMENTS

  • append its arguments after the BP_MAVEN_BUILD_ARGUMENTS

Use Cases

pack build -e BP_MAVEN_ACTIVE_PROFILES=native,-dev -e BP_MAVEN_ADDITIONAL_BUILD_ARGUMENTS=-DskipJavadoc -p ~/workspaces/paketo-buildpacks/samples/java/maven/ plop -b paketo-buildpacks/syft \
-b paketo-buildpacks/bellsoft-liberica \
-b . \
-b paketo-buildpacks/executable-jar \
 --builder paketobuildpacks/builder:base --verbose --clear-cache

[...]

Paketo Buildpack for Maven {{.version}}
  https://github.com/paketo-buildpacks/maven
  Build Configuration:
    $BP_EXCLUDE_FILES                                                                            colon separated list of glob patterns, matched source files are removed
    $BP_INCLUDE_FILES                                                                            colon separated list of glob patterns, matched source files are included
    $BP_JAVA_INSTALL_NODE                 false                                                  whether to install Yarn/Node binaries based on the presence of a package.json or yarn.lock file
    $BP_MAVEN_ACTIVE_PROFILES             native,-dev                                            the active profiles (comma separated: such as: p1,!p2,?p3) to pass to Maven
    $BP_MAVEN_ADDITIONAL_BUILD_ARGUMENTS  -DskipJavadoc                                          the additionnal arguments (appended to BP_MAVEN_BUILD_ARGUMENTS) to pass to Maven
    $BP_MAVEN_BUILD_ARGUMENTS             -Dmaven.test.skip=true --no-transfer-progress package  the arguments to pass to Maven
    $BP_MAVEN_BUILT_ARTIFACT              target/*.[ejw]ar                                       the built application artifact explicitly.  Supersedes $BP_MAVEN_BUILT_MODULE
    $BP_MAVEN_BUILT_MODULE                                                                       the module to find application artifact in
    $BP_MAVEN_DAEMON_ENABLED              false                                                  use maven daemon
    $BP_MAVEN_POM_FILE                    pom.xml                                                the location of the main pom.xml file, relative to the application root
    $BP_MAVEN_SETTINGS_PATH                                                                      the path to a Maven settings file
    $BP_MAVEN_VERSION                     3                                                      the Maven version
    $BP_NODE_PROJECT_PATH                                                                        configure a project subdirectory to look for `package.json` and `yarn.lock` files
    Creating cache directory /home/cnb/.m2
  Compiled Application: Contributing to layer
    Executing mvnw --batch-mode -Dmaven.test.skip=true --no-transfer-progress package -DskipJavadoc -P native,-dev
      [INFO] Scanning for projects...
[...]

Checklist

  • I have viewed, signed, and submitted the Contributor License Agreement.
  • I have linked issue(s) that this PR should close using keywords or the Github UI (See docs)
  • I have added an integration test, if necessary.
  • I have reviewed the styleguide for guidance on my code quality.
  • I'm happy with the commit history on this PR (I have rebased/squashed as needed).

* append its arguments after the BP_MAVEN_BUILD_ARGUMENTS
@anthonydahanne anthonydahanne requested a review from a team as a code owner May 1, 2023 15:04
@anthonydahanne anthonydahanne added semver:minor A change requiring a minor version bump type:enhancement A general enhancement labels May 1, 2023
@dmikusa
Copy link
Contributor

dmikusa commented May 1, 2023

This looks good. The README.md should have entries for the new Config settings.

A reminder and it needs a separate PR, we'll want to add these new settings to the docs as well.

@anthonydahanne
Copy link
Member Author

This looks good.

Thanks!

The README.md should have entries for the new Config settings.

Updated and added in this PR: paketo-buildpacks/paketo-website#671

README.md Outdated Show resolved Hide resolved
@dmikusa
Copy link
Contributor

dmikusa commented May 2, 2023

Just curious, are you planning to submit a PR for gradle that adds BP_GRADLE_BUILD_ARGUMENTS? That would seem to be a reasonable addition. Not sure if the other env variable makes sense for gradle?

@dmikusa dmikusa merged commit 83aaae1 into main May 2, 2023
@dmikusa dmikusa deleted the fix-226 branch May 2, 2023 13:38
@anthonydahanne
Copy link
Member Author

Just curious, are you planning to submit a PR for gradle that adds BP_GRADLE_BUILD_ARGUMENTS? That would seem to be a reasonable addition. Not sure if the other env variable makes sense for gradle?

TBH, I did not plan on adding it for Gradle. But there's no good reason not to add it to Gradle.

Done: paketo-buildpacks/gradle#238

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver:minor A change requiring a minor version bump type:enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants