Reputation: 374
I use a docker image of maven to build this custom Scribe, the simple OAuth Java lib
[INFO] Installing /usr/src/app/target/scribe-1.2.3.oauth.jar to /root/.m2/repository/org/scribe/scribe/1.2.3.oauth/scribe-1.2.3.oauth.jar
[INFO] Installing /usr/src/app/pom.xml to /root/.m2/repository/org/scribe/scribe/1.2.3.oauth/scribe-1.2.3.oauth.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 17.309 s
[INFO] Finished at: 2017-01-26T15:06:12+00:00
[INFO] Final Memory: 16M/41M
[INFO] ------------------------------------------------------------------------
using this
docker build -t my-maven .
The image build creates the scribe-1.2.3.oauth.jar perfectly. But i need this jar file to build the following project
Alfresco Share OAuth SSO Support
How can i get the jar file from the first build and use it in a local repository for my next build where i again want to use a docker maven to build that project
Upvotes: 2
Views: 3710
Reputation: 66
Left the jar build process out of the docker image build.
Why?
Because a better way to do this is making the maven docker image act as a single command:
docker run -it --rm --name my-maven-project -v "$PWD":/usr/src/mymaven -w /usr/src/mymaven maven:3.2-jdk-7 mvn clean install
I've taken the above example from the maven docker image documentation.
The -v flag attach a local directory to docker image which act as a mount point inside the docker image.
The -w flag indicates to maven where outputs the compiled jar project.
Upvotes: 1