#Adding ancient dependency to maven.

14 messages · Page 1 of 1 (latest)

twin umbra
#

How does one add a local jar dependency to maven without a package/group ID?

<dependency>
  <groupId>tld.domain.Project</groupId>
  <artifactId>Name</artifactId>
  <version>1.8</version>
  <scope>system</scope>
  <systemPath>${project.basedir}/src/main/resources/local.jar</systemPath>
</dependency>

Normally, this ^ is the way to do it... but the jar was built with ant, is ancient, and doesn't have an apparent groupID.🐜

half mulchBOT
#

This post has been reserved for your question.

Hey @twin umbra! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

twin umbra
#

(the dependency has everything directly in its src)

src
|_ file1.java
|_ file2.java
|_ file3.java
|_ '''.java
iron rune
#

system scope tends to be not reccomended in maven.
I'd use maven install file

mvn install:install-file \
   -Dfile=<path-to-file> \
   -DgroupId=<group-id> \
   -DartifactId=<artifact-id> \
   -Dversion=<version> \
   -Dpackaging=jar \
   -DgeneratePom=true```

The groupId, artifactId, and version are arbitrary you can use whatever you think best describes where this dependency is from.
#

make sure you put something you remember though

twin umbra
#

Thanks! Trying this now

half mulchBOT
# twin umbra Thanks! Trying this now

If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.

twin umbra
#

It seems to have generated the pom file, but I can't get my netbeans or mvn to recognise the file as jar as the required dependency

#

(I'm probably missing something obvious, but I'm quite new with building stuff, so I'm oblivious atm)

twin umbra
#

found the problem