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

mvnw dependency:go-offline fails with ehcache #27615

Open
1 task done
leverglowh opened this issue Oct 18, 2024 · 0 comments
Open
1 task done

mvnw dependency:go-offline fails with ehcache #27615

leverglowh opened this issue Oct 18, 2024 · 0 comments

Comments

@leverglowh
Copy link

leverglowh commented Oct 18, 2024

Overview of the issue

A project generated with ehcache fails on mvnw dependency:go-offline, due to ehcache v.3.10+ changing jaxb dependency to a range [2.2,3)
Related issues on ehcache side: ehcache/ehcache3#3215 where the maintainer basically says it's normal.
ehcache/ehcache3#2881 here some suggest excluding jaxb-runtime, but I guess we need it for liquibase xml parsing? Also excluding did not work.
Simply downgrading to 3.9 and removing Jakarta classifier seems to work, but I'm not sure if it can be considered valid solution.
Lastly mvnw dependency:resolve works fine.

Motivation for or Use Case

Aside from the actual offline development use case, I was exploring the option of separating the dependency resolution step and the actual build step to cache the layer in docker image building.

Reproduce the error

Generate brand new project, with all suggested configs and run mvnw dependency:go-offline

Related issues

I see jabx-runtime listed separately under ehcache, but couldn't find any related issue/pr

<dependency>
      <groupId>org.glassfish.jaxb</groupId>
      <artifactId>jaxb-runtime</artifactId>
      <scope>provided</scope>
</dependency>
Suggest a Fix

I'm don't have much experience with maven, don't know if downgrading to ehcache 3.9 could have other repercussions, or somehow maybe don't let maven go through all dependency versions, since it ultimately resolves to org.glassfish.jaxb:jaxb-runtime:jar:4.0.5:provided?

This is the error anyway

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:3.6.1:go-offline (default-cli) on project test: org.eclipse.aether.resolution.DependencyResolutionException: Failed to collect dependencies at org.ehcache:ehcache:jar:jakarta:3.10.8 -> org.glassfish.jaxb:jaxb-runtime:jar:2.3.0-b170127.1453 -> org.glassfish.jaxb:jaxb-core:jar:2.3.0-b170127.1453 -> javax.xml.bind:jaxb-api:jar:2.3.0-b161121.1438: Failed to read artifact descriptor for javax.xml.bind:jaxb-api:jar:2.3.0-b161121.1438: The following artifacts could not be resolved: javax.xml.bind:jaxb-api:pom:2.3.0-b161121.1438 (absent): Could not transfer artifact javax.xml.bind:jaxb-api:pom:2.3.0-b161121.1438 from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [releases.java.net (http://maven.java.net/content/repositories/releases/, default, releases+snapshots), shapshots.java.net (http://maven.java.net/content/repositories/snapshots/, default, releases+snapshots), jvnet-nexus-staging (http://maven.java.net/content/repositories/staging/, default, releases+snapshots), netbeans (http://bits.netbeans.org/nexus/content/groups/netbeans, default, releases)] -> [Help 1]
JHipster Version(s)

v8.5.0

JHipster configuration
.yo-rc.json file
{
  "generator-jhipster": {
    "applicationType": "monolith",
    "authenticationType": "jwt",
    "baseName": "test",
    "buildTool": "maven",
    "cacheProvider": "ehcache",
    "clientFramework": "react",
    "clientTestFrameworks": [],
    "clientTheme": "none",
    "creationTimestamp": 1729209825255,
    "databaseType": "sql",
    "devDatabaseType": "postgresql",
    "devServerPort": 9060,
    "enableHibernateCache": false,
    "enableSwaggerCodegen": false,
    "enableTranslation": false,
    "entities": [],
    "feignClient": null,
    "jhipsterVersion": "8.5.0",
    "messageBroker": false,
    "microfrontend": null,
    "microfrontends": [],
    "nativeLanguage": "en",
    "packageName": "com.mycompany.myapp",
    "prodDatabaseType": "postgresql",
    "reactive": false,
    "searchEngine": false,
    "serverPort": null,
    "serverSideOptions": [],
    "serviceDiscoveryType": false,
    "syncUserWithIdp": null,
    "testFrameworks": [],
    "websocket": false,
    "withAdminUi": true
  }
}
Environment and Tools

java version "17.0.11" 2024-04-16 LTS
Java(TM) SE Runtime Environment (build 17.0.11+7-LTS-207)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.11+7-LTS-207, mixed mode, sharing)

git version 2.39.3 (Apple Git-145)

node: v18.20.3
npm: 10.7.0

Browsers and Operating System

This doesn't concern browser.
Regarding OS, the same error occurs both when trying to build the image on an ubuntu and on Mac directly.

  • Checking this box is mandatory (this is just to show you read everything)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants