I was building project as usual with mvn clean install and following error happened:
(File name too long) -> [Help 1]
Full maven output:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:19 min
[INFO] Finished at: 2017-02-23T13:42:19+01:00
[INFO] Final Memory: 67M/544M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test (default-test) on project union-sme-webapp: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test failed: java.lang.RuntimeException: org.apache.maven.surefire.report.ReporterException: When writing report: /home/gondy/projects/xxxxxxx/xxxxxxxxx/webapp/target/surefire-reports/TEST-xx.xxxxx.xxxx.xxxx.webapp.service.document.generator.statics.arrangements.XxxxxxxxxxXxxxxxxXxxxxxxxxxxxXxxxxxxxXxxxxxxxxXxxx.xml (File name too long) -> [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.
I am working on Ubuntu 16.04 LTS. My colleagues are building the same project without any problem, it works even on Jenkins CI. What is the problem here? The filename is 144 chars long, which should be fine, ext has limit of 255 charactes.
The problem is, I have encrypted home directory and Ubuntu allows filename only 143 chars long:
From one of authors of eCryptfs:
Empirically, we have found that character filenames longer than 143 characters start requiring >255 characters to encrypt. So we (as eCryptfs upstream developers) typically recommend you limit your filenames to ~140 characters.
https://unix.stackexchange.com/a/32834/82647
So options basically are:
Make filename shorter by renaming methods and classes
Move your project outside encrypted directory
Remove encryption of your home directory
you can always disable file reporting via pom.xml file or console parameters
mvn clean install -Dsurefire.useFile=false -DredirectTestOutputToFile=false -DdisableXmlReport=true
Test results will be logged to console
Other way (untested by me) would be aggregating report, mentioned here maven surefire reporting plugin configuration
Related
I have a Windows 10 System where I don't have administrative rights. However, most Maven builds are working on that machine. For some reason I run into a problem with the Iterator Plugin. Even the example from https://github.com/khmarbaise/iterator-maven-plugin/blob/master/src/it/invokerBasicTest/pom.xml fails with this error:
[INFO] [ERROR] The goal you specified requires a project to execute but there is no POM in this directory (C:<my home director>). Please verify you invoked Maven from the correct directory. -> [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/MissingProjectException
[ERROR] ------ Maven call was NOT Ok. for iteration one ( return code: 1 )
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10.567 s
[INFO] Finished at: 2020-05-08T10:04:40+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.soebes.maven.plugins:iterator-maven-plugin:0.5.0:invoker (default) on project invoker-basic-test: Maven call failed with return code 1 for iteration: one -> [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
So in other words, on that particular Windows system (I see that build working on Macs and other Windows machines), the invoker tries to find the pom.xml in my user home directory. And of course, I started the build in the right directory. The only significant thing what I have noticed on that Windows, the Environment variable MP_FORCE_USE_SANDBOX=1 is set.
-e and -X don't really help. Perhaps someone could help me out with some further hints in order to tackle down the problem.
Finally, I found out what the problem was. It's not really a maven or Iterator Problem, more of a misconfigured Windows problem. However, in case someone comes over something like this, it may be worth to check.
In my case it was a Registry Key. In Windows there is a Registry Key Autorun under
\HKEY_CURRENT_USER\Software\Microsoft\Command Processor
This Registry Key can control, in which directory a new cmd.exe will be started. In my case, there was cd /d C:\<myHomeDirectory>as a value. Which made the cmd.exe always start in my Home Directory. This caused my build to fail, because each iteration of the iterator supposably starts a new process in my Home Directory, which finally lets Maven search the desired pom.xml in my Home Directory.
For me the resolution for my problem is, change the Registry Key Autorun to the value cd.
I am trying to delete documents which are created by doorstop and getting error as "Multiple Root documents" Please refer to below link for more information
https://github.com/doorstop-dev/doorstop/issues/293
Solution for that is to run "mvn clean" command but I am getting below error for "mvn clean" command. Any possible solutions regarding this.
(base) MANOJs-MacBook-Air:~ manojdeshpande$ mvn clean
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.090 s
[INFO] Finished at: 2019-11-21T23:01:40+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (/Users/manojdeshpande). Please verify you invoked Maven from the correct directory. -> [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/MissingProjectException
The error message is pretty clear:
The goal you specified requires a project to execute but there is no
POM in this directory (/Users/manojdeshpande). Please verify you
invoked Maven from the correct directory
The problem is that Maven can't find a pom file (pom.xml is the maven project configuration file) where you are running the maven clean command, so it's impossible for Maven to know what to do, even if you specified the clean goal.
Maybe your pom file is somewhere else than /Users/manojdeshpande?
First, I have db_migration.sh with content like this
#!/bin/sh
eval "mvn compile flyway:migrate"
So, simple. Just to ease users from executing this command in the terminal by themselves. Due to 'mvn', Of course, this command need to be executed with pom file, which I already place them together in the same directory.
Second, I have this code segment in install.xml file. To mark as executable file after the installation, fix permission denied issue in Unix system
<executable targetfile="$INSTALL_PATH/Database/orchestra-db/db_migration.sh" os="unix" stage="never" failure="warn" keep="true" />
Then, in the ProcessPanel I have this; To run my db_migration.sh
<job name="do xyz">
<executeForPack name="Orchestra Runtime"/>
<os family="unix" />
<executefile name="$INSTALL_PATH/Database/orchestra-db/db_migration.sh">
<arg>doit</arg>
</executefile>
</job>
However, when I test my installer, I got this error message in the ProcessPanel
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.300 s
[INFO] Finished at: 2018-07-19T15:51:52+02:00
[INFO] Final Memory: 5M/121M
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (/home/tanyagorn/Documents/OrchestraInstaller/installer/target). Please verify you invoked Maven from the correct directory. -> [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/MissingProjectException
Seem like IzPack is looking for pom file and try to execute .sh file in 'target' directory. But, I need this script to be executed at the user's install path. Can anyone tell me what did I do wrong?
Thank you in advance.
The continued discussion and right place to discuss IzPack issues is the user forum:
https://groups.google.com/d/msg/izpack-user/eN8wdvE-UIc/Verjnuh0BAAJ
I have a spring boot application.I am running it inside a vagrant box(centos).I use intelliJ IDEA.
I have created a Makefile and I am trying to run this application.
I have never worked with Makefile hence I am not confident about it.
Hence the question might seem easy for some of you.I tried to do a bit of research but I could not achieve any success in it.
My Makefile contains:-
install-mvn:
mvn :install
I opened a terminal and went to the location where my Makefile is located and then issue the 'make' command to run the application.
I get the error as below:-
[vagrant#localhost src]$ make
mvn :install
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
[INFO] Total time: 0.578s
[INFO] Finished at: Fri Jul 14 17:24:31 IST 2017
[INFO] Final Memory: 4M/22M
[INFO] ------------------------------------------------------------------------
[ERROR] Could not find goal '' in plugin org.apache.maven.plugins:maven- install-plugin:2.3.1 among available goals install, install-file, help -> [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/MojoNotFoundException
make: *** [install-mvn] Error 1
I did not understand the error.Can any of you guide me with this?I would like to know what is being expected and what should the Makefile contain.
Thanks in advance
I'm new to Maven and trying to use this for the first time in my project.
I've set the system variables;
JAVA_HOME System Variable
M2_HOME System Variable
%JAVA_HOME%\bin;%M2_HOME%\bin; to System Path
In cmd prompt using "mvn -version" i can see all relevant details.
But when I run "mvn clean”, I get the following error
C:\Users\Naina Mantry>mvn clean
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.105 s
[INFO] Finished at: 2016-02-15T08:00:48+05:30
[INFO] Final Memory: 5M/86M
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (C:\Users\Naina
Mantry). Please verify you invoked Maven from the correct directory. -> [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/MissingProjectException
I'm not able to understand, how to fix it. kindly help me please...
Thanks in advance :)
when you run Maven, you need to run it from your proyect directory, where you have your workspace. You need to have a pom.xml file on that Directory.
For example:
C:\Users\Naina Mantry\workspace\proyect
and on that directory you run mvn clean
You seem to be executing mvn clean from a wrong directory. Make sure there is a relevant pom.xml. Maven by default refers to the current working directory. Alternately, you can use -f option to specify a pom.xml located in a different directory.