#Force install dependency.

5 messages · Page 1 of 1 (latest)

lyric matrix
#

I have a maven project with a dependency in the pom:

        <dependency>
            <groupId>tld.domain1</groupId>
            <artifactId>name</artifactId>
            <version>0.0.0.0</version>
            <scope>provided</scope>
        </dependency>

This dependency does not exist at any of the repositories in the pom; I don't want to change the pom. Instead, I want to fetch the dependency jar from somewhere (wget), store it locally, and build the project with that.

This is with mvn in docker.

wooden smeltBOT
#

This post has been reserved for your question.

Hey @lyric matrix! Please use /close or the Close Post button above when your problem is solved. 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.

lyric matrix
#

I am currently wgetting the dependency jar, putting it in the folder with the project's files, and running:

mvn -X install:install-file  -name.jar \
     -DgroupId=tld.domain \
     -DartifactId=name\
     -Dversion="$core_version" \
     -Dpackaging=jar \
     -DgeneratePom=true
mvn -X install

The first install ... builds?... the dependency successfully, but doesn't build the main project jar.
The second install fails to build the main project jar because it is for some reason missing the dependency that was just installed.

lyric matrix
#

Figured it out.