So for my project to build, I need to rely on a jar file which can only be retrieved by building it locally (running a specific build tools app which builds the jar file)
I read a few articles stating I can download this app into my pipeline, which will then execute to build the jar I need and cache it.
Now Im at the point where I just don't know how to do that.
Sidenote: I'm very new to maven and all these building steps.
Locally on my machine I can build my project just fine, as that jar file is installed in my local maven repo. I just need to figure out how to add the steps to my bitbucket-pipelines.yml file
The file that needs to execute is called BuildTools, the site to download it is here:
https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar
From my understanding I need to add this to my bitbucket-pipelines.yml, have it run, and install the output jar into my pipeline maven cache.
IF someone could help me understand the steps/lines I need to add to the yml file to make this magic happen, I would really appreciate it.
Thank you!
Hi @ShaneBeeTK ,
So for my project to build, I need to rely on a jar file which can only be retrieved by building it locally (running a specific build tools app which builds the jar file)
Based on the above I am assuming:
<groupId>here.my.package</groupId>
<artifactId>my-artifact</artifactId>
<version>1.0.0-SNAPSHOT</version>
If the above is correct you could, based on documentation - Java with Bitbucket Pipelines :
https://www.spigotmc.org/wiki/buildtools/#what-is-it suggests you on how to download the JAR file under Running BuildTools section 1.2
Since you will be running builds using the same dependency, you could cache them by following Caching dependencies documentation.
So you would end up with something similar to the following bitbucket-pipelines.yml:
image: maven:3.3.9
pipelines: default: - step: caches: - maven script: -bash configure-maven.sh
- mvn clean package
Where configure-maven.sh would:
Kind regards,
Rafael
Thank you very much for the reply.
Im extremely terrible with shell/bash commands, but I will do my best to interpret this and try make this work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.