jooq pro - download from local gitlab package registry problem

105 views
Skip to first unread message

Andrej Škufca

unread,
Jun 20, 2023, 6:10:27 AM6/20/23
to jOOQ User Group
Hi,

We are new to jooq and have now bought pro licensess. I have installed jooq pro to my maven gitlab package registry. When I try to build my app now I get:

ERROR] Plugin org.jooq.pro:jooq-codegen-maven:3.18.4 or one of its dependencies could not be resolved: org.jooq.pro:jooq-codegen-maven:jar:3.18.4 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 -> [Help 1]

All other local dependencies are downloaded successfuly from our maven gitlab package registry.

If I install jooq packages to my local maven cache build is OK. But that does not help me in case of CI pipeline.

1. JOOQ pro was succesfully deployed to gitlab maven package registri, with this command:

maven-deploy.bat -r gitlab-maven -u https://<gitlab_server_fqdn>/api/v4/projects/<project id>/packages/maven

2. Setting.xml should be ok as it works for other dependencies.

Does any one have any idea how to solve this? Every help will be much appriciated.

Thank you and best regards. 
Andrej

Lukas Eder

unread,
Jun 20, 2023, 6:12:34 AM6/20/23
to jooq...@googlegroups.com
Hi Andrej,

Thank you very much for your message.

Please download jOOQ's commercial distribution from here:

And use the included install/deploy scripts to install/deploy the artifacts into your local repository. You will need to deploy jOOQ just like your own application.

Best Regards,
Lukas

--
You received this message because you are subscribed to the Google Groups "jOOQ User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jooq-user/478008e3-fe7a-45f2-9688-1ed59162bbc7n%40googlegroups.com.

Andrej Škufca

unread,
Jun 20, 2023, 6:35:57 AM6/20/23
to jOOQ User Group
Hi Lukas,

thank you for answer. Please see point 1.

1. JOOQ pro was succesfully deployed to gitlab maven package registri, with this command:

maven-deploy.bat -r gitlab-maven -u https://<gitlab_server_fqdn>/api/v4/projects/<project id>/packages/maven

I have done that and I can see 17  jooq packages in the registry, including org/jooq/pro/jooq-codegen-maven version 3.18.4.

Lukas Eder

unread,
Jun 20, 2023, 7:10:45 AM6/20/23
to jooq...@googlegroups.com
Hi Andrej,

Maybe, this hint from the error message helps?

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 -> [Help 1]

Best regards,
Lukas

Andrej Škufca

unread,
Jun 20, 2023, 7:49:04 AM6/20/23
to jOOQ User Group
Hi Lukas,

I wish :). I have deleted the repository several times. Also I have only gitlab-maven server, repository/profile defined in my settings.xml. I also do not set this inside pom.xml. I know I must be missing something :).

Here is what my pipeline does, and log outputs. Maybe you can se something I don not. 

1. DELETE MAVEN CACHE 

    - rm -rf /cache/.m2
    - mkdir /cache/.m2 || true
    - ln -fs /cache/.m2 .m2

2. Install  jooq dependency:

mvn -s $CI_PROJECT_DIR/java-utils/.m2/settings.xml dependency:get -Dartifact=org.jooq.pro:jooq-codegen-maven:3.18.4 -DremoteRepositories=gitlab-maven::::https://<GITLAB_SERVER_FQDN>/api/v4/projects/<PROJECT_ID>/packages/maven

