Skip to content

Commit

Permalink
Make Maven 3.9.4 the default (#207)
Browse files Browse the repository at this point in the history
  • Loading branch information
Malax authored Aug 14, 2023
1 parent d2fc88a commit 8ed3686
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 10 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## main

* Remove heroku-18 support ([#204](https://github.com/heroku/heroku-buildpack-java/pull/204))
* Upgrade default Maven version to `3.9.4`. ([#207](https://github.com/heroku/heroku-buildpack-java/pull/207))

## v72

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Heroku buildpack for Java [![CI](https://github.com/heroku/heroku-buildpack-java
![java](https://cloud.githubusercontent.com/assets/871315/20325947/f3544014-ab43-11e6-9c51-8240ce161939.png)

This is the official [Heroku buildpack](http://devcenter.heroku.com/articles/buildpack) for Java apps.
It uses Maven 3.6.2 to build your application and OpenJDK 8 to run it. However, the JDK version can be configured as described below.
It uses Maven 3.9.4 to build your application and OpenJDK 8 to run it. However, the JDK version can be configured as described below.

## How it works

Expand Down
2 changes: 1 addition & 1 deletion lib/common.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

export DEFAULT_MAVEN_VERSION="3.6.2"
export DEFAULT_MAVEN_VERSION="3.9.4"

install_maven() {
local installDir=$1
Expand Down
2 changes: 1 addition & 1 deletion test/common_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ test_detect_maven_version_with_no_file() {
}

test_is_supported_maven_version_default() {
capture is_supported_maven_version "$DEFAULT_MAVEN_VERSION" "https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/${$DEFAULT_MAVEN_VERSION}/apache-maven-${$DEFAULT_MAVEN_VERSION}-bin.tar.gz"
capture is_supported_maven_version "$DEFAULT_MAVEN_VERSION" "https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/${DEFAULT_MAVEN_VERSION}/apache-maven-${DEFAULT_MAVEN_VERSION}-bin.tar.gz"
assertCapturedSuccess
}

Expand Down
6 changes: 3 additions & 3 deletions test/compile_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ testCustomSettingsXml()
compile

assertCapturedSuccess
assertCaptured "Should download from JBoss" "Downloading from jboss-no-bees: http://repository.jboss.org/nexus/content/groups/public"
assertCaptured "Should download from JBoss" "Downloading from jboss-no-bees: https://repository.jboss.org/nexus/content/groups/public"
}

testCustomSettingsXmlWithPath()
Expand All @@ -98,7 +98,7 @@ testCustomSettingsXmlWithPath()
compile

assertCapturedSuccess
assertCaptured "Should download from JBoss" "Downloading from jboss-no-bees: http://repository.jboss.org/nexus/content/groups/public"
assertCaptured "Should download from JBoss" "Downloading from jboss-no-bees: https://repository.jboss.org/nexus/content/groups/public"

unset MAVEN_SETTINGS_PATH
}
Expand All @@ -114,7 +114,7 @@ testCustomSettingsXmlWithUrl()
compile

assertCapturedSuccess
assertCaptured "Should download from JBoss" "Downloading from jboss-no-bees: http://repository.jboss.org/nexus/content/groups/public"
assertCaptured "Should download from JBoss" "Downloading from jboss-no-bees: https://repository.jboss.org/nexus/content/groups/public"

unset MAVEN_SETTINGS_URL
}
Expand Down
6 changes: 3 additions & 3 deletions test/helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ createSettingsXml()
<repository>
<id>jboss-no-bees</id>
<name>JBoss Public Maven Repository Group</name>
<url>http://repository.jboss.org/nexus/content/groups/public/</url>
<url>https://repository.jboss.org/nexus/content/groups/public/</url>
</repository>
</repositories>
</profile>
Expand Down Expand Up @@ -115,8 +115,8 @@ _assertMaven354() {

_assertMavenLatest() {
local installDir="$(_mavenDir)"
assertCaptured "Wrong Maven Installed" "Installing Maven 3.6.2"
assertFileMD5 "833f5bcc6ee59f6716223f866570bc88" ${installDir}/.maven/bin/mvn
assertCaptured "Wrong Maven Installed" "Installing Maven 3.9.4"
assertFileMD5 "45ca660e83af83fa8213b55fb693326c" ${installDir}/.maven/bin/mvn
assertTrue "mvn should be executable" "[ -x ${installDir}/.maven/bin/mvn ]"

assertCaptured "Unexpected mvn command" "mvn -DskipTests clean dependency:list install"
Expand Down
2 changes: 1 addition & 1 deletion test/spec/maven_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
expect(app.output).to include("BUILD SUCCESS")
expect(http_get(app)).to eq("Hello from Java!")

%w(3.6.2 3.5.4 3.3.9).each do |maven_version|
%w(3.9.4 3.6.2 3.5.4 3.3.9).each do |maven_version|
set_maven_version(maven_version)
app.commit!
app.push!
Expand Down

0 comments on commit 8ed3686

Please sign in to comment.