Comments (7)
Ahh now it's getting clear to me. The buildpack sees a mvnw script in the project and uses that to run/download maven. This script has not been updated since we run vanilla maven locally. Updating the script or removing it will properly solve the issue.
from java.
Realized that this possibly should have been raised here https://github.com/paketo-buildpacks/maven
You get the same output when running ❯ pack build foo --builder paketobuildpacks/builder:base on a maven based java 11 project
from java.
The suggested solution here would be to use a newer version of Maven. The flag mentioned in the error, --no-transfer-progress
is from Maven 3.6.1 (2019). You should use a version of Maven newer than that.
By default, the buildpack will install a version of Maven that is newer than 3.6.1 and compatible with this argument. However, if you are using Maven Wrapper, then the version of Maven is dictated by the Maven wrapper present in your application. You likely need to update your Maven wrapper so it's using a newer version. Then next time you build, the buildpack will use that version of Maven.
If you cannot update Maven for some reason, set the env variable BP_MAVEN_BUILD_ARGUMENTS
to -Dmaven.test.skip=true package
with pack build -e BP_MAVEN_BUILD_ARGUMENTS='-Dmaven.test.skip=true package'
. That will override the default set of Maven arguments and remove the one incompatible with your older version of Maven.
from java.
The project is not using any wrapper and will rely on the maven buildpack for taking action on installing the correct maven version. I have verified that this is happening on a java 17 project, but not when java 11 project ??
Here is the output from the java 17 project where maven is contributing ->
Paketo Maven Buildpack 6.5.0
https://github.com/paketo-buildpacks/maven
Build Configuration:
$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
Apache Maven 3.8.5: Contributing to layer
Downloading from https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.8.5/apache-maven-3.8.5-bin.tar.gz
Verifying checksum
Expanding to /layers/paketo-buildpacks_maven/maven
Creating cache directory /home/cnb/.m2
I think this i a bug in the builder, and that I know that i can temporary fix this by overriding the MAVEN_BUILD_ARGUEMENTS as stated.
from java.
Executing mvnw --batch-mode -Dmaven.test.skip=true --no-transfer-progress package
In your original post, it says mvnw
^^^. Are you certain?
I can take a closer look if you include the full output from building, as well as the full pack build
command you're running. It's hard to say what might be happening without the full output. Or if you can include a sample project, I can try to reproduce it on my end. Thanks
from java.
Closing this now. Thanks for pointing me in the right direction :-)
from java.
No problem, happy to help.
from java.
Related Issues (20)
- Implement RFC0044: Disable SBOM HOT 2
- Java Buildpack 10.2.0 Error HOT 2
- When the image built using bootBuildImage creates files or folders with Chinese names at runtime, their names will be garbled HOT 1
- When BP_JVM_VERSION is 21, the workspace owner has a problem. HOT 3
- No builldpack.toml found in java 10.7.0 HOT 4
- Validating stack mixins fails HOT 1
- Add Node into the buildpack order group HOT 6
- Add custom folders during paketo build HOT 12
- OpenJDK error with cgroups v2 HOT 6
- Enable option and support to specify a different JVM as an environment variable. HOT 5
- Request to Update Bellsoft Liberica Buildpacks to 9.4.2 as default HOT 3
- Implement RFC0052: Graceful Stack Upgrades HOT 3
- including newrelic buildpack HOT 7
- Spring Boot Native Builds with bellsoft-liberica:9.9.0-ea crash since this morning with 403 HOT 3
- Make it easier to run apps that require fonts HOT 2
- Support ability to use cyclonedx-maven-plugin HOT 6
- Support Structured Log Format HOT 1
- repo.spring.io brown-out process is breaking spring boot builds HOT 4
- build image un-idempotency HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from java.