I GET THIS IN LOGS (in this order):
.
.
.
Downloading from central: https://repo.maven.apache.org/maven2/org/jooq/pro/jooq-codegen-maven/3.18.4/jooq-codegen-maven-3.18.4.pom [WARNING] The POM for org.jooq.pro:jooq-codegen-maven:jar:3.18.4 is missing, no dependency information available Downloading from central: https://repo.maven.apache.org/maven2/org/jooq/pro/jooq-codegen-maven/3.18.4/jooq-codegen-maven-3.18.4.jar [WARNING] Failed to retrieve plugin descriptor for org.jooq.pro:jooq-codegen-maven:3.18.4: Plugin org.jooq.pro:jooq-codegen-maven:3.18.4 or one of its dependencies could not be resolved: Could not find artifact org.jooq.pro:jooq-codegen-maven:jar:3.18.4 in central (https://repo.maven.apache.org/maven2)
.
.
.
WARNING] The POM for org.jooq.pro:jooq-codegen-maven:jar:3.18.4 is missing, no dependency information available [WARNING] Failed to retrieve plugin descriptor for org.jooq.pro:jooq-codegen-maven:3.18.4: Plugin org.jooq.pro:jooq-codegen-maven:3.18.4 or one of its dependencies could not be resolved: org.jooq.pro:jooq-codegen-maven:jar:3.18.4 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 .
.
.
[INFO] Resolving org.jooq.pro:jooq-codegen-maven:jar:3.18.4 with transitive dependencies Downloading from gitlab-maven: https://<GITLAB_SERVER_FQDN>/api/v4/groups/<GROUP_ID>/-/packages/maven/org/jooq/pro/jooq-codegen-maven/3.18.4/jooq-codegen-maven-3.18.4.pom Downloaded from gitlab-maven: https://<GITLAB_SERVER_FQDN>/api/v4/groups/<GROUP_ID>/-/packages/maven/org/jooq/pro/jooq-codegen-maven/3.18.4/jooq-codegen-maven-3.18.4.pom (4.7 kB at 35 kB/s) Downloading from gitlab-maven: https://<GITLAB_SERVER_FQDN>/api/v4/groups/<GROUP_ID>/-/packages/maven/org/jooq/pro/jooq-parent/3.18.4/jooq-parent-3.18.4.pom
.
.
.
Downloading from gitlab-maven: https://<GITLAB_SERVER_FQDN>/api/v4/groups/<GROUP_ID> /-/packages/maven/org/jooq/pro/jooq-codegen-maven/3.18.4/jooq-codegen-maven-3.18.4.jar
.
.
.
Downloaded from gitlab-maven: https://<GITLAB_SERVER_FQDN>/api/v4/groups/<GROUP_ID>/-/packages/maven/org/jooq/pro/jooq-codegen-maven/3.18.4/jooq-codegen-maven-3.18.4.jar (18 kB at 97 kB/s)
.
.
.

So packages were downloaded from gitlab into clean maven local repository, but next command does not use these packages???

3. THE NEXT COMMAND IN THE SAME SESSION SHOULD BUILD THE APP:

