Jenkins maven java 7 permission issue

I’m getting this error when attempting a Maven build in Jenkins, Building in workspace /var/lib/jenkins/workspace/xxxxprojectnamedeletedforprivacyxxxx java.nio.file.AccessDeniedException: /usr/share/maven/lib/maven-settings-3.x.jar at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) at sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:244) at sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103) at java.nio.file.Files.delete(Files.java:1079) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at hudson.Util.deleteFile(Util.java:247) at hudson.FilePath.deleteRecursive(FilePath.java:1202) at hudson.FilePath.deleteContentsRecursive(FilePath.java:1211) at hudson.FilePath.deleteRecursive(FilePath.java:1193) at hudson.FilePath.deleteContentsRecursive(FilePath.java:1211) at hudson.FilePath.deleteRecursive(FilePath.java:1193) at hudson.FilePath.access$1000(FilePath.java:191) at hudson.FilePath$14.invoke(FilePath.java:1172) at … Read more

Dependancy error when building maven project

I’m trying to move an application from being built locally on a Windows Eclipse installation to a Jenkins server. From what I can see the settings are correct and the dependencies should resolve. Even the ones it is complaining about are there when I check the ~/.m2/repositories/ folder. I’m not sure what I’m doing wrong … Read more

How to run a java jar that writes records periodically on firestore database, on google cloud?

I have created a java jar executable. The project is a maven project. It is running a task every 5 minutes and using this library (https://github.com/googleapis/java-firestore) it adds some records to a firestore database. It is not a web app and it does not use any 3rd party framework. How can I run this jar … Read more

Azure DevOps: Maven is not installed on agent

I have an Azure Pipeline that is meant to install Java 16 and the run Maven package on my repository. The pipeline looks like this: trigger: – master pool: vmImage: ubuntu-latest steps: – task: JavaToolInstaller@0 inputs: versionSpec: ’16’ jdkDestinationDirectory: ‘$(Agent.ToolsDirectory)/jdk16’ jdkArchitectureOption: ‘x64’ jdkSourceOption: AzureStorage azureResourceManagerEndpoint: ****** azureStorageAccountName: ****** azureContainerName: ****** azureCommonVirtualFile: jdk-16.0.1_linux-aarch64_bin.tar.gz – task: Maven@3 … Read more

“Connection Timed Out” on Guest Machine

When I run “mvn install” on my guest VM box, I get multiple “Connection Timed Out” errors when searching for a file to download. [WARNING] Unable to get resource ‘org.apache.maven.wagon:wagon-file:pom:1.0-alpha-5’ from repository maven-nexus (http://repository.jboss.org/nexus/content/groups/public): Error transferring file: Connection timed out Note – I’ve opened the file path that maven can’t find to Firefox and curl. … Read more

Sonatype Nexus incompletely proxies external repository

I’m currently attempting to set up a proxy repository (as described in the Nexus guide) for the Bukkit repository, in order to build some dependent projects locally. I’m using the URL: http://repo.bukkit.org/content/repositories/bukkit_repos/ It seems to be the right URL, but no matter my configuration, I can’t seem to get Nexus to actually proxy any artifacts … Read more

Keeping application library versions in synch with server

I have a maven based application, and it references certain libraries that are marked as provided by my application server, such as: <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>2.5</verision> <scope>provided</scope> </dependency> Now obviously my application server needs to provide version 2.5 of the servlet api. Are there any strategies for ensuring the correct version of the library is … Read more