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

Fix Maven build #866

Merged
merged 2 commits into from
Aug 19, 2024
Merged

Fix Maven build #866

merged 2 commits into from
Aug 19, 2024

Conversation

stokito
Copy link
Contributor

@stokito stokito commented Aug 11, 2024

Currently the build is broken (surprise):

The POM for org.minidns:minidns-core:jar:1.0.3-SNAPSHOT is missing, no dependency information available

You may not see the error because the dependency is in your maven local .m2 repository. So you can reproduce this be removing it from local cache: rm -fr ~/.m2/repository/org/minidns/.

The problem is complicated here is that the spark-core declares a dependency to the minidns as a range: [1.0.0, 1.0.999]
https://github.com/igniterealtime/Smack/blob/master/build.gradle#L149C21-L149C37

This is dangerous to use in libraries. So the Maven tries to find all versions of the dependency. And here comes the second problem: the pom.xml has two additional repos:

    <repositories>
        <repository>
            <id>maven-snapshots-repo</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </repository>
        <repository>
            <id>ej-technologies</id>
            <url>https://maven.ej-technologies.com/repository/</url>
        </repository>
    </repositories>

The Maven goes into the maven-snapshots-repo and tries to resolve the 1.0.3-SNAPSHOT which is not exists there but it was referenced from some other dependency. In fact the Spark dosn't use snapshot versions (and it shouldn't) so the simplest solution is to just remove the maven-snapshots-repo as unused. It looks like this fixed the build.

Additionally it would be better to not use the range versions in the Smack but instead stick to the latest available today.

I also made the mvn dependency:analyze-only to see that some dependency is used in a compile time but it actually comes transitionally and once the intermediate dependency removes the dependency then the build become broken. So I added those dependencies explicitly to the pom.xml

@akrherz
Copy link
Member

akrherz commented Aug 11, 2024

Thanks @stokito , if I understand you correctly, you believe Smack needs updated as well? If so, can you kindly submit a PR there?

@stokito
Copy link
Contributor Author

stokito commented Aug 11, 2024

ok, will do later. The minidns look like more stable now and they published v1.1-alpha so once v1.1 become stable I think it will be a time to migrate to it.
Anyway, the Spark now will be compiled fine with the PR

@stokito
Copy link
Contributor Author

stokito commented Aug 18, 2024

@akrherz sorry for pushing, just a friendly reminder on this. Can you merge it to make a collaboration for newcomers easier?

@akrherz
Copy link
Member

akrherz commented Aug 18, 2024

@stokito I'm not really a developer on Spark, I just help out with the ignitrealtime organization

@stokito
Copy link
Contributor Author

stokito commented Aug 18, 2024

@Plyha maybe you can check the pr?

@Plyha
Copy link
Member

Plyha commented Aug 19, 2024

Hello!) Thanks for your PR, everything works, except install4j, for some reason I can't download it, error 403, maybe it's related to my location (Russia)

@Plyha Plyha merged commit 775e68e into igniterealtime:master Aug 19, 2024
3 checks passed
@stokito stokito deleted the maven branch August 20, 2024 04:13
@stokito
Copy link
Contributor Author

stokito commented Aug 20, 2024

I re-checked and I don't have such a problem.
But the install4-runtime has another problem:

[WARNING] Could not validate integrity of download from https://maven.ej-technologies.com/repository/com/install4j/install4j-runtime/10.0.4/install4j-runtime-10.0.4.jar
org.eclipse.aether.transfer.ChecksumFailureException: Checksum validation failed, no checksums available

The build is still successful but the warning is annoying. I reported the problem to install4j support and proposed to upload the artifact to Maven Central to make it easier and not use the custom repo.

Ingo Kegel answered "Thanks for the suggestion, we will consider it." so we need to wait and check again.

But I'm afraid that the dependency is not FOSS and can't find it's license. So maybe instead we should get rid off it. For now we must keep the Spark alive and not make such a big changes but for a feature we may need this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants