Execute failed: java.io.IOException: Cannot run program "mkdir" - maven

I am trying to build maven project.I am getting following error. The complete stack trace is below
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (rpmbuild) on project ers: An Ant BuildException has occured: The following error occurred while executing this line:
[ERROR] C:\Users\XYZ-PC\git\ers\target\rpm-spec-template\rpmbuild.xml:4: Execute failed: java.io.IOException: Cannot run program "mkdir": CreateProcess error=2, The system cannot find the file specified
[ERROR] around Ant part ...<ant antfile="C:\Users\XYZ-PC\git\ers\target/rpm-spec-template/rpmbuild.xml"/>... # 4:93 in C:\Users\XYZ-PC\git\ers\target\antrun\build-main.xml
[ERROR] -> [Help 1]
I have tried searching out this problem but all I found is that may be its JRE problem, I have checked and made sure that my source is using JDK not JRE.
I am stuck and any help would be appreciated.

Related

How to fixe An error is occurred in the checkin process: Exception while executing SCM command in mvn release:prepare?

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:3.0.0-M1:prepare (default-cli) on project ***: An error is occurred in the checkin process: Exception while executing SCM command.: JGit checkin failure! Exception caught during execution of push command: Source ref refs/heads/d865f6170aaa91ed8860420f7bbe586243b7ecae doesn't resolve to any object. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-release-plugin:3.0.0-M1:prepare (default-cli) on project qure-api: An error is occurred in the checkin process: Exception while executing SCM command.
Hello,
I try to execute a release jenkins pipeline and I got this error when try do to: mvn release:prepare
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:3.0.0-M1:prepare (default-cli) on project qure-api: An error is occurred in the checkin process: Exception while executing SCM command.: JGit checkin failure! Exception caught during execution of push command: Source ref refs/heads/d865f6170aaa91ed8860420f7bbe586243b7ecae doesn't resolve to any object. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-release-plugin:3.0.0-M1:prepare (default-cli) on project qure-api: An error is occurred in the checkin process: Exception while executing SCM command.

Errors executing Maven (MacOs Catalina) : Unresolveable build extension / Python configuration for SNAP (ESA)

