Home > Back-end >  net.proteanit.sql for gradle
net.proteanit.sql for gradle

Time:08-01

I'm trying to open same project in 3 build tools: Maven, Ant and Gradle. It's simple project with sql database, I've already done this via Ant and Maven, unfortunately after adding rs2xml.jar to project module(as I added in Ant and Maven), and import (import net.proteanit.sql.DbUtils;) project doesn't compile. I don't receive any errors from Intellij (no code is red), during gradle task - compileJava the message appears:

"error: package net.proteanit.sql does not exist import net.proteanit.sql.DbUtils;"

It points me to method: table.setModel(DbUtils.resultSetToTableModel(rs)); In build file I added dependecies like: open javafx, javafx graphics, java.swing, apche.ant.

Here is link to project on github: https://github.com/PatrykK98/Gradle-University-Management-System -- problem appears in java/management/system/ExaminationDetails.java line 33.

Any help will be appreciated.

CodePudding user response:

if that jar file are in any online repo it would be better to use it but in case you want to use this file then modify your repo as follow

repositories {
    mavenCentral()
    flatDir {
        dirs 'lib'
    }

this will look for the jar inside that folder

and for your dependencies add this line to it

implementation name:'rs2xml'

notice name the file without the extension

Edit:

if there no certain rule that make you use gradle version 7.1 then it better to use the latest version 7.5 simply run this

 ./gradlew wrapper --gradle-version 7.5

from your project folder or even the ide terminal window

hope that help and have a nice day :)

  • Related