Because I want to use ActiveAndroid and ActiveAndroid-Validation I need to use Maven (which I never heard of until yesterday). So I installed maven and then tried to install ActiveAndroid.
I wrote a custom serializer in ActiveAndroid using JodaTime and included a JodaTime jar in the ActiveAndroid libs folder. When I build the project using ant it works perfectly well. Using Maven I first downloaded and installed JodaTime in Maven using mvn clean install from within the JodaTime source folder. Seeing the following lines this was successful:
[INFO] --- maven-install-plugin:2.4:install (default-install) # joda-time ---
[INFO] Installing /Users/kramer65/Downloads/joda-time-2.3/target/joda-time-2.3.jar to /Users/kramer65/.m2/repository/joda-time/joda-time/2.3/joda-time-2.3.jar
[INFO] Installing /Users/kramer65/Downloads/joda-time-2.3/pom.xml to /Users/kramer65/.m2/repository/joda-time/joda-time/2.3/joda-time-2.3.pom
[INFO] Installing /Users/kramer65/Downloads/joda-time-2.3/target/joda-time-2.3-javadoc.jar to /Users/kramer65/.m2/repository/joda-time/joda-time/2.3/joda-time-2.3-javadoc.jar
[INFO] Installing /Users/kramer65/Downloads/joda-time-2.3/target/joda-time-2.3-sources.jar to /Users/kramer65/.m2/repository/joda-time/joda-time/2.3/joda-time-2.3-sources.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 47.603s
[INFO] Finished at: Thu Sep 26 13:00:54 CEST 2013
[INFO] Final Memory: 12M/81M
[INFO] ------------------------------------------------------------------------
I then tried to install ActiveAndroid using the same mvn clean install from within the ActiveAndroid source folder. This however, resulted in the following errors:
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.095s
[INFO] Finished at: Thu Sep 26 13:01:08 CEST 2013
[INFO] Final Memory: 13M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project activeandroid: Compilation failure: Compilation failure:
[ERROR] /Users/kramer65/dev/repos/ActiveAndroid/src/com/activeandroid/serializer/JodaDateTimeSerializer.java:[3,21] package org.joda.time does not exist
[ERROR] /Users/kramer65/dev/repos/ActiveAndroid/src/com/activeandroid/serializer/JodaDateTimeSerializer.java:[22,16] cannot find symbol
[ERROR] symbol : class DateTime
[ERROR] location: class com.activeandroid.serializer.JodaDateTimeSerializer
[ERROR] /Users/kramer65/dev/repos/ActiveAndroid/src/com/activeandroid/serializer/JodaDateTimeSerializer.java:[7,24] cannot find symbol
[ERROR] symbol : class DateTime
[ERROR] location: class com.activeandroid.serializer.JodaDateTimeSerializer
[ERROR] /Users/kramer65/dev/repos/ActiveAndroid/src/com/activeandroid/serializer/JodaDateTimeSerializer.java:[19,26] cannot find symbol
[ERROR] symbol : class DateTime
[ERROR] location: class com.activeandroid.serializer.JodaDateTimeSerializer
[ERROR] /Users/kramer65/dev/repos/ActiveAndroid/src/com/activeandroid/serializer/JodaDateTimeSerializer.java:[27,28] cannot find symbol
[ERROR] symbol : class DateTime
[ERROR] location: class com.activeandroid.serializer.JodaDateTimeSerializer
[ERROR] -> [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 :activeandroid
Does anybody know how I can solve this? All tips are welcome!
==EDIT==
The pom.xml of ActiveAndroid can be found here. I did not change anything in it.
If your IDE does not complain, it means your IDE could build the project.
Then I assume your IDE does not rely on maven to build. I would recommand a stronger integration between maven and your IE.
You are not supposed to manually add the libs to your classpath (in IDE)
Your POM miss the dependency
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.3</version>
</dependency>
As you have the android-maven-plugin in your build, you need to supply path to the SDK. For this maven plugin, this is done by adding it as property (android.sdk.path) in the properties section of the POM.
So you'll have something like this:
<properties>
<android.sdk.path>your/path/here</android.sdk.path>
</properties>
For quick solution, you can just add this to the POM's properties section. However, local settings like this usually go to settings.xml file in the conf dir inside your maven installation. This will make this property always present no matter what pom you use. Or, if you skip the activeProfiles part, you'll have to invoke maven with that profile enabled - "mvn -pandroidProfile clean install".
<profiles>
<profile>
<id>androidProfile</id>
<properties>
<android.sdk.path>your/path/here</android.sdk.path>
</properties>
</profile>
</profiles>
<activeProfiles>
<activeProfile>androidProfile</activeProfile>
</activeProfiles>
Related
I am very new to maven was about to start learning spring with maven but when I created my first project with maven in eclipse this error occurred and I think maven plugins are not getting downloaded. I have tried several solutions from stackoverflow but nothing worked.
Console Window is like :-
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.097 s
[INFO] Finished at: 2020-06-01T21:17:39-07:00
[INFO] ------------------------------------------------------------------------
[ERROR] No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [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/NoGoalSpecifiedException
Error window is like this:-
Please see this screenshot for exact information of errors.
Screenshot attached
POM.xml file
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.anuragr07</groupId>
<artifactId>springpractice</artifactId>
<version>0.0.1-SNAPSHOT</version>
</project>
Solutions tried so far:-
Installing maven using help > install a new software option
Tried mvn install using cmd
Tried uncommenting proxy tag in setting.xml file
Tried 'https' instead of 'http' in proxy tag in settings.xml file
Tried reinstalling eclipse
and maybe more..
After mvn package
E:\Workspace\springpractice>mvn package
[INFO] Scanning for projects...
[INFO]
[INFO] --------------------< com.anuragr07:springpractice >--------------------
[INFO] Building springpractice 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-resources-plugin/2.6/maven-resources-plugin-2.6.pom
**Downloaded all the plugins**
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 20.831 s
[INFO] Finished at: 2020-06-01T23:52:35-07:00
[INFO] ------------------------------------------------------------------------
I am really frustrated and searching for solutions from past 24 hours. Please help me resolve this.
Thanks!
The given ERORR is the cause of the default goal.
ERROR No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format : or :[:]:.
Resolution:
Specify any goal in your run configuration for maven build like clear, compile, install, package.
install
...
Could you please refer to the given steps?
Right click on your project.
Click 'Run as' and select 'Maven Build'
Edit Configuration window will open.
write any goal but your problem specific write 'package'
in Goal text box.
Click on 'Run'
There was an issue with the settings.xml file and the solution is:-
Close the eclipse first - try to work in CMD and configure maven there. Remove setting.xml in your user directory if the file exists there.
Download Maven from official site.
Add the path to %MVN_HOME%\bin to the Path env. variable in windows.
open CMD and cd to the folder where you have a pom.xml.
Type: mvn package. 6. Post the output.
Thanks to #MarkBramnik
you have to designate maven goal.
in pom.xml, insert that
<build>
<defaultGoal>install</defaultGoal>
</build>
I guess there is no defaultGoal in your pom.xml.
I want to make use of Apache-POI in my code, but am getting an error message The import org.apache.poi cannot be resolved at the import statement
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
I am a beginner with a freshly set up Visual Studio Code v1.30.2, Maven 3.6.0, Java JRE 1.8.0_201.
I have activated the following extensions:
Debugger for Java, 0.16.0
Java dependency viewer, 0.3.0
Java extension pack, 0.5.0
Java test runner, 0.14.0
Language support for Java (TM), 0.37.0
Maven for Java, 0.14.0
I entered these statements in the pom.xml in the dependency section:
<!-- https://mvnrepository.com/artifact/org.apache.poi/poi-->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>4.0.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>4.0.1</version>
</dependency>
I've also tried with other POI versions, e.g. 3.10-FINAL.
I'm too new to Java, Maven and VSCode to be sure I've included all the necessary information to point to a solution. Please help me :)
I've run mvn compile, with this result:
C:\Users\MYUSERNAME\Documents\Java\project2>mvn compile
[INFO] Scanning for projects...
[INFO]
[INFO] ---------------------< MYNAME.project2:project2 >---------------------
[INFO] Building project2 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # project2 ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Users\MYUSERNAME\Documents\Java\project2\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # project2 ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to C:\Users\MYUSERNAME\Documents\Java\project2\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /C:/Users/MYUSERNAME/Documents/Java/project2/src/main/java/MYNAME/project2/App.java:[12,1] package org.apache.poi.ss.usermodel does not exist
[ERROR] /C:/Users/MYUSERNAME/Documents/Java/project2/src/main/java/MYNAME/project2/App.java:[13,37] package org.apache.poi.xssf.usermodel does not exist
[ERROR] /C:/Users/MYUSERNAME/Documents/Java/project2/src/main/java/MYNAME/project2/App.java:[14,37] package org.apache.poi.xssf.usermodel does not exist
[ERROR] /C:/Users/MYUSERNAME/Documents/Java/project2/src/main/java/MYNAME/project2/App.java:[46,9] cannot find symbol
symbol: class XSSFWorkbook
location: class MYNAME.project2.App
[ERROR] /C:/Users/MYUSERNAME/Documents/Java/project2/src/main/java/MYNAME/project2/App.java:[46,45] cannot find symbol
symbol: class XSSFWorkbook
location: class MYNAME.project2.App
[ERROR] /C:/Users/MYUSERNAME/Documents/Java/project2/src/main/java/MYNAME/project2/App.java:[48,9] cannot find symbol
symbol: class XSSFSheet
location: class MYNAME.project2.App
[ERROR] /C:/Users/MYUSERNAME/Documents/Java/project2/src/main/java/MYNAME/project2/App.java:[55,13] cannot find symbol
symbol: method setCellValue(java.lang.String)
location: variable cell of type com.google.common.collect.Table.Cell
[INFO] 7 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.549 s
[INFO] Finished at: 2019-01-30T09:41:45+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project project2: Compilation failure: Compilation failure:
[ERROR] /C:/Users/MYUSERNAME/Documents/Java/project2/src/main/java/MYNAME/project2/App.java:[12,1] package org.apache.poi.ss.usermodel does not exist
[ERROR] /C:/Users/MYUSERNAME/Documents/Java/project2/src/main/java/MYNAME/project2/App.java:[13,37] package org.apache.poi.xssf.usermodel does not exist
[ERROR] /C:/Users/MYUSERNAME/Documents/Java/project2/src/main/java/MYNAME/project2/App.java:[14,37] package org.apache.poi.xssf.usermodel does not exist
[ERROR] /C:/Users/MYUSERNAME/Documents/Java/project2/src/main/java/MYNAME/project2/App.java:[46,9] cannot find symbol
[ERROR] symbol: class XSSFWorkbook
[ERROR] location: class MYNAME.project2.App
[ERROR] /C:/Users/MYUSERNAME/Documents/Java/project2/src/main/java/MYNAME/project2/App.java:[46,45] cannot find symbol
[ERROR] symbol: class XSSFWorkbook
[ERROR] location: class MYNAME.project2.App
[ERROR] /C:/Users/MYUSERNAME/Documents/Java/project2/src/main/java/MYNAME/project2/App.java:[48,9] cannot find symbol
[ERROR] symbol: class XSSFSheet
[ERROR] location: class MYNAME.project2.App
[ERROR] /C:/Users/MYUSERNAME/Documents/Java/project2/src/main/java/MYNAME/project2/App.java:[55,13] cannot find symbol
[ERROR] symbol: method setCellValue(java.lang.String)
[ERROR] location: variable cell of type com.google.common.collect.Table.Cell
[ERROR] -> [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/
I've also pasted the full output of mvn -X compile here
I've pasted my full POM.XML here
In my local folder C:\Users\MYUSERNAME.m2\repository\org\apache there is no subfolder poi.
Thanks all contributors, and especially to #ayZagen (who pointed me towards the pom.xml).
It turns out that I had inserted the dependencies for poi into the dependencies section of
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
rather than into the correct section <project> <dependencies>.
When I moved my dependencies to the correct section, maven downloads POI and that part of the code compiles.
Sorry for taking people's time over a trivial error. Thank you for helping me to find out, and asking the right questions! This was a very positive experience!
As per the error log there are 2 possibilities
Network issue.
Maven is not able to download the jar files from its repository, so there is no POI library at .m2 folder
Solution: Check the network/ Internet.
Files corrupted. This happens if file(s) got corrupted.
Solution: delete the folder org.apache.poi inside .m2 folder. the Right click on project(from Eclipse) --> Maven --> Update project. Then clean & refresh project, then Run command Maven clean install
EDIT
Try moving poi dependencies to the root dependencies tag.
Run mvn compile
The first time you execute this (or any other) command, Maven will
need to download all the plugins and related dependencies it needs to
fulfill the command. From a clean installation of Maven, this can take
quite a while (in the output above, it took almost 4 minutes). If you
execute the command again, Maven will now have what it needs, so it
won't need to download anything new and will be able to execute the
command much more quickly.
Maven: Getting Started
I want to make a release with the maven release plugin in two steps:
1. mvn clean release:prepare
2. mvn release:perform
It worked fine the last two releases, but after changing my IDE from intellij to eclipse I am not able to perform a release this way with apache-maven 3.5.3 and eGit 4.9.2.
The general structure of my project is:
parent-dir
-> pom.xml
-> child1-dir
-> pom.xml
-> child2-dir
-> pom.xml
child1 and child2 contain code and packaging to jar, the parent has packaging goal pom.
Configuration of maven-release-plugin in parent pom.xml:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.1</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-invoker</artifactId>
<version>2.2</version>
</dependency>
</dependencies>
</plugin>
The plugin updates all poms with correct version #, committs changes and pushes to the remote repository for both child modules. But for the parent module I get the following error at the end of the log:
[INFO] Reactor Summary:
[INFO]
[INFO] test Parent 0.12-SNAPSHOT ........................ FAILURE [02:46 min]
[INFO] test Child1 ...................................... SUCCESS [ 0.011 s]
[INFO] test Child2 0.12-SNAPSHOT ........................ SUCCESS [ 0.205 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:48 min
[INFO] Finished at: 2018-09-08T12:56:06+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5.1:prepare (default-cli) on project test-parent: Unable to commit files
[ERROR] Provider message:
[ERROR] The git-push command failed.
[ERROR] Command output:
[ERROR] git#github.com: Permission denied (publickey).
[ERROR] fatal: Could not read from remote repository.
[ERROR]
[ERROR] Please make sure you have the correct access rights
[ERROR] and the repository exists.
[ERROR] -> [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
I do not understand why I get this error message after succesfull commiting and pushing the children modules?
You need to add your public key in Github.
For help please refer https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/
i have a x-module with those properties:
module-name: x-datamodel
this is a part of the pom.xml
<groupId>com.x.datamodel</groupId>
<artifactId>x</artifactId>
<version>1.0</version>
<packaging>jar</packaging>
i have install the project in a local repository with this command line:
mvn install:install-file -Dfile=/Users/me/Documents/Projects/x-datamodel/target/classes/x-datamodel.jar -DgroupId=com.x.datamodel -DgeneratePom=true -DlocalRepositoryPath=/Users/me/Documents/Projects/me-repository -DcreateChecksum=true -DartifactId=x -Dversion={1.0} -Dpackaging=jar
and added the project in bitbucket.
I try to integrate the module x in another project y.
here a part of the y's pom.xml
<dependency>
<groupId>com.x.datamodel</groupId>
<artifactId>x</artifactId>
<version>${x.version}</version>
</dependency>
<repositories>
<repository>
<id>me-repository</id>
<url>https://bitbucket.org/me/me-repository/src/master</url>
</repository>
</repositories>
i can import some classes of the module x in the project y, but when i build the y project i get this error:
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] error reading /Users/me/.m2/repository/com/x/datamodel/x/1.0/x-1.0.jar; error in opening zip file
[ERROR] error reading /Users/me/.m2/repository/com/x/datamodel/x/1.0/x-1.0.jar; error in opening zip file
[ERROR] /Users/me/Documents/Projects/y/src/main/java/com/y/server/serviceImpl/UserServiceImpl.java:[3,32] package com.x.datamodel.model does not exist
[ERROR] /Users/me/Documents/Projects/y/src/main/java/com/y/server/serviceImpl/UserServiceImpl.java:[18,12] cannot find symbol
symbol: class User
location: class com.y.server.serviceImpl.UserServiceImpl
[ERROR] /Users/me/Documents/Projects/y/src/main/java/com/y/server/security/CustomUserDetailsService.java:[3,32] package com.x.datamodel.model does not exist
[INFO] 16 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:56 min
[INFO] Finished at: 2016-12-28T15:51:05+01:00
[INFO] Final Memory: 29M/209M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project y: Compilation failure: Compilation failure:
[ERROR] error reading /Users/me/.m2/repository/com/x/datamodel/x/1.0/x-1.0.jar; error in opening zip file
[ERROR] error reading /Users/me/.m2/repository/com/x/datamodel/x/1.0/x-1.0.jar; error in opening zip file
[ERROR] /Users/me/Documents/Projects/y/src/main/java/com/y/server/serviceImpl/UserServiceImpl.java:[3,32] package com.x.datamodel.model does not exist
[ERROR] -> [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
after installing the repository i have the library into this path:
.m2/repository/com/x/datamodel/x/1.0/x-1.0.jar
why not:
.m2/repository/com/x-datamodel/x/1.0/x-1.0.jar
I tend to think the file is corrupted. Try deleting it and downloading it again.
Try removing the below lines
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
With :
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
</plugin>
I'm trying to do a release of my OSS library, but I keep running in to a strange issue with the maven-release-plugin. This used to work fine. I've probably updated either Maven or Git but I can't seem to find the right combination to get things working again for the release.
Has anyone run into this issue, and does anyone know of a solution? I'm using the Maven Shade Plugin (which is what is creating the dependency-reduced-pom.xml files in the build.)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 09:27 min
[INFO] Finished at: 2015-11-04T08:23:07-05:00
[INFO] Final Memory: 111M/1039M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5.1:prepare (default-cli) on project rewrite-parent: Unable to commit files
[ERROR] Provider message:
[ERROR] The git-add command failed.
[ERROR] Command output:
[ERROR] fatal: pathspec 'config-prettyfaces/dependency-reduced-pom.xml' did not match any files
[ERROR] -> [Help 1]
The dependency-reduced-pom.xml, as I understand it, is a temporary file used while merging dependencies into an uber-jar, and should not be committed, so I'm confused why maven is trying to add this file at all.
Thanks for any help.
I figured it out, at least a workaround:
Using 'checkModificationExcludes" configuration option of the maven-release-plugin to exclude the dependency-reduced-pom.xml seems to work around the issue, though I'm not sure this is exactly what the property was intended for (the documentation is unclear):
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
<configuration>
<checkModificationExcludes>
<checkModificationExclude>dependency-reduced-pom.xml</checkModificationExclude>
</checkModificationExcludes>
</configuration>
</plugin>