Issues building Hazelcast with Maven

17 views
Skip to first unread message

Марио Павлов

unread,
Jun 19, 2023, 9:02:08 AM6/19/23
to Hazelcast
Hello,

I have an issue to build my project that depends on Hazelcast and I cannot quite figure out what is the reeason for the problem.

Locally I can build my project, and there are no issues at all. Here is the dependency tree of the project:
[INFO] --- dependency:2.8:tree (default-cli) @ tt-hazelcast ---
[INFO] <project-name>:jar:2014.3
[INFO] +- <internal-project>:<dependency>:jar:2014.3:compile
[INFO] +- com.hazelcast:hazelcast:jar:5.2.1:compile
[INFO] +- org.junit.jupiter:junit-jupiter-engine:jar:5.9.1:test
[INFO] |  +- org.junit.platform:junit-platform-engine:jar:1.9.1:test
[INFO] |  |  +- org.opentest4j:opentest4j:jar:1.2.0:test
[INFO] |  |  \- org.junit.platform:junit-platform-commons:jar:1.9.1:test
[INFO] |  +- org.junit.jupiter:junit-jupiter-api:jar:5.9.1:test
[INFO] |  \- org.apiguardian:apiguardian-api:jar:1.1.2:test
[INFO] +- org.projectlombok:lombok:jar:1.18.24:provided
[INFO] +- org.apache.logging.log4j:log4j-api:jar:2.19.0:compile
[INFO] \- org.apache.logging.log4j:log4j-core:jar:2.19.0:compile

And here is the POM dependency section
-------------------------------------------------------
<dependencies>
        <dependency>
            <groupId><internal-project></groupId>
            <artifactId>models</artifactId>
            <version>2014.3</version>

        </dependency>
        <dependency>
            <groupId>com.hazelcast</groupId>
            <artifactId>hazelcast</artifactId>
            <version>5.2.1</version>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>${junit-5.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.18.24</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-api</artifactId>
            <version>2.19.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-core</artifactId>
            <version>2.19.0</version>
        </dependency>
    </dependencies>
-------------------------------------------------------

However, when I try to run a build on a Jenkins server (running on CentOS) I receive the following error:
-------------------------------------------------------
Downloading: https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-bom/3.19.6/protobuf-bom-3.19.6.pom [WARNING] Unable to get resource 'com.google.protobuf:protobuf-bom:pom:3.19.6' from repository central (https://repo.maven.apache.org/maven2): Specified destination directory cannot be created: /var/lib/jenkins/.m2/repository/com/google/protobuf/protobuf-bom/3.19.6 Downloading: https://packages.confluent.io/maven//com/google/protobuf/protobuf-bom/3.19.6/protobuf-bom-3.19.6.pom [INFO] Unable to find resource 'com.google.protobuf:protobuf-bom:pom:3.19.6' in repository confluent (https://packages.confluent.io/maven/) Downloading: https://repository.hazelcast.com/security-maven//com/google/protobuf/protobuf-bom/3.19.6/protobuf-bom-3.19.6.pom [INFO] Unable to find resource 'com.google.protobuf:protobuf-bom:pom:3.19.6' in repository hazelcast-security (https://repository.hazelcast.com/security-maven/) Downloading: https://maven.repository.redhat.com/ga//com/google/protobuf/protobuf-bom/3.19.6/protobuf-bom-3.19.6.pom [INFO] Unable to find resource 'com.google.protobuf:protobuf-bom:pom:3.19.6' in repository redhat-ga (https://maven.repository.redhat.com/ga/) [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Failed to resolve artifact. Unable to get dependency information: Unable to read the metadata file for artifact 'com.hazelcast:hazelcast:jar': POM 'com.google.protobuf:protobuf-bom' not found in repository: Unable to download the artifact from any repository com.google.protobuf:protobuf-bom:pom:3.19.6 from the specified remote repositories: confluent (https://packages.confluent.io/maven/), central (https://repo.maven.apache.org/maven2), snapshot-repository (https://oss.sonatype.org/content/repositories/snapshots), hazelcast-security (https://repository.hazelcast.com/security-maven/), redhat-ga (https://maven.repository.redhat.com/ga/) for project com.google.protobuf:protobuf-bom com.hazelcast:hazelcast:jar:5.2.1 from the specified remote repositories: repository.jboss.org-public (https://repository.jboss.org/nexus/content/repositories/deprecated/), Hazelcast Private Snapshot Repository (https://repository.hazelcast.com/snapshot/), central (http://repo1.maven.org/maven2), wso2 (https://dist.wso2.org/maven2/), central1 (https://repo1.maven.org/maven2/), Hazelcast Private Release Repository (https://repository.hazelcast.com/release/), JBoss Repo (https://repository.jboss.org/nexus/content/groups/public-jboss/)
-------------------------------------------------------

I have manually installed both Hazelcast and Protobuf dependencies on the Jenkins machine, and I cannot find in the dependencies of the Hazelcast Core library that I'm adding anywhere references to the Protobuf-BOM. So I'm a little bit lost why this happens and what is the issue behind it. 

Thanks for the assist in advance :)

Josef Cacek

unread,
Jun 23, 2023, 2:58:17 AM6/23/23
to haze...@googlegroups.com
Hi Mario,
hazelcast is a child module of the hazelcast-root, which imports the
protobuf-bom.
Check the https://repo1.maven.org/maven2/com/hazelcast/hazelcast-root/5.2.1/hazelcast-root-5.2.1.pom

You can try to prepare a Maven repo on an internet-connected machine
and then copy the repo folder to your Jenkins.

Run:
mvn dependency:go-offline -Dmaven.repo.local=/tmp/repo

Then copy the /tmp/repo to the target machine's ~/.m2/repository.

Regards,
-- Josef
> --
> You received this message because you are subscribed to the Google Groups "Hazelcast" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to hazelcast+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/hazelcast/546b5194-d24e-4577-98a9-f66e9de7e688n%40googlegroups.com.

--
This message contains confidential information and is intended only for the
individuals named. If you are not the named addressee you should not
disseminate, distribute or copy this e-mail. Please notify the sender
immediately by e-mail if you have received this e-mail by mistake and
delete this e-mail from your system. E-mail transmission cannot be
guaranteed to be secure or error-free as information could be intercepted,
corrupted, lost, destroyed, arrive late or incomplete, or contain viruses.
The sender therefore does not accept liability for any errors or omissions
in the contents of this message, which arise as a result of e-mail
transmission. If verification is required, please request a hard-copy
version. -Hazelcast
Reply all
Reply to author
Forward
0 new messages