dbeaver / cloudbeaver

Cloud Database Manager
https://dbeaver.com/
Apache License 2.0
3.52k stars 382 forks source link

Build Failing for tools.jar on OpenJDK 11 #303

Closed suhasadhav closed 3 years ago

suhasadhav commented 3 years ago

Describe the bug I am trying to build the code for hive drivers but it is failing to download artifact jdk.tools:jdk.tools:jar:1.6 as it is removed from version 9 and am building this on OpenJDK 11.

Below is the pom.xml I am using for hive drivers:

Cloudbeaver apache_hive2/pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <artifactId>drivers.apache_hive2</artifactId>
    <version>1.0.0</version>
    <parent>
        <groupId>io.cloudbeaver</groupId>
        <artifactId>drivers</artifactId>
        <version>1.0.0</version>
        <relativePath>../</relativePath>
    </parent>

    <properties>
        <deps.output.dir>apache_hive2</deps.output.dir>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.apache.hive</groupId>
            <artifactId>hive-jdbc</artifactId>
            <classifier>standalone</classifier>
            <version>RELEASE</version>
        </dependency>      
    </dependencies>

</project>

Cloudbeaver server/bundles/io.cloudbeaver.resources.drivers.base/plugin.xml

<?xml version="1.0" encoding="UTF-8"?>
<plugin>
    <!-- Resource mappings -->
    <extension point="org.jkiss.dbeaver.resources">
        **<resource name="drivers/apache_hive2"/>**
        <resource name="drivers/db2"/>
        <resource name="drivers/mysql/mysql8"/>
        <resource name="drivers/mariadb"/>
        <resource name="drivers/oracle"/>
        <resource name="drivers/postgresql"/>
        <resource name="drivers/clickhouse"/>
        <resource name="drivers/derby"/>
        <resource name="drivers/jaybird"/>
        <resource name="drivers/h2"/>
        <resource name="drivers/sqlite/xerial"/>
        <resource name="drivers/mssql/new"/>
        <resource name="drivers/trino"/>
    </extension>

    <!-- Bundles  -->
    <extension point="org.jkiss.dbeaver.product.bundles">
        **<bundle id="drivers.apache_hive2" label="Hive drivers"/>**
        <bundle id="drivers.db2" label="DB2 drivers"/>
        <bundle id="drivers.mysql" label="MySQL drivers"/>
        <bundle id="drivers.mariadb" label="MariaDB drivers"/>
        <bundle id="drivers.oracle" label="Oracle drivers"/>
        <bundle id="drivers.postgresql" label="PostgreSQL drivers"/>
        <bundle id="drivers.clickhouse" label="Clickhouse drivers"/>
        <bundle id="drivers.derby" label="Derby drivers"/>
        <bundle id="drivers.firebird" label="Firebird drivers"/>
        <bundle id="drivers.h2" label="H2 drivers"/>
        <bundle id="drivers.sqlite.xerial" label="SQLite drivers"/>
        <bundle id="drivers.mssql.new" label="SQL Server drivers"/>
        <bundle id="drivers.trino" label="Trino drivers"/>
    </extension>

    <!-- Enabled drivers -->
    <extension point="io.cloudbeaver.driver">
        **<driver id="generic:apache_hive2"/>**
        <driver id="db2:db2"/>
        <driver id="mysql:mysql8"/>
        <driver id="mysql:mariaDB"/>
        <driver id="oracle:oracle_thin"/>
        <driver id="postgresql:postgres-jdbc"/>
        <driver id="jaybird:jaybird"/>
        <driver id="generic:yandex_clickhouse"/>
        <driver id="generic:derby_server"/>
        <driver id="generic:h2_embedded"/>
        <driver id="generic:sqlite_jdbc"/>
        <driver id="sqlserver:microsoft"/>
        <driver id="generic:trino_jdbc"/>
    </extension>
</plugin>

While build getting below error:

[ERROR] Failed to execute goal on project drivers.apache_hive2: Could not resolve dependencies for project io.cloudbeaver:drivers.apache_hive2:jar:1.0.0: Could not find artifact jdk.tools:jdk.tools:jar:1.6 at specified path /usr/lib/jvm/java-11-openjdk-amd64/../lib/tools.jar -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :drivers.apache_hive2

Desktop (please complete the following information):

Additional context Add any other context about the problem here, e.g. error log.

kseniiaguzeeva commented 3 years ago

Sorry for taking so long to get back to you. Are you still experiencing this problem?

kseniiaguzeeva commented 3 years ago

I'm just checking up on your situation. Please feel free to ask me to reopen the ticket if the problem still persists.