# \#java

**URL:** https://forum.gitlab.com/tag/java/40.md

[Latest](https://forum.gitlab.com/latest.md) · [Categories](https://forum.gitlab.com/categories.md) · [Tags](https://forum.gitlab.com/tags.md)

---

## [Anyone here run automated testing with tomcat in a gitlab runner?](https://forum.gitlab.com/t/anyone-here-run-automated-testing-with-tomcat-in-a-gitlab-runner/125161)

<div class="topic-metadata">

**Author:** [@stefan.midjich](https://forum.gitlab.com/u/stefan.midjich)\
**Replies:** 0\
**Last updated:** [April 29, 2025, 12:59pm UTC](https://forum.gitlab.com/t/anyone-here-run-automated-testing-with-tomcat-in-a-gitlab-runner/125161 "2025-04-29T12:59:52Z")

</div>

Problem to solve I am wondering how to run tomcat apps in the background while I run testing suites against them using Chromedriver. Steps to reproduce Configuration I have not run this in a pipeline yet, still local te…

---

## [Upgrading Java in the same VM runing Gitlab Ominubs Debian package install](https://forum.gitlab.com/t/upgrading-java-in-the-same-vm-runing-gitlab-ominubs-debian-package-install/115159)

<div class="topic-metadata">

**Author:** [@jperez\_activus](https://forum.gitlab.com/u/jperez_activus)\
**Replies:** 3\
**Last updated:** [October 11, 2024, 9:55am UTC](https://forum.gitlab.com/t/upgrading-java-in-the-same-vm-runing-gitlab-ominubs-debian-package-install/115159 "2024-10-11T09:55:04Z")

</div>

Now our Gitlab omnibus install it is not the only app running on that VM, the main task will be to update Java which at the moment is as per below, Need to be upgraded to version 17 $java -version openjdk version “1.8.…

---

## [Unable to install GitLab Maven Package Registry using Gradle](https://forum.gitlab.com/t/unable-to-install-gitlab-maven-package-registry-using-gradle/92018)

<div class="topic-metadata">

**Author:** [@afaqrehman98](https://forum.gitlab.com/u/afaqrehman98)\
**Replies:** 0\
**Last updated:** [September 3, 2023, 6:07pm UTC](https://forum.gitlab.com/t/unable-to-install-gitlab-maven-package-registry-using-gradle/92018 "2023-09-03T18:07:40Z")

</div>

Hi everyone, I have created a GitLab Maven Package Registry. In the build.gradle of the library module for which I have created the Maven Package Registry, I have added the publishing content like this: publishing { …

---

## [Does Dependency Scan work with Java source code using Ant as build tool](https://forum.gitlab.com/t/does-dependency-scan-work-with-java-source-code-using-ant-as-build-tool/77994)

<div class="topic-metadata">

**Author:** [@sthamma93](https://forum.gitlab.com/u/sthamma93)\
**Replies:** 0\
**Last updated:** [November 22, 2022, 8:33am UTC](https://forum.gitlab.com/t/does-dependency-scan-work-with-java-source-code-using-ant-as-build-tool/77994 "2022-11-22T08:33:09Z")

</div>

Hi Team, Does Dependency Scan work with Java source code using Ant as build tool? If yes can you please provide us the steps what all we have to perform in CI/CD from our end

---

## [Gitlab SAST.gitlab-ci.yml on java project fails](https://forum.gitlab.com/t/gitlab-sast-gitlab-ci-yml-on-java-project-fails/31540)

<div class="topic-metadata">

**Author:** [@andras.nemeth](https://forum.gitlab.com/u/andras.nemeth)\
**Replies:** 2\
**Last updated:** [October 11, 2022, 4:36pm UTC](https://forum.gitlab.com/t/gitlab-sast-gitlab-ci-yml-on-java-project-fails/31540 "2022-10-11T16:36:40Z")

</div>

We run the SAST scanner on our ci pipeline and get the below error. (CI\_DEBUG\_TRACE enabled) Is there a way to see why the job failed or a known solution? Gitlab EE 12.3.3, Java 11, Maven CI pipeline excerpt include:…

---

## [When using the official GraalVM Native Image, I am getting "Error: Unrecognized option: -c" for every shell script](https://forum.gitlab.com/t/when-using-the-official-graalvm-native-image-i-am-getting-error-unrecognized-option-c-for-every-shell-script/63630)

<div class="topic-metadata">

**Author:** [@johnson.henrity](https://forum.gitlab.com/u/johnson.henrity)\
**Replies:** 2\
**Last updated:** [January 4, 2022, 8:49am UTC](https://forum.gitlab.com/t/when-using-the-official-graalvm-native-image-i-am-getting-error-unrecognized-option-c-for-every-shell-script/63630 "2022-01-04T08:49:33Z")

</div>

I want to build a GraalVM Java Native Image. I am using the official GraalVM Native Image as my GitLab CI/CD job image. I am using GitLab CI/CD on GitLab.com When I run any shell command (even echo "test") inside the gh…

---

## [Git lab pipeline fails on mvn clean install](https://forum.gitlab.com/t/git-lab-pipeline-fails-on-mvn-clean-install/58302)

<div class="topic-metadata">

**Author:** [@sachith](https://forum.gitlab.com/u/sachith)\
**Replies:** 0\
**Last updated:** [September 9, 2021, 6:14am UTC](https://forum.gitlab.com/t/git-lab-pipeline-fails-on-mvn-clean-install/58302 "2021-09-09T06:14:46Z")

</div>

When my gitlab pipline runs it gets fails on code build stage with below error. \[ERROR\] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean (default-clean) on project sample-app: Execution defau…

---

## [Windows runner blocks after successful java build](https://forum.gitlab.com/t/windows-runner-blocks-after-successful-java-build/40833)

<div class="topic-metadata">

**Author:** [@olze](https://forum.gitlab.com/u/olze)\
**Replies:** 3\
**Last updated:** [August 19, 2021, 2:59pm UTC](https://forum.gitlab.com/t/windows-runner-blocks-after-successful-java-build/40833 "2021-08-19T14:59:56Z")

</div>

I have a pipeline which should produce windows and linux artefacts. I have a java project which relies on platform dependent libraries (javafx) and currently, there is no other way than to build it once on linux and once…

---

## [Maven templates misses important parameter](https://forum.gitlab.com/t/maven-templates-misses-important-parameter/49957)

<div class="topic-metadata">

**Author:** [@dominik42](https://forum.gitlab.com/u/dominik42)\
**Replies:** 1\
**Last updated:** [March 6, 2021, 7:18pm UTC](https://forum.gitlab.com/t/maven-templates-misses-important-parameter/49957 "2021-03-06T19:18:19Z")

</div>

The default CI/CD template for Maven mentioned the parameter for including timestamp for maven builds -Dorg.slf4j.simpleLogger.showDateTime=true But it is important to note, that also the parameter for the date/time fo…

---

## [Gitlab ci, issue on retrieve 2 dependencies from spring project](https://forum.gitlab.com/t/gitlab-ci-issue-on-retrieve-2-dependencies-from-spring-project/49572)

<div class="topic-metadata">

**Author:** [@davideZanin](https://forum.gitlab.com/u/davideZanin)\
**Replies:** 0\
**Last updated:** [February 26, 2021, 1:21pm UTC](https://forum.gitlab.com/t/gitlab-ci-issue-on-retrieve-2-dependencies-from-spring-project/49572 "2021-02-26T13:21:13Z")

</div>

I have one java-spring application with 2 dependency(maven) in different repositories but in the same group. I used the gitlab-ci to deploy the jar in 2 package registries, but I cannot retrieve them (I can with only one…

---

## [Spring boot deployment on Heroku help](https://forum.gitlab.com/t/spring-boot-deployment-on-heroku-help/22748)

<div class="topic-metadata">

**Author:** [@kw.2019.ltd](https://forum.gitlab.com/u/kw.2019.ltd)\
**Replies:** 2\
**Last updated:** [July 15, 2020, 6:28pm UTC](https://forum.gitlab.com/t/spring-boot-deployment-on-heroku-help/22748 "2020-07-15T18:28:05Z")

</div>

hi as part of my ci/cd i want to deploy artifact after build stage which its only 1 jar to Heroku, using on deploy stage dpl --provider=heroku --app=xxxx --api-key=$HEROKU\_API\_KEY what happened is that instead of dep…

---

## [GitlabApi error](https://forum.gitlab.com/t/gitlabapi-error/39724)

<div class="topic-metadata">

**Author:** [@kashirin.kostiantyn](https://forum.gitlab.com/u/kashirin.kostiantyn)\
**Replies:** 1\
**Last updated:** [July 9, 2020, 7:11pm UTC](https://forum.gitlab.com/t/gitlabapi-error/39724 "2020-07-09T19:11:58Z")

</div>

Hi I\`m wanna connect to my repository, using gitlab4j-api public class TestResrt { public static void main(String\[\] args) throws IOException, GitLabApiException { GitLabApi gitLabApi = new GitLabApi("https…

---

## [Getting Error while running Selenium + Java + Maven tests in Gitlab CI/CD pipeline](https://forum.gitlab.com/t/getting-error-while-running-selenium-java-maven-tests-in-gitlab-ci-cd-pipeline/28621)

<div class="topic-metadata">

**Author:** [@atul.ranjan](https://forum.gitlab.com/u/atul.ranjan)\
**Replies:** 6\
**Last updated:** [June 3, 2020, 11:55pm UTC](https://forum.gitlab.com/t/getting-error-while-running-selenium-java-maven-tests-in-gitlab-ci-cd-pipeline/28621 "2020-06-03T23:55:50Z")

</div>

I have created a new project in GITLAB and pushed the code(Selenium using Java and Maven) to the repository. Then I created a yml file to run the maven tests. Then code runs and I am getting below error - java.lang.Ill…

---

## [Getting error for chrome driver](https://forum.gitlab.com/t/getting-error-for-chrome-driver/38003)

<div class="topic-metadata">

**Author:** [@rahul.QA](https://forum.gitlab.com/u/rahul.QA)\
**Replies:** 0\
**Last updated:** [May 24, 2020, 12:23pm UTC](https://forum.gitlab.com/t/getting-error-for-chrome-driver/38003 "2020-05-24T12:23:03Z")

</div>

I am getting the error about google chrome while running project on Gitlab CI. I am using webdrivermanger to manage a chrome driver into my project. Below is my chrome code which runs file in local but not on CI : C…

---

## [JavaFX jar-file package](https://forum.gitlab.com/t/javafx-jar-file-package/37772)

<div class="topic-metadata">

**Author:** [@woldermind](https://forum.gitlab.com/u/woldermind)\
**Replies:** 2\
**Last updated:** [May 21, 2020, 3:09pm UTC](https://forum.gitlab.com/t/javafx-jar-file-package/37772 "2020-05-21T15:09:54Z")

</div>

Hello! I’m new to GitLab, and I asked myself this question: how and where can I pack my compiled application in the GitLab system? Specifically: I have JavaFX + Maven, I want the application to be assembled in GitLab CI…

---

## [Building each module separately in Maven project](https://forum.gitlab.com/t/building-each-module-separately-in-maven-project/35228)

<div class="topic-metadata">

**Author:** [@harrismirza](https://forum.gitlab.com/u/harrismirza)\
**Replies:** 0\
**Last updated:** [March 12, 2020, 12:29pm UTC](https://forum.gitlab.com/t/building-each-module-separately-in-maven-project/35228 "2020-03-12T12:29:43Z")

</div>

HI, I am currently working on a Java project that requires using multiple modules that are defined in a POM, but it is using a custom build plugin that currently doesn’t support building multiple modules at the same tim…

---

## [Restrict user to commit non standards code](https://forum.gitlab.com/t/restrict-user-to-commit-non-standards-code/28811)

<div class="topic-metadata">

**Author:** [@aravind.samala](https://forum.gitlab.com/u/aravind.samala)\
**Replies:** 0\
**Last updated:** [August 7, 2019, 2:29pm UTC](https://forum.gitlab.com/t/restrict-user-to-commit-non-standards-code/28811 "2019-08-07T14:29:39Z")

</div>

Hello, We would like to know is there any plugin/service to restrict the user to commit their changes without maintaining some basic standards like static variables must be declared with capital letters (public static s…

---

## [An image does not exist locally with the tag](https://forum.gitlab.com/t/an-image-does-not-exist-locally-with-the-tag/25874)

<div class="topic-metadata">

**Author:** [@eristott](https://forum.gitlab.com/u/eristott)\
**Replies:** 0\
**Last updated:** [April 25, 2019, 3:23pm UTC](https://forum.gitlab.com/t/an-image-does-not-exist-locally-with-the-tag/25874 "2019-04-25T15:23:51Z")

</div>

Firstly let me state I am VERY new to using Gitlab and Docker. I am running a POC or Sandbox for my company and trying to run a simple “Hello World” Java application (Spring Boot) using a gitlab-runner and DinD. When i…
