Compiling java using Maven - eclipse

When I compiling my java file using maven the error exist....
..........
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.dbs.epodsms:ePOD_SMS_RCVR_SNDR_GLOBE:jar:2.0-RELEASE
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. # line 23, 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 ePOD_SMS_RCVR_SNDR 2.0-RELEASE
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.172s
[INFO] Finished at: Wed Jul 03 15:05:03 CST 2013
[INFO] Final Memory: 3M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Unknown lifecycle phase "Compile". 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-site, site, post-site, site-deploy, pre-clean, clean, post-clean. -> [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/LifecyclePhaseNotFoundException
...........
WHAT WILL BE THE SPECIFIC ERROR.. ANYONE? im using eclipse indigo(IDE)

You have used "Compile" as the lifecycle phase, maven expects the value "compile" as shown by the error
[ERROR] Unknown lifecycle phase "Compile". You must specify a valid lifecycle phase or a goal in the format : or :[:]:. 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-site, site, post-site, site-deploy, pre-clean, clean, post-clean. -> [Help 1]
[ERROR]

As Mehul said, your Maven lifecycle phase is incorrect. To display and change your Maven goals in Eclipse, see Duncan Jones' answer to this stackoverflow question.
You probably want to change "Compile" to "compile" or even to "clean install".

Related

Getting error when execute maven command from powershell

Hi I am getting below error while running maven command from powershell
mvn clean install test -DsuiteXmlFile=QADesignRoomTest.xml
Error:
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------------------< test:vt >-----------------------------
[INFO] Building vt 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.193 s
[INFO] Finished at: 2019-07-15T17:54:50+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Unknown lifecycle phase ".xml". 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/LifecyclePhaseNotFoundException
Put file name in quotes:
mvn clean install test -DsuiteXmlFile="QADesignRoomTest.xml"

Creating Maven multi-module project with Eclipse

I want to create a maven Multi-module project.
I want to create the Parent project using
mvn archetype:create -DgroupId=com.websystique.multimodule -DartifactId=parent-project
But I got this error:
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.203 s
[INFO] Finished at: 2017-05-02T19:57:19+02:00
[INFO] Final Memory: 9M/309M
[INFO] ------------------------------------------------------------------------
[ERROR] Could not find goal 'create' in plugin org.apache.maven.plugins:maven-archetype-plugin:3.0.1 among available goals crawl, create-from-project, generate, help, integration-test, jar, update-local-catalog -> [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
Did you read the error message?
[ERROR] Could not find goal 'create' in plugin org.apache.maven.plugins:maven-archetype-plugin:3.0.1 among available goals crawl, create-from-project, generate, help, integration-test, jar, update-local-catalog -> [Help 1]
The error message tells you that the goal you've specified for the plugin (create) isn't one of the available options. It also lists the valid options for you:
crawl
create-from-project
generate
help
integration-test
jar
update-local-catalog
The goal you're looking for is generate. For example:
mvn archetype:generate -DgroupId=com.websystique.multimodule -DartifactId=parent-project
For more info: maven-archetype-plugin.

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

I couldn't import 'Existing Maven Projects' of i-jetty

They said,
cd $IJETTY_HOME/console
mvn clean install
This will produce a war file in $IJETTY_HOME/console/webapp/target, and also the apk in $IJETTY_HOME/console/apk/target (although as we mentioned, you're probably not interested in that).
but I got following error (...oh, my god. I can not upload image ;0 )
**
[INFO] --- exec-maven-plugin:1.2:exec (generate-dex) # console ---
Unable to access jarfile ${env.ANDROID_HOME}/platform-tools/lib/dx.jar
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] I-Jetty :: Console Parent ......................... SUCCESS [0.241s]
[INFO] I-Jetty :: Console Webapp ......................... FAILURE [2.431s]
[INFO] I-Jetty :: Console Android Installer .............. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.122s
[INFO] Finished at: Thu Nov 08 19:33:47 KST 2012
[INFO] Final Memory: 14M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2:exec (generate-dex) on project console: Command execution failed. Process exited with an error: 1(Exit value: 1) -> [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
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :console**
and I tried 'Building with Eclipse'
finally, I got following error similar with the one.
on Import Maven Projects,
exec-maven-plugin:1.2:exec (1 errors)
maven-antrun-plugin:1.6:run(1 errors)
maven-depoendency-plugin:2.3:unpack-dependencies(1 error)
Help me, plz.
I installed maven plug-in 1.3 with eclipse on Mac OS X Lion.
finally, I solved it by myself.
I missed export android sdk path (export ANDROID_HOME=/opt/android/android-sdk-linux_86)
and I edited pom.xml
from
<artifactId>maven-android-plugin</artifactId>
<version>2.9.0-beta-5</version>
to
<artifactId>android-maven-plugin</artifactId>
<version>3.0.0</version>
thanks.