It's really odd that I downloaded the source code from Forgerock's stash repo to my linux local, but it always complain an compile error for the ant stuff . Below is the detailed error msg. Any idea why ?
generateadmin:
[exec]
[exec] BUILD FAILED
[exec] /home/xifeng/Downloads/new_test/3rd/opendj/release-3.0.0/opendj/opendj-server-legacy/build.xml:99: Fatal error during transformation using /home/xifeng/Downloads/new_test/3rd/opendj/release-3.0.0/opendj/opendj-server-legacy/resource/admin/metaMO.xsl: Cannot find external method 'java.io.File.toURI' (must be public).
[INFO] OpenDJ ............................................. FAILURE [ 31.211 s]
[INFO] OpenDJ DSML Gateway ................................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (generate-config) on project opendj-server-legacy: An Ant BuildException has occured: The following error occurred while executing this line:
[ERROR] /home/xifeng/Downloads/new_test/3rd/opendj/release-3.0.0/opendj/opendj-server-legacy/build.xml:76: exec returned: 1
[ERROR] around Ant part ...<ant antfile="/home/xifeng/Downloads/new_test/3rd/opendj/release-3.0.0/opendj/opendj-server-legacy/build.xml">... # 4:113 in /home/xifeng/Downloads/new_test/3rd/opendj/release-3.0.0/opendj/opendj-server-legacy/target/antrun/build-main.xml
I finally understood the cause.
In my opendj/.gitignore file, I have:
# Package Files #
*.jar
meaning that when I submit those archives to my own git repo, they aren't committed.
Thus, when someone else clones my repo they will fail to compile.
Related
I'm encountering these errors every time I run my project as Maven Install. I've tried clearing the maven cache based on other questions but it doesn't seem to work. Thanks
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.561 s
[INFO] Finished at: 2018-09-15T23:57:19+08:00
[INFO] ------------------------------------------------------------------------
[WARNING] The requested profile "pom.xml" could not be activated because it does not exist.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project SpringBootSpringJPACRUD: Compilation failure: Compilation failure:
I am trying to integrate Jenkins with Maven. Through terminal I am able to execute the Maven command (clean install). But from Jenkins it fails.
Getting following error:
<===[JENKINS REMOTING CAPACITY]===>channel started
Executing Maven: -B -f /Users/krishna/eclipse-workspace/Tools/LearnBroswserStack/pom.xml clean install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building BrowserStackDemo 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # BrowserStackDemo ---
[INFO] Deleting /Users/krishna/eclipse-workspace/Tools/LearnBroswserStack/target
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.090 s
[INFO] Finished at: 2018-02-04T16:17:27+01:00
[INFO] Final Memory: 11M/190M
[INFO] ------------------------------------------------------------------------
**[ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean (default-clean) on project BrowserStackDemo:** Failed to clean project: Failed to delete /Users/krishna/eclipse-workspace/Tools/LearnBroswserStack/target/.DS_Store -> [Help 1]
[ERROR]
[JENKINS] Archiving /Users/krishna/eclipse-workspace/Tools/LearnBroswserStack/pom.xml to BrowserStack/BrowserStackDemo/0.0.1-SNAPSHOT/BrowserStackDemo-0.0.1-SNAPSHOT.pom
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
/Users/krishna/eclipse-workspace/Tools/LearnBroswserStack/pom.xml is not inside /Users/Shared/Jenkins/Home/workspace/MavenJenkinsIntegration1/Users/krishna/eclipse-workspace/Tools/LearnBroswserStack/; will archive in a separate pass
[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/MojoExecutionException
channel stopped
Finished: FAILURE
Note:
I am not using any server like Tomcat. My problem is not able to delete the target folder from Jenkins, when ever I taken a clean build, target folder will create newly, so I am unable to give the access for the target folder.
Your Jenkins executor is unable to delete the target folder of project . The error statements points it out clearly.
*[ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean (default-clean) on project BrowserStackDemo:** Failed to clean project: Failed to delete /Users/krishna/eclipse-workspace/Tools/LearnBroswserStack/target/.DS_Store -> [Help 1]
Such error occurs when the access to file is denied at the OS filesystem level OR the target folder's files are already being used somewhere in some other process and they are left in OPEN state. Try deleting the target folder manually.
While running a maven build from Jenkins using stash/bitbucket repo i am getting error. This is first time set of this project in stash/bitbucket and jenkins job as well
21:00:30 [INFO] Executing: /bin/sh -c cd /home/jenkins/workspace/project/folder && git push https://stash.xxx.com/scm/repo/folder refs/heads/develop:refs/heads/develop
21:00:30 [INFO] Working directory: /home/jenkins/workspace/project/folder
21:00:30 [INFO] -------------------------------------------------------------
21:00:30 [INFO] BUILD FAILURE
21:00:30 [INFO] -------------------------------------------------------------
21:00:30 [INFO] Total time: 41.539 s
21:00:30 [INFO] Finished at: 2017-10-01T16:00:30-04:00
21:00:31 [INFO] Final Memory: 14M/179M
21:00:31 [INFO] -------------------------------------------------------------
21:00:31 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5.3:prepare (default-cli) on project ifaview: Unable to commit files
21:00:31 [ERROR] Provider message:
21:00:31 [ERROR] The git-push command failed.
21:00:31 [ERROR] Command output:
21:00:31 [ERROR] fatal: could not read Username for 'https://stash.xxxx.com': No such device or address
jenkins configuration #Source Code Management>Git>Repositories>
Repository URL=https://stash.xxx.com/scm/repo/folder.git
Credentials: jenkins_user/xxxxx
In stash repo settings for jenkins_user
Repository permission: read, write
Branch permission: Changes without a pull request except jenkins_user
Pull request : merge and squash
Any one came across this problem, tried many other options as well...though no luck yet.
Eclipse: Neon/Luna SR2/Luna R
Set
JAVA_HOME=$(/usr/libexec/java_home)
M2_Home=ECLIPSE FOLDER PATH
M2=$M2_HOME/bin
Added all other such configuration: Still facing issues.
Activities performed:
1. Import GIT project (Clone URL)
2. Import MAVEN Project
3. Eclipse point to Java JDK installed
4. Run Configuration (clean install)
5. Apply --> Okay --> Generates Errors as below
Any insight here will be appreciated
Error: -- [INFO] BUILD FAILURE [INFO] Total time: 1.420 s [INFO] Finished at: 2017-06-05T19:19:54+05:30 [INFO] Final Memory: 17M/309M [INFO] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (default-compile) on project mail-client: Compilation failure [ERROR] Failure executing javac, but could not parse the error: [ERROR] /bin/sh: /bin/javac: No such file or directory [ERROR] -> [Help 1]
I am running Maven 3.0.4 in Ubuntu 12.04. I have Java version 1.7.0_25. I am trying to use the mvn package command, but am continually running into errors, which are always along the lines of:
Failure executing javac, but could not parse the error:
javac: directory not found: /......../target/[some folder]
I couldn't figure out what this was originally but now understand from some basic googling that this is because the destination directory has to exist. The generally suggested way to handle this problem is to create an ant script which does it for you (I think).
However, I have no idea what folders actually need to be created. This is not my project I'm compiling, just something I've downloaded. Can an Ant script still be used and, if so, could anybody point me in the right direction as I have never used an ant script before, much less created one, and could quite accurately be called a Ubuntu "noob"!
Full Maven output as requested
Directory is:
flume-sources - containing
flume.conf
pom.xml
src
main
java
com
cloudera
flume
source
TwitterSource.java
TwitterSourceConstants.java
Maven error is:
andrew#andrew-VirtualBox:~/flume-sources$ mvn package
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building flume-sources 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.3:resources (default-resources) # flume-sources ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/andrew/flume-sources/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) # flume-sources ---
[INFO] Compiling 2 source files to /home/andrew/flume-sources/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] Failure executing javac, but could not parse the error:
javac: directory not found: /home/andrew/flume-sources/target/classes
Usage: javac <options> <source files>
use -help for a list of possible options
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.470s
[INFO] Finished at: Mon Jul 08 12:35:58 BST 2013
[INFO] Final Memory: 9M/59M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project flume-sources: Compilation failure
[ERROR] Failure executing javac, but could not parse the error:
[ERROR] javac: directory not found: /home/andrew/flume-sources/target/classes
[ERROR] Usage: javac <options> <source files>
[ERROR] use -help for a list of possible options
[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
andrew#andrew-VirtualBox:~/flume-sources$
No, you don't need to create the folder by hand or with an ant script.
If the target folder doesn't exist when you run mvn, it will create it
So my guess is that you have a permissions issue
The user running maven can't create folders in /home/andrew/flume-sources
just as a test, run mvn as root
sudo mvn package
if that works then it is what I said and you will need to 1) chown the folder so that the user running maven can create folders in it (rw) or 2) run mvn from the same user that owns the folder (which i'm guessing is andrew)