Gitlab Ci not always getting latest version of dependency - gitlab-ci

Background: Gitlab 13.4 building/deploying Java Tomcat application using Maven using two runners (on the same machine)
Project A is the web application and buils/deploys a war file. it depends on Project B
Project B is a set of dependencies as a jar file
the .gitlab_yml file for project B kicks off a build/deploy of Project A after the 'deploy' stage is completed.
The problem is that Project A doesn't reliably have the latest version of the project B jar file

i updated the mvn command to include -U to force a retrieve all resources

Related

aws codebuild runtime verison not supporting latest gradle version 7

I am trying to build my java springboot cod using gradle 7 but getting this error while requires Gradle 6.8.x, 6.9.x, or 7.x. The current version is Gradle 5.6. How can i get the latest version of gradle
Hard to tell without much details on the build failure. I had issues myself trying to build in CodeBuild with gradle 7 and I solved by:
Make sure the source code pulled by CodeBuild contains the gradle/wrapper folder and all its contents (including the jar file).
Check in the gradle-wrapper.properties have the distributionUrl to the gradle distribution for your project.
Use ./gradlew build as a command in CodeBuild.

How to have IntelliJ build a jar to a directory and then run a separate jar as a run config?

I am developing plugins for Spigot and I want to be able to build and run them from the same place, with the server's output going into the terminal. How do I make IntelliJ place my jar in a plugins folder and then run the server jar outside of it?
Make an artifact to build the jar to the directory and then make a run config that executes the other jar, and down at the bottom there is a list where you can have IntelliJ build the jar.

Has anyone tried to deploy artifacts to Rational Asset Manager

I am experimenting the use of Rational Asset Manager to store our binaries and/or build artifacts. I am running a mvn deploy command to deploy my build artifacts to RAM. Although it recognizes the connection its throwing me a Http status code: 500 error.
I have also checked RAM logs for more information but i don't see any specific exception. All the examples or documents out on internet says we have to configure RTC build engine to run the builds.
I just want to know if anyone have tried publishing to RAM from command line using Mvn deploy ( without using RTC client ) ? is this do-able?
If you have successfully published artifacts to RAM using maven, can you please elaborate on how you did it?
It seems to be possible, if you follow the steps described in:
"Creating and using Maven assets", and
"Deploying from Maven to assets":
Before you can use Maven assets, a repository administrator must enable the Maven model library. For more information, see Enabling the Maven library.
The mvn client can integrate with Rational Asset Manager, using Rational Asset Manager as a Maven repository.
Before you deploy from Maven to Rational Asset Manager, you must add a repository entry to the pom.xml file on the computer where you plan to run the mvn client. See Creating and using Maven assets for more information.
I was able to deploy the artifact using mvn deploy after changing the following things in RAM
Pointed to a JRE version in RAM ( originally was pointing to JDK
version) and
Changed permissions for my role for saving my artifacts
in RAM ("save Work Item") Reference

Build multiple Maven projects

I'm very new to Maven, and have a question about building multiple Maven projects.
We have two Maven projects, Project A and Project B.
Project A depends on an artefact generated by Project B.
When changes to project A or B are checked into SVN, our local Hudson server builds the modified project (and any dependent projects) and uploads the artefacts into our local Nexus repository.
Now, consider two developers.
Developer 1 hacks away at project A only, and when Developer 1 builds project A locally, Maven goes and gets the latest project B snapshot artefact from our Nexus server.
Developer 2 hacks on both project A and project B simultaneously. When Developer 2 builds project A locally, we want maven to build project B with any local changes and use the resulting artefact to build project A. How do we set up Maven to build using the local version of project B instead of getting the artefact from Nexus? Is this a standard usage pattern for Maven?
How do we set up Maven to build using the local version of project B instead of getting the artefact from Nexus?
You can setup an updatePolicy for the snapshots artifacts per repository. Actually, Maven checks for SNAPSHOT updates only once a day by default. So if you build a version of B locally, you should be able to use it to build A for some time, even if a new SNAPSHOT is deployed to your Nexus. If this doesn't suit your needs, you can change this policy. You could also build offline (using the -o option).
PS: AFAIK, automatic updates will be disabled by default in Maven 3.x, you will have to explicitly ask for updates (with the -U option).

Hudson can't build my Maven 2 project because it says artifacts are missing from the repository? (they aren't)

I'm using Hudson and Maven 2 for my automated build/CI. I can build fine with maven from the command line, but when I run the same goal with Hudson, the build fails complaining of missing artifacts. I'm running Hudson as a windows XP service.
Obvious question, but have you got Hudson set up to point to the same Maven repository as your command line build? You can check this from the Hudson admin gui - look in the Maven section of the Manage Hudson page. This should have a MAVEN_HOME environment variable listed. Look in the settings.xml file under:
MAVEN_HOME\conf\settings.xml
The localRepository configuration item is the location of the Maven repository that the Hudson build is using.
Make sure you're running Hudson as the same user that you are using to run Maven from the command line. Maven creates a separate repository for each user. If you are running Hudson as a Windows service, this won't be the same user as you have logged on as and will be running "mvn" commands with. This means the artifacts in the repositories may be different.
To fix, either start Hudson manually as the user which works, or update the repository for the user which Hudson is running as.