Maven Build - Eclipse project meta-data error - eclipse

I'm trying to create the meta-data for a eclipse project in maven, but my parter and I keep running into the following error, on both our machines. Ive looked around the forum and have tried related advice such as defining a path in the eclipse.ini file and so on, but this hasn't worked. Has anyone else ran into this error before or can see what I am doing incorrectly? Any help would be greatly appreciated.
C:\Users\jheerman\workspace\release\admin-portal>mvn eclipse:clean eclipse:eclip
se -DdownloadSources=true
[INFO] Scanning for projects...
[WARNING] The POM for org.codeaus.mojo:rpm-maven-plugin:jar:2.1-alpha-1 is missi
ng, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.codeaus.mojo:rpm-maven-pl
ugin:2.1-alpha-1: Plugin org.codeaus.mojo:rpm-maven-plugin:2.1-alpha-1 or one of
its dependencies could not be resolved: Failed to read artifact descriptor for
org.codeaus.mojo:rpm-maven-plugin:jar:2.1-alpha-1
[WARNING] The POM for org.codeaus.mojo:rpm-maven-plugin:jar:2.1-alpha-1 is missi
ng, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.codeaus.mojo:rpm-maven-pl
ugin:2.1-alpha-1: Plugin org.codeaus.mojo:rpm-maven-plugin:2.1-alpha-1 or one of
its dependencies could not be resolved: Failed to read artifact descriptor for
org.codeaus.mojo:rpm-maven-plugin:jar:2.1-alpha-1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building CTP Admin Portal Services 0.4.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.codeaus.mojo:rpm-maven-plugin:jar:2.1-alpha-1 is missi
ng, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.codeaus.mojo:rpm-maven-pl
ugin:2.1-alpha-1: Plugin org.codeaus.mojo:rpm-maven-plugin:2.1-alpha-1 or one of
its dependencies could not be resolved: Failed to read artifact descriptor for
org.codeaus.mojo:rpm-maven-plugin:jar:2.1-alpha-1
[WARNING] The POM for org.codeaus.mojo:rpm-maven-plugin:jar:2.1-alpha-1 is missi
ng, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.codeaus.mojo:rpm-maven-pl
ugin:2.1-alpha-1: Plugin org.codeaus.mojo:rpm-maven-plugin:2.1-alpha-1 or one of
its dependencies could not be resolved: Failed to read artifact descriptor for
org.codeaus.mojo:rpm-maven-plugin:jar:2.1-alpha-1
[INFO]
[INFO] --- maven-eclipse-plugin:2.8:clean (default-cli) # ctp-admin-portal ---
[INFO] Deleting file: .project
[INFO] Deleting file: .classpath
[INFO] Deleting file: .wtpmodules
[INFO] Deleting file: .component
[INFO] Deleting file: org.eclipse.wst.common.component
[INFO] Deleting file: org.eclipse.wst.common.project.facet.core.xml
[INFO] Deleting file: org.eclipse.jdt.core.prefs
[INFO] Deleting file: org.eclipse.ajdt.ui.prefs
[INFO]
[INFO] >>> maven-eclipse-plugin:2.8:eclipse (default-cli) # ctp-admin-portal >>>
[INFO]
[INFO] <<< maven-eclipse-plugin:2.8:eclipse (default-cli) # ctp-admin-portal <<<
[INFO]
[INFO] --- maven-eclipse-plugin:2.8:eclipse (default-cli) # ctp-admin-portal ---
[INFO] Using Eclipse Workspace: C:\Users\jheerman\workspace
[INFO] Adding default classpath container: org.eclipse.jdt.launching.JRE_CONTAIN
ER
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 34.003s
[INFO] Finished at: Thu Jun 23 09:42:31 GMT-08:00 2011
[INFO] Final Memory: 8M/19M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-eclipse-plugin:2.8
:eclipse (default-cli) on project ctp-admin-portal: Cant canonicalize system pat
h: {0}: The filename, directory name, or volume label syntax is incorrect -> [He
lp 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

Related

I am facing issue while running "mvn clean install" while connecting AEM with react

i am following the tutorial https://helpx.adobe.com/experience-manager/kt/sites/using/getting-started-spa-wknd-tutorial-develop/react/chapter-0.html#integrate-react-app for integrating reactjs with AEM,i am facing issue while running "mvn clean install" and i was able to perform previous steps properly.
C:\Users\TEJA\Desktop\Start-aem-wknd-events-react\Start\aem-guides-wknd-events\react-app>mvn clean install
[INFO] Scanning for projects...
[INFO]
[INFO] ---------< com.adobe.aem.guides:aem-guides-wknd-events.react >----------
[INFO] Building WKND Events - React App 0.0.1-SNAPSHOT
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:3.0.0:clean (default-clean) # aem-guides-wknd-events.react ---
[INFO]
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-maven) # aem-guides-wknd-events.react ---
[INFO]
[INFO] --- frontend-maven-plugin:1.6:install-node-and-npm (install node and npm) # aem-guides-wknd-events.react ---
[INFO] Installing node version v10.8.0
[INFO] Copying node binary from C:\Users\TEJA\.m2\repository\com\github\eirslett\node\10.8.0\node-10.8.0-win-x64.exe to C:\Users\TEJA\Desktop\Start-aem-wknd-events-react\Start\aem-guides-wknd-events\react-app\node\node.exe
[INFO] Installed node locally.
[INFO] NPM 6.2.0 is already installed.
[INFO]
[INFO] --- frontend-maven-plugin:1.6:npm (npm install) # aem-guides-wknd-events.react ---
[INFO] Running 'npm install' in C:\Users\TEJA\Desktop\Start-aem-wknd-events-react\Start\aem-guides-wknd-events\react-app
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.810 s
[INFO] Finished at: 2019-10-20T23:44:11+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.6:npm (npm install) on project aem-guides-wknd-events.react: Failed to run task: 'npm install' failed. java.io.IOException: Cannot run program "C:\Users\TEJA\Desktop\Start-aem-wknd-events-react\Start\aem-guides-wknd-events\react-app\node\node.exe" (in directory "C:\Users\TEJA\Desktop\Start-aem-wknd-events-react\Start\aem-guides-wknd-events\react-app"): CreateProcess error=193, %1 is not a valid Win32 application -> [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
C:\Users\TEJA\Desktop\Start-aem-wknd-events-react\Start\aem-guides-wknd-events\react-app>npm install aem-clientlib-generator --save-dev
npm WARN ajv-keywords#3.2.0 requires a peer of ajv#^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
+ aem-clientlib-generator#1.4.4
updated 1 package and audited 33138 packages in 31.111s
found 1041 vulnerabilities (71 low, 8 moderate, 960 high, 2 critical)
run `npm audit fix` to fix them, or `npm audit` for details
C:\Users\TEJA\Desktop\Start-aem-wknd-events-react\Start\aem-guides-wknd-events\react-app>mvn clean install
[INFO] Scanning for projects...
[INFO]
[INFO] ---------< com.adobe.aem.guides:aem-guides-wknd-events.react >----------
[INFO] Building WKND Events - React App 0.0.1-SNAPSHOT
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:3.0.0:clean (default-clean) # aem-guides-wknd-events.react ---
[INFO]
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-maven) # aem-guides-wknd-events.react ---
[INFO]
[INFO] --- frontend-maven-plugin:1.6:install-node-and-npm (install node and npm) # aem-guides-wknd-events.react ---
[INFO] Installing node version v10.8.0
[INFO] Copying node binary from C:\Users\TEJA\.m2\repository\com\github\eirslett\node\10.8.0\node-10.8.0-win-x64.exe to C:\Users\TEJA\Desktop\Start-aem-wknd-events-react\Start\aem-guides-wknd-events\react-app\node\node.exe
[INFO] Installed node locally.
[INFO] NPM 6.2.0 is already installed.
[INFO]
[INFO] --- frontend-maven-plugin:1.6:npm (npm install) # aem-guides-wknd-events.react ---
[INFO] Running 'npm install' in C:\Users\TEJA\Desktop\Start-aem-wknd-events-react\Start\aem-guides-wknd-events\react-app
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.590 s
[INFO] Finished at: 2019-10-20T23:45:29+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.6:npm (npm install) on project aem-guides-wknd-events.react: Failed to run task: 'npm install' failed. java.io.IOException: Cannot run program "C:\Users\TEJA\Desktop\Start-aem-wknd-events-react\Start\aem-guides-wknd-events\react-app\node\node.exe" (in directory "C:\Users\TEJA\Desktop\Start-aem-wknd-events-react\Start\aem-guides-wknd-events\react-app"): CreateProcess error=193, %1 is not a valid Win32 application -> [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
C:\Users\TEJA\Desktop\Start-aem-wknd-events-react\Start\aem-guides-wknd-events\react-app>mvn clean install
I have used frontend-maven-plugin without issues in other projects, by reading the error message, it seems it is common that the npm.exe executable gets corrupted.
Try deleting your .m2 plugin directory or specifying a custom npm version <npmVersions>.
See issue 487 on GitHub
The issue might be in the script in one of the react/webpack config files. Search for "%1" in the directory, %1 may be passed as a parameter in the script/command
%1 is not a valid Win32 application
Usually these are linux commands and will fail to work in windows machines. Can you try installing this in a linux machine?

Issue while adding dependency from local file system

Facing issue while adding dependency from local file system.
Am Using systemPath tag to locate dependency.
But jar files is there in the location mentioned.
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.citi.166944:retail-basel-services:jar:1.0.0-SNAPSHOT
[WARNING] 'dependencies.dependency.systemPath' for com.citi.163431:ets-ra-tools-aggregate-api:jar should not point at files within the project directory, ${basedir}/external_lib/ets-ra-tools-aggregate-api-1.0.3-JAVA7.jar will be unresolvable by dependent projects # com.citi.166944:retail-basel-services:[unknown-version], C:\Users\jj48521\eclipse-workspace\retail-basel-services-trunk\pom.xml, line 38, column 16
[WARNING] 'dependencies.dependency.systemPath' for com.citi.163431:jrace-util:jar should not point at files within the project directory, ${basedir}/external_lib/jrace-util-1.17-basic-alpha-2.jar will be unresolvable by dependent projects # com.citi.166944:retail-basel-services:[unknown-version], C:\Users\jj48521\eclipse-workspace\retail-basel-services-trunk\pom.xml, line 232, column 16
[WARNING] 'dependencies.dependency.systemPath' for com.citi.163431:jrace-params:jar should not point at files within the project directory, ${basedir}/external_lib/jrace-params-1.17-basic-alpha-2.jar will be unresolvable by dependent projects # com.citi.166944:retail-basel-services:[unknown-version], C:\Users\jj48521\eclipse-workspace\retail-basel-services-trunk\pom.xml, line 239, column 16
[WARNING] 'build.plugins.plugin.(groupId:artifactId)' must be unique but found duplicate declaration of plugin org.apache.maven.plugins:maven-compiler-plugin # com.citi.166944:retail-basel-services:[unknown-version], C:\Users\jj\eclipse-workspace\retail-basel-services-trunk\pom.xml, line 266, column 12
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Retail Basel Services 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.apache.maven.plugins:maven-jar-plugin:jar:2.3.1 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.456 s
[INFO] Finished at: 2018-10-08T12:00:28+05:30
[INFO] Final Memory: 8M/309M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-jar-plugin:2.3.1 or one of its dependencies could not be resolved: Cannot access citicore-plugins (http://sdfg.net:8081/nexus/content/repositories/citicore) in offline mode and the artifact org.apache.maven.plugins:maven-jar-plugin:jar:2.3.1 has not been downloaded from it before. -> [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

When trying to install jar in local repository using maven

I do not have this SFTP jar in my Nexus Repo & I have add it's dependency into the POM file but now i want to install this JAR in my local repository so that i can use it in my project. But getting access is denied even though i opened command prompt with Administrator rights.
C:\Windows\system32>mvn install:install-file -DgroupId=org.springframework.integration -DartifactId=spring-integration-sftp -Dversion=4.1.5 -Dpackaging=jar -Dfile=C:\Repo
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-install-plugin:2.4:install-file (default-cli) # standalone-pom
---
[INFO] Installing C:\Repo to C:\Users\t868396\.m2\repository\org\springframework
\integration\spring-integration-sftp\4.1.5\spring-integration-sftp-4.1.5.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.827 s
[INFO] Finished at: 2015-06-23T11:02:52+05:00
[INFO] Final Memory: 15M/64M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.4
:install-file (default-cli) on project standalone-pom: Error installing artifact
'org.springframework.integration:spring-integration-sftp:jar': Failed to instal
l artifact org.springframework.integration:spring-integration-sftp:jar:4.1.5: C:
\Repo (Access is denied) -> [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
Mostly likely the -Dfile=your.jar is not correct, check your argument (FYI it was omitted from your posting).
Here is an example:
mvn install:install-file -DlocalRepositoryPath=repo -DcreateChecksum=true
-Dfile=[your-jar] -Dpackaging=jar
-DgroupId=[...] -DartifactId=[...] -Dversion=[...]
See: Can I add jars to maven 2 build classpath without installing them?
And: https://maven.apache.org/general.html#importing-jars

do not pass correct settings.xml to Maven Release Plugin

i have the following issue with eclipse , i am running an mvn install ,
try to build my project.
no idea what do with this error
please help
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building superman 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-hpi-plugin:1.95:validate (default-validate) # superman ---
[INFO]
[INFO] --- maven-enforcer-plugin:1.0.1:enforce (enforce-maven) # superman ---
[WARNING] Rule 1: org.apache.maven.plugins.enforcer.RequireMavenVersion failed with message:
Build with Maven 3.0.4 or later. Maven 3.0 through 3.0.3 inclusive do not pass correct settings.xml to Maven Release Plugin.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.032s
[INFO] Finished at: Thu Dec 04 11:24:21 CST 2014
[INFO] Final Memory: 22M/355M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:1.0.1:enforce (enforce-maven) on project superman: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed. -> [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/MojoExecutionException
That means simply that you are using an older Maven version. Based on the rule you have to use Maven 3.0.5+ that's the problem. The problem with Maven 3.0...3.0.3 had problems with informations from settings.xml to the release plugin which produces problems.
so after all that , you have to go to
window> preferences > maven > installations > and change the settings in there to the new install on your work station . that why eclipse is going to use the new maven 3.2.3
issue solved

Maven: Failed to resolve dependency: C:\Program Files\Java\lib\tools.jar

I'm trying to use the cargo plugin to run a web application in a local Jetty container from inside Eclipse. This seems to be working for other people with the exact same pom.xml, but I get this error:
[ERROR] Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.0.3:start (default-cli) on project wsc: Failed to resolve dependency: C:\Program Files\Java\lib\tools.jar -> [Help 1]
How do I resolve this? The project is set to use jdk1.7.0 as the "JRE System Library". I am starting Eclipse with "-vm " and even JAVA_HOME is set to the JDK path.
Any ideas? I've been researching on this for a while and getting crazy about that. The documentation on including tools.jar as dependency didn't help me.
Important: This seems to work outside Eclipse, e.g. with mvn -P local cargo:start.
Program output when started from Eclipse:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Web Services Computing 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- cargo-maven2-plugin:1.0.3:start (default-cli) # wsc ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.324s
[INFO] Finished at: Sat Oct 22 19:10:18 CEST 2011
[INFO] Final Memory: 15M/107M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.0.3:start (default-cli) on project wsc: Failed to resolve dependency: C:\Program Files\Java\lib\tools.jar -> [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/MojoExecutionException
Dependency tree output (also started from Eclipse):
[INFO] --- maven-dependency-plugin:2.1:tree (default-cli) # wsc ---
[INFO] de.tum.ibis.wsc:wsc:war:0.0.1-SNAPSHOT
[INFO] +- junit:junit:jar:3.8.1:test
[INFO] \- javax.servlet:servlet-api:jar:2.5:compile
[INFO] ------------------------------------------------------------------------
You have to start eclipse with a jdk instead of a jre.
If you edit your eclipse.ini and put a jdk to the vm arguments it should work.
-vm
C:/java_1_6/jdk/bin/javaw.exe