gephi / gephi-plugins

Repository for Gephi Plugins maintained by the team. Each plugin has it's branch.
269 stars 622 forks source link

Impossible to compile due to unresolved dependency #237

Closed ginomarckx closed 2 years ago

ginomarckx commented 2 years ago

When trying to build a newly created plugin, several dependencies are unresolved, similar to what is described in #226.

[ERROR] Failed to execute goal on project import-plugin:
   Could not resolve dependencies for project group.id:import-plugin:nbm:1.0.0:
   Failed to collect dependencies at org.gephi:io-importer-api:jar:0.9.2 -> org.gephi:graph-api:jar:0.9.2 -> org.gephi:project-api:jar:0.9.2 -> org.netbeans.api:org-openide-filesystems:jar:RELEASE82:
   Failed to read artifact descriptor for org.netbeans.api:org-openide-filesystems:jar:RELEASE82:
   Could not transfer artifact org.netbeans.api:org-openide-filesystems:pom:RELEASE82 from/to netbeans (https://netbeans.apidesign.org/maven2/):
   Transfer failed for https://netbeans.apidesign.org/maven2/org/netbeans/api/org-openide-filesystems/RELEASE82/org-openide-filesystems-RELEASE82.pom: PKIX path building failed:
   sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target 
   -> [Help 1]

However, this time the repository https://netbeans.apidesign.org/maven2/ can be found, but the certificate has expired in July 2021, preventing Maven from downloading the dependencies.

Even when trusting the certificate and telling maven to go ahead with the download despite the invalid certificate, the build still fails because of a dependency specified in the gephi-parent pom, which still refers to the same repository that is no longer maintained (See #226)

When I tried to get the dependencies from Maven Central I needed to upgrade to a never version of Netbeans platform, but run in the same problem as above because of the dependency on Netbeans Platform RELEASE82 and a out of date configuration of the repository.

Is it possible to upgrade the dependencies on the Netbeans Platform to a version that is available on Maven Central to resolve this issue long term?

ginomarckx commented 2 years ago

I was able to workaround the issue by adding the following profile to my settings.xml

<profile>
    <id>gephi-legacy</id>
    <properties>
        <maven.wagon.http.ssl.insecure>true</maven.wagon.http.ssl.insecure>
        <maven.wagon.http.ssl.ignore.validity.dates>true</maven.wagon.http.ssl.ignore.validity.dates>
    </properties>
    <repositories>
        <repository>
            <id>netbeans</id>
            <name>NetBeans</name>
            <!-- <url>https://netbeans.apache.org/about/oracle-transition.html</url> -> Oracle repository no longer active -->
            <url>https://netbeans.apidesign.org/maven2/</url> <!-- -> Invalid certificate, see properties -->
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>
</profile>

And starting maven with -Dmaven.wagon.http.ssl.insecure and -Dmaven.wagon.http.ssl.ignore.validity.dates (for some reason, the system properties defined in the profile are not picked up)

Amar1729 commented 2 years ago

Oddly, I am still getting a similar error on mvn clean package, even with the <profile> added in my maven settings.

[ERROR] Failed to execute goal on project gephi-plugins:
    Could not resolve dependencies for project org.gephi:gephi-plugins:pom:0.9.2:
    Failed to collect dependencies at org.gephi:gephi:tar.gz:linux:0.9.2 -> org.netbeans.cluster:platform:pom:RELEASE82:
    Failed to read artifact descriptor for org.netbeans.cluster:platform:pom:RELEASE82:
    Could not transfer artifact org.netbeans.cluster:platform:pom:RELEASE82 from/to netbeans (http://bits.netbeans.org/nexus/content/groups/netbeans/):
    authentication failed for http://bits.netbeans.org/nexus/content/groups/netbeans/org/netbeans/cluster/platform/RELEASE82/platform-RELEASE82.pom, status:
    401 Repository decommissioned. Please refer to https://netbeans.apache.org/about/oracle-transition.html for more information.
    -> [Help 1]
mbastian commented 2 years ago

Hi, since we've moved now to the 0.9.3 base this issue has been resolved. The 0.9.3 base depends on the RELEASE130 version of Netbeans Platform, which is available from Maven central. No more needed to have a Netbeans-specific repository (yah!).