I am trying to release my project using maven release:prepare command. My code resides in gitlab and I have provided my project url in the pom.xml but while trying to update in Git it fails. Could someone help me with in understanding what I could be doing wrong.
Build plugin is:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
<configuration>
<tagNameFormat>r#{project.version}</tagNameFormat>
<autoVersionSubmodules>true</autoVersionSubmodules>
</configuration>
</plugin>
SCM tags are mentioned as below:
<scm>
<developerConnection>scm:git:https://gitlab-mac-p7.systems.private/test/testservice.git</developerConnection>
<tag>testservice-0.100.0-delete</tag>
</scm>
Below is the error stack trace:
maven release:prepare The git-commit command failed Repository has been updated, but unable to write
[INFO] Executing: cmd.exe /X /C "git commit --verbose -F C:\Users\P7846763\AppData\Local\Temp\2\maven-scm-392995137.commit pom.xml"
[INFO] Working directory: C:\DEP\Code\eecc\testservice-feature-FMW-5241-releaseTest
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 03:03 min
[INFO] Finished at: 2021-08-19T15:08:55+05:30
[INFO] Final Memory: 13M/245M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5.3:prepare (default-cli) on project testservice: Unable to commit files
[ERROR] Provider message:
[ERROR] The git-commit command failed.
[ERROR] Command output:
[ERROR] fatal: Repository has been updated, but unable to write
[ERROR] new_index file. Check that disk is not full and quota is
[ERROR] not exceeded, and then "git reset HEAD" to recover.
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5.3:prepare (default-cli) on project testservice: Unable to commit files
Provider message:
The git-commit command failed.
Command output:
fatal: Repository has been updated, but unable to write
new_index file. Check that disk is not full and quota is
not exceeded, and then "git reset HEAD" to recover.
Related
Any help appreciated.
I'm new to Maven. I got the below command from tutorials point
mvn archetype:generate -DgroupId=com.tutorialpoint.app -DartifactId=camel-first-app -DarchetypeGroupId=org.apache.camel.archetypes -DarchetypeArtifactId=camel-archetype-spring -DinteractiveMode=false
it is failing with below error:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-archetype-plugin:3.0.1:generate (default-cli) # standalone-pom >>>
[INFO]
[INFO] <<< maven-archetype-plugin:3.0.1:generate (default-cli) # standalone-pom <<<
[INFO]
[INFO] --- maven-archetype-plugin:3.0.1:generate (default-cli) # standalone-pom ---
Downloading:
http://repo.maven.apache.org/maven2/org/codehaus/groovy/groovy/1.8.3/groovy-1.8.3.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.981s
[INFO] Finished at: Tue Nov 14 23:11:42 IST 2017
[INFO] Final Memory: 10M/184M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.0.1:generate (default-cli) on project standalone-pom: Execution default-cli of goal org.apache.maven.plugins:maven-archetype-plugin:3.0.1:generate failed: Plugin org.apache.maven.plugins:maven-archetype-plugin:3.0.1 or one of its dependencies could not be resolved: Could not transfer artifact org.codehaus.groovy:groovy:jar:1.8.3 from/to central (http://repo.maven.apache.org/maven2): GET request of: org/codehaus/groovy/groovy/1.8.3/groovy-1.8.3.jar from central failed: Connection reset -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
Can someone please help.
The relevant error is pointing to a connection problem:
Could not transfer artifact org.codehaus.groovy:groovy:jar:1.8.3
from/to central (http://repo.maven.apache.org/maven2): GET request
of: org/codehaus/groovy/groovy/1.8.3/groovy-1.8.3.jar from central
failed: Connection reset
The command which you posted actually runs fine on my machine. If you execute this maven command and you do not have the Groovy libraries yet, you will see that it actually downloads the following files:
https://repo.maven.apache.org/maven2/org/codehaus/groovy/groovy/1.8.3/groovy-1.8.3.pom
https://repo.maven.apache.org/maven2/org/codehaus/groovy/groovy/1.8.3/groovy-1.8.3.jar
It might be that you have only access to the internet via a proxy. In this case you will need to setup a proxy in the Maven configuration.
This blog here contains a fairly good description on how to setup a proxy for Maven, so that Maven can access the repository libraries.
Another option to tackle your problem would be to manually download this file using your browser:
https://repo.maven.apache.org/maven2/org/codehaus/groovy/groovy/1.8.3/groovy-1.8.3.jar
And then install it in your repository manually using:
mvn install:install-file -Dfile=<path-to-file> -DgroupId=org.codehaus.groovy \
-DartifactId=groovy -Dversion=1.8.3 -Dpackaging=jar
But normally you should not have to do this manual download + installation. Maven should be doing this for you.
I want to install Apache Zeppelin on OSX 10.8, but build fails for some mysterious reasons. Specs: Java 1.7, Maven 3.3, node v0.12.4 and grunt v0.1.13.
I'm running the following command:
mvn clean package -DskipTests
And I am getting the following output :
[INFO] Zeppelin: web Application .......................... FAILURE [ 18.310 s]
[INFO] Zeppelin: Server ................................... SKIPPED
[INFO] Zeppelin: Packaging distribution ................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 07:53 min
[INFO] Finished at: 2016-01-14T18:32:13-05:00
[INFO] Final Memory: 78M/387M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:0.0.23:grunt (grunt build) on project zeppelin-web: Failed to run task: 'grunt --no-color' failed. (error code 3) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :zeppelin-web
It seems to be some errors with grunt, but I'm not sure.
I got Jenkins set up with SSH connection to Git, using SSH agent and trying to set up a job, which would do Maven Release build. The job is executing following commands
-Dresume=false release:prepare release:perform
-Dresume=false -DdryRun=true release:prepare
During deployment with maven-deploy-plugin I run into error,
[INFO] [INFO]
[INFO] [INFO] --- maven-deploy-plugin:2.7:deploy (default-deploy) # uaiContacts ---
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] BUILD FAILURE
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Total time: 4.151 s
[INFO] [INFO] Finished at: 2015-09-23T11:35:32+01:00
[INFO] [INFO] Final Memory: 27M/265M
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project uaiContacts: Failed to deploy artifacts/metadata: Cannot access git#giturl:repo with type default using the available connector factories: BasicRepositoryConnectorFactory: Cannot access git#giturl:repo using the registered transporter factories: WagonTransporterFactory: java.util.NoSuchElementException
[INFO] [ERROR] role: org.apache.maven.wagon.Wagon
[INFO] [ERROR] roleHint: git#giturl
[INFO] [ERROR] -> [Help 1]
[INFO] [ERROR]
[INFO] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[INFO] [ERROR] Re-run Maven using the -X switch to enable full debug logging.
[INFO] [ERROR]
[INFO] [ERROR] For more information about the errors and possible solutions, please read the following articles:
[INFO] [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
I am not sure why is it saying cannot access and how is it trying to access. As I am aware wagon will be using ssh, so there should not be a problem.
My pom.xml
<build>
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ssh</artifactId>
<version>2.4</version>
</extension>
</extensions>
</build>
<scm>
<connection>scm:git:git#giturl:repo</connection>
<developerConnection>scm:git:git#giturl:repo</developerConnection>
<url>git#giturl:repo</url>
<tag>HEAD</tag>
</scm>
<distributionManagement>
<repository>
<id>release</id>
<url>git#giturl:repo</url>
</repository>
</distributionManagement>
You are trying to deploy the released artifact to a GIT repository. Artifacts are deployed to a central repository such as Artifactory or Nexus, usually by means of HTTP (POST) unless you specify something else.
If you want to deploy using SSH, this link will explain how it's done.
I git clone soapui 5.1.2, installed maven 3.3.1 and as instructed https://github.com/SmartBear/soapui try to build soapui with
mvn clean install
In the end I got this error in screenshot
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] SoapUI project ..................................... SUCCESS [01:05 min]
[INFO] SoapUI ............................................. FAILURE [02:16 min]
[INFO] SoapUI Maven plugin ................................ SKIPPED
[INFO] SoapUI installer ................................... SKIPPED
[INFO] SoapUI Maven plugin tester ......................... SKIPPED
[INFO] SoapUI system test ................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 03:21 min
[INFO] Finished at: 2015-03-23T16:44:23+01:00
[INFO] Final Memory: 13M/217M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project soapui: Could not resolve dependencies
for project com.smartbear.soapui:soapui:jar:5.2.0-SNAPSHOT: Could not find arti
fact org.sonatype.install4j:i4jruntime:jar:5.1.14 in smartbear-sweden-repository
(http://www.soapui.org/repository/maven2) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyReso
lutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :soapui
My connectivity is fine. But I can't see org.sonatype.install4j:i4jruntime:jar:5.1.14 in http://www.soapui.org/repository/maven2/
Why ? Does it mean the editor forget to put it so it's a mistake from them not me doing something wrong ? How to fix this ? Contact the editor ?
As per the error, the problem is in the soapui/pom.xml. They are referencing:
<dependency>
<groupId>org.sonatype.install4j</groupId>
<artifactId>i4jruntime</artifactId>
<version>5.1.14</version>
</dependency>
twice, just to be sure I guess. This jar is indeed not available at Maven Central.
Their entire project has only one custom repository specified - their own (also mentioned in the error) - and this jar is not there either. Chances are they have this jar in their local artifactory, and just never bothered updating the dependencies.
Keep in mind that Maven is just a tool, and just like any tool, if you use it wrong it will do the wrong things. You could remove the dependency from their pom and see if the project builds, or search the Internet for this jar and manually place it in your local repository.
I am in the beginning phase of Maven. I created a project and was trying to use the command. what is missing at my end? I am trying to compile and run a TestSuite File:
mvn clean package
POM.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.test.myProject</groupId>
<artifactId>myTest</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>egdsvTest</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
but i get the below exception after using it.
Exception
D:\MVN_Shirish_Project\Test>mvn clean package
[INFO] Scanning for projects...
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethrea
ded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Test 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # Test ---
[INFO] Deleting D:\MVN_Shirish_Project\Test\target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # Test
---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources,
i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory D:\MVN_Shirish_Project\Test\src\
main\resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) # Test ---
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. b
uild is platform dependent!
[INFO] Compiling 1 source file to D:\MVN_Shirish_Project\Test\target\classe
s
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # eg
dsvTest ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources,
i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory D:\MVN_Shirish_Project\Test\src\
test\resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) #
Test ---
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. b
uild is platform dependent!
[INFO] Compiling 1 source file to D:\MVN_Shirish_Project\Test\target\test-c
lasses
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) # Test ---
[INFO] Surefire report directory: D:\MVN_Shirish_Project\Test\target\surefi
re-reports
[WARNING] Missing POM for org.apache.maven.surefire:surefire-junit3:jar:2.12.4
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.968 s
[INFO] Finished at: 2014-10-14T12:28:09+05:30
[INFO] Final Memory: 7M/247M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.
12.4:test (default-test) on project Test: Unable to generate classpath: org
.apache.maven.artifact.resolver.MultipleArtifactsNotFoundException: Missing:
[ERROR] ----------
[ERROR] 1) org.apache.maven.surefire:surefire-junit3:jar:2.12.4
[ERROR]
[ERROR] Try downloading the file manually from the project website.
[ERROR]
[ERROR] Then, install it using the command:
[ERROR] mvn install:install-file -DgroupId=org.apache.maven.surefire -DartifactI
d=surefire-junit3 -Dversion=2.12.4 -Dpackaging=jar -Dfile=/path/to/file
[ERROR]
[ERROR] Alternatively, if you host your own repository you can deploy the file t
here:
[ERROR] mvn deploy:deploy-file -DgroupId=org.apache.maven.surefire -DartifactId=
surefire-junit3 -Dversion=2.12.4 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url
] -DrepositoryId=[id]
[ERROR]
[ERROR] Path to dependency:
[ERROR] 1) dummy:dummy:jar:1.0
[ERROR] 2) org.apache.maven.surefire:surefire-junit3:jar:2.12.4
[ERROR]
[ERROR] ----------
[ERROR] 1 required artifact is missing.
[ERROR]
[ERROR] for artifact:
[ERROR] dummy:dummy:jar:1.0
[ERROR]
[ERROR] from the specified remote repositories:
[ERROR] m1 (http://repo1.maven.org/maven2, releases=true, snapshots=false)
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE
xception
Maven works by creating a local repository in your desktop or the machine you have installed maven and running this goal.
In the process of maven running the goal, it first tries to get all the dependent jar files from Central repository as you have listed in your comments M1 or M2 and then stores them under C:/Users/yourname/.m2/repository folder (assuming you are using a windows machine) or the corresponding user folder in other OS systems.
Then it uses the jars to run the build as required per the goals given.
Now in your case, you got to figure out a way to connect to the repositories (check your settings.xml located in the .m2 folder in your User directory) and check if you can connect to the internet central maven repositories. If not you can get the jar file and manually install them as advised in the error you have got. Once you do that I think you should get past this issue. Let me know if you still have the issues.
In my case, it was caused by me doing an offline build (i.e. mvn -o install) and me not having that jar installed in my local Maven repository yet. Doing an online build (mvn install) fixed it.