mvn $MAVEN_CLI_OPTS deploy -P docker -Ddockerreg=$CI_REGISTRY -Ddockerreg.image.path=$IMAGE_PATH -Ddockerreg.username=$CI_REGISTRY_USER -Ddockerreg.password=$CI_REGISTRY_PASSWORD
.
.
.
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/jooq/pro/jooq-codegen-maven/3.18.4/jooq-codegen-maven-3.18.4.pom [WARNING] The POM for org.jooq.pro:jooq-codegen-maven:jar:3.18.4 is missing, no dependency information available [INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/jooq/pro/jooq-codegen-maven/3.18.4/jooq-codegen-maven-3.18.4.jar
.
.
.
[ERROR] Plugin org.jooq.pro:jooq-codegen-maven:3.18.4 or one of its dependencies could not be resolved: Could not find artifact org.jooq.pro:jooq-codegen-maven:jar:3.18.4 in central (https://repo.maven.apache.org/maven2) -> [Help 1] org.apache.maven.plugin.PluginResolutionException: Plugin org.jooq.pro:jooq-codegen-maven:3.18.4 or one of its dependencies could not be resolved: Could not find artifact org.jooq.pro:jooq-codegen-maven:jar:3.18.4 in central (https://repo.maven.apache.org/maven2) at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve (DefaultPluginDependenciesResolver.java:144) at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getPluginDescriptor (DefaultMavenPluginManager.java:182) at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getMojoDescriptor (DefaultMavenPluginManager.java:286) at org.apache.maven.plugin.DefaultBuildPluginManager.getMojoDescriptor (DefaultBuildPluginManager.java:244) at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.setupMojoExecution (DefaultLifecycleExecutionPlanCalculator.java:169) at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.setupMojoExecutions (DefaultLifecycleExecutionPlanCalculator.java:154) at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.calculateExecutionPlan (DefaultLifecycleExecutionPlanCalculator.java:130) at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.calculateExecutionPlan (DefaultLifecycleExecutionPlanCalculator.java:144) at org.apache.maven.lifecycle.internal.builder.BuilderCommon.resolveBuildPlan (BuilderCommon.java:97) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:115) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:127) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293) at org.apache.maven.cli.MavenCli.main (MavenCli.java:196) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:568) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347) Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not find artifact org.jooq.pro:jooq-codegen-maven:jar:3.18.4 in central (https://repo.maven.apache.org/maven2) at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve (DefaultArtifactResolver.java:425) at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts (DefaultArtifactResolver.java:229) at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact (DefaultArtifactResolver.java:207) at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact (DefaultRepositorySystem.java:262) at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve (DefaultPluginDependenciesResolver.java:140) at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getPluginDescriptor (DefaultMavenPluginManager.java:182) at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getMojoDescriptor (DefaultMavenPluginManager.java:286) at org.apache.maven.plugin.DefaultBuildPluginManager.getMojoDescriptor (DefaultBuildPluginManager.java:244) at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.setupMojoExecution (DefaultLifecycleExecutionPlanCalculator.java:169) at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.setupMojoExecutions (DefaultLifecycleExecutionPlanCalculator.java:154) at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.calculateExecutionPlan (DefaultLifecycleExecutionPlanCalculator.java:130) at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.calculateExecutionPlan (DefaultLifecycleExecutionPlanCalculator.java:144) at org.apache.maven.lifecycle.internal.builder.BuilderCommon.resolveBuildPlan (BuilderCommon.java:97) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:115) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:127) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293) at org.apache.maven.cli.MavenCli.main (MavenCli.java:196) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:568) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347) Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact org.jooq.pro:jooq-codegen-maven:jar:3.18.4 in central (https://repo.maven.apache.org/maven2) at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed (ArtifactTransportListener.java:48) at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run (BasicRepositoryConnector.java:369) at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run (RunnableErrorForwarder.java:75) at org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute (BasicRepositoryConnector.java:628) at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get (BasicRepositoryConnector.java:262) at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads (DefaultArtifactResolver.java:514) at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve (DefaultArtifactResolver.java:402) at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts (DefaultArtifactResolver.java:229) at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact (DefaultArtifactResolver.java:207) at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact (DefaultRepositorySystem.java:262) at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve (DefaultPluginDependenciesResolver.java:140) at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getPluginDescriptor (DefaultMavenPluginManager.java:182) at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getMojoDescriptor (DefaultMavenPluginManager.java:286) at org.apache.maven.plugin.DefaultBuildPluginManager.getMojoDescriptor (DefaultBuildPluginManager.java:244) at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.setupMojoExecution (DefaultLifecycleExecutionPlanCalculator.java:169) at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.setupMojoExecutions (DefaultLifecycleExecutionPlanCalculator.java:154) at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.calculateExecutionPlan (DefaultLifecycleExecutionPlanCalculator.java:130) at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.calculateExecutionPlan (DefaultLifecycleExecutionPlanCalculator.java:144) at org.apache.maven.lifecycle.internal.builder.BuilderCommon.resolveBuildPlan (BuilderCommon.java:97) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:115) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:127) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293) at org.apache.maven.cli.MavenCli.main (MavenCli.java:196) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:568) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Thank you.

Lukas Eder

unread,
Jun 20, 2023, 8:20:55 AM6/20/23
to jooq...@googlegroups.com
Hi Andrej,

I must admit, I've never tried configuring such repositories in settings.xml, only ever in pom.xml. Have you tried that? There's an implicit resolution order of repositories depending on their various declarations, see e.g.:

There's also this particular answer, which seems insane, but there it is:

It seems as though one part of Maven understands that it has to look into your gitlab repository, and another part seems to prioritise the lookup in Maven Central and then stops looking further.

Lukas Eder

unread,
Jun 20, 2023, 8:22:48 AM6/20/23
to jooq...@googlegroups.com
Actually, both answers with upvotes are very interesting :) One was just a bug (repositories being ordered by <id> rather than by declaration order), the other one being that settings repositories are ordered in *inverse* declaration order.

Tamás Cservenák

unread,
Jun 20, 2023, 8:33:30 AM6/20/23
to jooq...@googlegroups.com
Howdy,

none of them sound right, repositories are ordered in "declaration order", best checked with help:effective-pom.

For start, NEVER push back central.

Thanks
T

Andrej Škufca

unread,
Jun 21, 2023, 2:27:05 AM6/21/23
to jOOQ User Group
hI,

thank you all for hints and help. 

I have added pluginrepository to my settings.xml and it works as expected noq.

      <pluginRepositories>
        <pluginRepository>
          <releases>
            <updatePolicy>never</updatePolicy>
          </releases>
          <snapshots>
            <enabled>true</enabled>
          </snapshots>
          <id>gitlab-maven</id>
          <url>https://<GILTAB_SERVER_FQDN>/api/v4/groups/<GROUP_ID>/-/packages/maven</url>
        </pluginRepository>
     </pluginRepositories>

Lukas Eder

unread,
Jun 21, 2023, 2:44:25 AM6/21/23
to jooq...@googlegroups.com
Ah yes, I forgot. That's an entirely different namespace :-)

In case you're a Stack Overflow user and have some additional time, I think it would be great if this be documented here as well:

It's explicitly encouraged to ask *and* answer your own question to help others with your findings. Perhaps even your future self?

Cheers,
Lukas

Reply all
Reply to author
Forward
0 new messages