Upgrade from v76 to v77 produce a strange error
I have a a gitlab autodevops build that ultimately uses heroku-buildpack-java and since v77 I have a strange error comming from maven when runnning the test stage:
[INFO] Artifact com.company.common:commons-parent:pom:3.4.7.20250723 is present in the local repository, but cached from a remote repository ID that is unavailable in current build context, verifying that is downloadable from [central (https://repo.maven.apache.org/maven2, default, releases)] [ERROR] [ERROR] Some problems were encountered while processing the POMs: [FATAL] Non-resolvable parent POM for com.company.project:project-batch:${revision}${changelist}: The following artifacts could not be resolved: com.company.common:commons-parent:pom:3.4.7.20250723 (present, but unavailable): com.company.common:commons-parent:pom:3.4.7.20250723 was not found in https://repo.maven.apache.org/maven2 during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of central has elapsed or updates are forced and 'parent.relativePath' points at no local POM @ line 4, column 13 @ [ERROR] The build could not read 1 project -> [Help 1] [ERROR]
[ERROR] The project com.company.project:project-batch:${revision}${changelist} (/app/pom.xml) has 1 error [ERROR] Non-resolvable parent POM for com.company.project:project-batch:${revision}${changelist}: The following artifacts could not be resolved: com.company.common:commons-parent:pom:3.4.7.20250723 (present, but unavailable): com.company.common:commons-parent:pom:3.4.7.20250723 was not found in https://repo.maven.apache.org/maven2 during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of central has elapsed or updates are forced and 'parent.relativePath' points at no local POM @ line 4, column 13 -> [Help 2]
The pom was succesfully downloaded from our private gitlab repository:
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/com/company/common/commons-parent/3.4.7.20250723/commons-parent-3.4.7.20250723.pom [INFO] Downloading from gitlab-maven: https://gitlab.company.com/api/v4/groups/4/-/packages/maven/com/company/common/commons-parent/3.4.7.20250723/commons-parent-3.4.7.20250723.pom [INFO] Downloaded from gitlab-maven: https://gitlab.company.com/api/v4/groups/4/-/packages/maven/com/company/common/commons-parent/3.4.7.20250723/commons-parent-3.4.7.20250723.pom (11 kB at 84 kB/s)
I reverted back to the v76 version of the buildpack and the test job finishes without errors. BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-java.git#v76
How can I help resolving this issue ?
Hello @nrbw!
Thanks for the report! Can you clear the cache for the buildpack and try again with the new version? My initial suspicion is that the cache is stale. Let me know if that resolved the issue, if it doesn't we'll have to dig a little deeper.
Edit: How are you configuring the private repository? (i.e. where do you have your settings.xml and where do you configure the repository itelf - POM or settings?)
Thanks!
Hello @Malax I'm in a gitlab runner and I didn't set up the cache, so I shouldn't have any.
Here's my full settings.xml where I configure my private repository
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>gitlab-maven</id>
<username>${CI_DEPLOY_NAME}</username>
<password>${CI_DEPLOY_TOKEN}</password>
<configuration>
<httpHeaders>
<property>
<userName>${CI_DEPLOY_NAME}</userName>
<password>${CI_DEPLOY_TOKEN}</password>
<name>Deploy-Token</name>
<value>${CI_DEPLOY_TOKEN}</value>
</property>
</httpHeaders>
<httpConfiguration>
<all>
<connectionTimeout>5000</connectionTimeout>
</all>
</httpConfiguration>
</configuration>
</server>
<server>
<id>central</id>
<configuration>
<httpConfiguration>
<all>
<connectionTimeout>5000</connectionTimeout>
</all>
</httpConfiguration>
</configuration>
</server>
</servers>
<mirrors>
<mirror>
<id>releases.java.net-mirror</id>
<name>releases.java.net Mirror</name>
<url>https://maven.java.net/content/repositories/releases/</url>
<mirrorOf>releases.java.net</mirrorOf>
</mirror>
<mirror>
<id>shapshots.java.net-mirror</id>
<name>shapshots.java.net Mirror</name>
<url>https://maven.java.net/content/repositories/snapshots/</url>
<mirrorOf>shapshots.java.net</mirrorOf>
</mirror>
<mirror>
<id>jvnet-nexus-staging-mirror</id>
<name>jvnet-nexus-staging Mirror</name>
<url>https://maven.java.net/content/repositories/staging/</url>
<mirrorOf>jvnet-nexus-staging</mirrorOf>
</mirror>
<mirror>
<id>netbeans-mirror</id>
<name>netbeans Mirror</name>
<url>https://netbeans.apidesign.org/maven2/</url>
<mirrorOf>netbeans</mirrorOf>
</mirror>
</mirrors>
<profiles>
<profile>
<id>Gitlab-repo</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>Central Repository</name>
<url>https://repo.maven.apache.org/maven2</url>
</repository>
<repository>
<id>gitlab-maven</id>
<name>Repository pour les artifacts non publiés sur maven central</name>
<url>https://gitlab.company.com/api/v4/groups/4/-/packages/maven</url>
<layout>default</layout>
<snapshots>
<enabled>false</enabled>
<updatePolicy>daily</updatePolicy>
<checksumPolicy>warn</checksumPolicy>
</snapshots>
</repository>
</repositories>
</profile>
</profiles>
</settings>
Hey @nrbw, thanks for the additional info!
Where do you have your settings.xml? In the root of the project or somewhere else? Are you using the settings.xml related env vars?
I'm not deeply familiar with GitLab runners and couldn't find a reference that it supports buildpacks. Can you elaborate a bit how you're running the buildpack (i.e. do you call bin/compile "by hand", is there a GitLab feature that I just didn't see)? I'm asking since I have not had any reports or breakage like you describe on Heroku since we rolled out v77.
Sorry @Malax for the late reply, I've been off work for a time.
My settings.xml is copied in the root of the project. I don't set any env variables to specify the settings.xml file.
In the log I see that the buildpack is launched with simple arguments:
$ /bin/herokuish buildpack test
Hey @nrbw, welcome back :)
knowing you're using /bin/herokuish buildpack test helps a lot! I'll check if I can reproduce the issue and report back here.