#adding mibble to maven

1 messages · Page 1 of 1 (latest)

tiny wyvern
#

i am trying to add mibble dependency to maven , but having errors with maven

cinder ploverBOT
#

<@&987246964494204979> please have a look, thanks.

tiny wyvern
#
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>relatedata</groupId>
    <artifactId>mibble</artifactId>
    <version>0.0.1-SNAPSHOT</version>

    <properties>
        <maven.compiler.source>21</maven.compiler.source>
        <maven.compiler.target>21</maven.compiler.target>
        <jackson.version>2.11.0</jackson.version>
    </properties>

    <dependencies>
        <!-- https://mvnrepository.com/artifact/net.percederberg.mibble/mibble -->
        <dependency>
            <groupId>net.percederberg.mibble</groupId>
            <artifactId>mibble</artifactId>
            <version>2.9.3</version>
        </dependency>
    </dependencies>

</project>
#

this is my maven config

#

what am i doing wrong?

final surge
#

ah

#

so by default maven pulls dependencies from the maven central repository

#

this one is not on central

#

it might be a good idea to put it on central in some way so it doesn't die whenever the OpenNMS repo dies

#

but until that, you can add a repository

#
<repositories>
    <repository>
        <id>OpenNMS</id>
        <url>https://repo.opennms.org/maven2/</url>
    </repository>
</repositories>
#

there is kinda a newer website with

#

some different instructions

#

but also note that they are licencing it with GPL

#

not L-GPL

#

which means you can't make a product with it

#

(GPL is "infectious")

#

but you can pay them for a better license - idk if thats how that works

tiny wyvern
#

@final surge i tried
putting the repositories u mentioned both the opennms and mibble.org
they both seem to not work

#
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>relatedata</groupId>
    <artifactId>mibble</artifactId>
    <version>0.0.1-SNAPSHOT</version>

    <properties>
        <maven.compiler.source>11</maven.compiler.source>
        <maven.compiler.target>11</maven.compiler.target>
        <jackson.version>2.11.0</jackson.version>
    </properties>
    <repositories>
        <repository>
            <id>OpenNMS</id>
            <url>https://repo.opennms.org/maven2/</url>
        </repository>
    </repositories>
    <dependencies>
        <dependency>
            <groupId>net.percederberg</groupId>
            <artifactId>mibble</artifactId>
            <version>1.6</version>
        </dependency>
    </dependencies>

</project>

this is what i used

cinder ploverBOT
#

@tiny wyvern

Your question has been closed due to inactivity.

If it was not resolved yet, feel free to just post a message below
to reopen it, or create a new thread.

Note that usually the reason for nobody calling back is that your
question may have been not well asked and hence no one felt confident
enough answering.

When you reopen the thread, try to use your time to improve the quality
of the question by elaborating, providing details, context, all relevant code
snippets, any errors you are getting, concrete examples and perhaps also some
screenshots. Share your attempt, explain the expected results and compare
them to the current results.

Also try to make the information easily accessible by sharing code
or assignment descriptions directly on Discord, not behind a link or
PDF-file; provide some guidance for long code snippets and ensure
the code is well formatted and has syntax highlighting. Kindly read through
https://stackoverflow.com/help/how-to-ask for more.

With enough info, someone knows the answer for sure 👍

tiny wyvern
#

bump

tiny wyvern
final surge
#

sorry i've been doing work work the last few days

tiny wyvern
#

maybe there is a way , i can put "whatever maven is trying to find(artifact??) " on nexus and it can pull from there?

#

i am not sure if this is how it works

final surge
#

im looking now

#

but please confirm that you understand what i said about the licensing

final surge
# tiny wyvern

yeah so i think opennms might require some authorization or something

#

there is a way to add this all to your local repo

tiny wyvern
#

local repo? like with nexus?

final surge
#

i mean your .m2 on your machine

#

so if you have the jar for this

tiny wyvern
#

maven is pulling the jar for mibble?

final surge
#

no

#

well it could

tiny wyvern
#

i am sorry i am confused a little

final surge
#

if it was on any repo

tiny wyvern
#

what is it pulling

final surge
#

so there is a jar for mibble out there in the world

#

we cannot find it on any maven repositories

#

so when you put a dependency declaration it wont find it

#

but if you physically have the jar on your machine

tiny wyvern
#

aha , can we build the jar?

final surge
#

lets just skip ahead to "you have the jar"

tiny wyvern
#

gotcha

final surge
#

if you have the jar on your machine

#

you can run this command

#
mvn install:install-file \
   -Dfile=<path-to-file> \
   -DgroupId=net.percederberg \
   -DartifactId=mibble \
   -Dversion=1.6 \
   -Dpackaging=jar \
   -DgeneratePom=true
#

and that will put the jar inside a special folder on your computer

#

the ".m2" folder or "your local maven repo"

#

before checking the internet for a dependency it will check that folder

#

this is how it avoids redownloading dependencies

tiny wyvern
#

this makes sense

final surge
#

it downloads them once then uses that

tiny wyvern
#

so the only issue remaining is , how to get that jar?

final surge
#

so you can take the jar and put it in your local maven repo and then everything else will "just work"

#

right

#

so if you want to use 1.6 you need to find it out there

#

Use an Older Version — Versions 1.2 to 2.3 of Mibble were licensed under GNU GPL but with an exception allowing linking with non-GPL code, effectively making the license LGPL. All these versions contain bugs and are unmaintained, but they may still work for you.

tiny wyvern
#

i dont think i want a specific version

final surge
#

well you might

#

because 1.2 to 2.3 are under LGPL

tiny wyvern
#

cuz of license?

final surge
#

yes

tiny wyvern
#

i can pay for the licesnse

final surge
#

okay then

tiny wyvern
#

its 1500 EUR???

final surge
#

the jar also appearrs to be here

tiny wyvern
#

ooo

tiny wyvern
#

so i need to download the tar , extract is , then put it where exactly

final surge
#

last LGPL version which you dont need to pay for

tiny wyvern
#

in project folder?

#

and give maven the path with the command u mentioned

final surge
#

well

tiny wyvern
final surge
#

okay so unzipping that folder gives a directory

#

you might need to do that for all 3 of these jars

#

idk what the other 2 are

forest hull
#

you had a versioning issue with mibble?

final surge
tiny wyvern
#

grammatica is need for mibble

final surge
#

and past 2.3 its GPL not LGPL

forest hull
#

why are you creating your own artifact under mibble?

final surge
#

and the OpenNMS repo either doesnt have it or requires auth to get it

#

there is also a repo on the mibble site but that is also broken

forest hull
#

yeah, just tried it out, seems like its not hosted anymore

final surge
#

better safe than sorry

tiny wyvern
#

really appreciate the help