I try to configure Python for SNAP software. As it is recommanded in this forum (https://forum.step.esa.int/t/unable-to-install-snappy-jpy-problem/5372/28) I have installed maven and followed the steps :
brew install maven
cd jpy
python setup.py bdist_wheel
I get the following errors :
installing to build/bdist.macosx-10.9-x86_64/wheel
running install
running maven
Executing Maven goal 'package'
[INFO] Scanning for projects...
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/wagon/wagon-ssh/1.0-beta-7/wagon-ssh-1.0-beta-7.pom
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Unresolveable build extension: Plugin org.apache.maven.wagon:wagon-ssh:1.0-beta-7 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.wagon:wagon-ssh:jar:1.0-beta-7 #
#
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project org.jpy:jpy:0.10.0-SNAPSHOT (/Users/laura/jpy/pom.xml) has 1 error
[ERROR] Unresolveable build extension: Plugin org.apache.maven.wagon:wagon-ssh:1.0-beta-7 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.wagon:wagon-ssh:jar:1.0-beta-7: Could not transfer artifact org.apache.maven.wagon:wagon-ssh:pom:1.0-beta-7 from/to central (https://repo.maven.apache.org/maven2): transfer failed for https://repo.maven.apache.org/maven2/org/apache/maven/wagon/wagon-ssh/1.0-beta-7/wagon-ssh-1.0-beta-7.pom: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -> [Help 2]
[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/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/PluginManagerException
Many topics raising a similar issue are solved by reconfiguring proxy or firewall. As I work on my own computer (macOS Catalina 10.15.7), without proxy or firewall, and as I don't have any knowledge of how it works, all help is welcome !
Thanks in advance,

Sakai 12.1 deploy command error when connecting to MySQL through JBDC driver

I am currently trying to deploy an instance of the latest Sakai 12.1 on Tomcat, but when I run the
mvn clean install sakai:deploy -Dmaven.tomcat.home=$CATALINA_HOME -Dsakai.home=$CATALINA_HOME/sakai -Dsakai.cleanup=true -Djava.net.preferIPv4Stack=true command, if executes without errors until the "Sakai Core Kernel Implementation" modules (out of the 413), returning this:
...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 07:30 min
[INFO] Finished at: 2018-05-17T13:33:19+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project sakai-kernel-impl: There are test failures.
[ERROR]
[ERROR] Please refer to /home/usuario/sakai/kernel/kernel-impl/target/surefire-reports for the individual test results.
[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 :sakai-kernel-impl
I have seen the error log and the first one is in the RoleAccessTest test.
The log info:
...
13:29:15,161 INFO PoolBase:505 - sakai - Driver does not support get/set network timeout for connections. (not supported feature)
13:29:15,168 ERROR PoolBase:441 - sakai - Failed to execute connection test query (insufficient user privileges or object not found: DUAL).
13:29:15,169 ERROR HikariPool:541 - sakai - Exception during pool initialization.
java.sql.SQLSyntaxErrorException: insufficient user privileges or object not found: DUAL
at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source)
...
[EDIT: Looking at the preceding log, why does HSQLDB arises in the error stack? Isn't supposed to be only MySQL?]
Later, in another line:
WARN JdbcServicesImpl:195 - HHH000341: Could not obtain connection metadata
The Mysql Driver JAR is correctly copied in /opt/tomcat/lib, and the DB user and credentials correctly set in /opt/tomcat/sakai/local.properties
I do not want to deploy Sakai without running test as this is a complete fresh installation and there should not be any errors...
Any help?
Look in your sakai.properties or local.properties. It probably has the line
# validationQuery#javax.sql.BaseDataSource=select 1 from DUAL
This is the SQL query Sakai issues by default to check whether the database is reachable. It looks as though the database system you're using doesn't support that query, so you'll either need to set that property to some other query, or switch the database system you're using. MySQL supports this query, so if you have
vendor#org.sakaiproject.db.api.SqlService=mysql
I'm wrong and it must be something else.

An Ant BuildException has occured: unbalanced qoutes

I get the following error in an Ant file:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (callAppc) on project SalesEdge_CMPD_Session_EJB: An Ant BuildException has occured: The following error occurred while executing this line:
[ERROR] E:\NetApp-CED\April'15\MyNetApp\MyNetApp\SalesEdge_CMPD_Session_EJB\generateSalesEdgeCmpdSessionEJB.xml:27: unbalanced quotes in E:\NetApp-CED\April'15\MyNetApp\MyNetApp\SalesEdge_CMPD_Session_EJB\target/SalesEdge_CMPD_Session_EJB-0.0.1-SNAPSHOT.jar
[ERROR] around Ant part ...<ant antfile="E:\NetApp-CED\April&apos;15\MyNetApp\MyNetApp\SalesEdge_CMPD_Session_EJB/generateSalesEdgeCmpdSessionEJB.xml">... # 5:127 in E:\NetApp-CED\April'15\MyNetApp\MyNetApp\SalesEdge_CMPD_Session_EJB\target\antrun\build-main.xml
[ERROR] -> [Help 1]
[ERROR]
What is the cause?
I think that the issue is the quote in April'15

An Ant BuildException has occured

Try to do mvn clean install for some project.
In the end the build failed with this error:
Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.6:run (default)
on project abc-sm-wsdl: An Ant BuildException has occured:
The following error occurred while executing this line:
[ERROR] C:\ABC\wsdl\build-aif.xml:67:
The following error occurred while executing this line:
[ERROR] C:\ABC\wsdl\build-aif.xml:125: Java returned: 1
Try to googling but ineffectually.
Maybe somebody know hot to resolve it.

Resources