I've set up Eclipse with Maven and created a project adding Selenium and TestNG dependencies. I'm now trying to run my tests in Chrome and I know that I can set System.setProperty("webdriver.chrome.driver","C:\\path-to\\chromedriver.exe");, but I've also seen somewhere that the path to chromedriver can be established in the run configurations, thus avoiding to add configuration lines to the code.
I tried setting up a run configuration like this:
And this is the code in my test:
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.testng.annotations.Test;
public class Demo {
#Test
public void demoTest(){
WebDriver driver=new ChromeDriver();
driver.manage().window().maximize();
driver.get("http://www.google.com");
driver.quit();
}
}
But after running project as "Maven test" I get this and nothing happens (Chrome is not opened):
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building project-name 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # project-name ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # project-name ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # project-name ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) # project-name ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) # project-name ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.737 s
[INFO] Finished at: 2017-07-01T08:36:03-03:00
[INFO] Final Memory: 11M/245M
[INFO] ------------------------------------------------------------------------
What am I missing?
Can you try to run as a JUNIT and run in DEBUG mode so you will find the exact error i think first of all the test class is not picked,
run in DEBUG mode JUNIT and debug the code.. Hoping this will help you.
Related
I'm running this project with testNG, i get the test result(successful one) as
[RemoteTestNG] detected TestNG version 6.13.1
Success!!
Dec 07, 2017 4:44:06 PM org.openqa.selenium.remote.ProtocolHandshake
createSession
INFO: Detected dialect: OSS
PASSED: begin
PASSED: google
===============================================
Default test
Tests run: 2, Failures: 0, Skips: 0
===============================================
===============================================
Default suite
Total tests run: 2, Failures: 0, Skips: 0
===============================================
But when running as Maven test, it doesn't print the name of passed test cases(or any test). It just gives number of tests run. I want the passed cases to be printed here as well.
P.S. - Class is in src/test/java. Tried changing it to src/main/java as suggested in one of issue. but maven skipped the tests altogether in that way as Surefire-plugin runs all tests that are in test source directory src/test/java.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building MavenFrstProj 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # MavenFrstProj ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory
C:\Users\Shrikanth\workspace\MavenFrstProj\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.7.0:compile (default-compile) #
MavenFrstProj ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources)
# MavenFrstProj ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory
C:\Users\Shrikanth\workspace\MavenFrstProj\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.7.0:testCompile (default-testCompile) #
MavenFrstProj ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.20:test (default-test) # MavenFrstProj --
-
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running TestSuite
Success!!
Dec 07, 2017 4:45:58 PM org.openqa.selenium.remote.ProtocolHandshake
createSession
INFO: Detected dialect: OSS
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 8.017
s - in TestSuite
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] ---------------------------------------------------------------------
---
[INFO] BUILD SUCCESS
[INFO] ---------------------------------------------------------------------
---
[INFO] Total time: 11.972 s
[INFO] Finished at: 2017-12-07T16:46:02+05:30
[INFO] Final Memory: 12M/178M
[INFO] ------------------------------------------------------------------------
Note : Also checking the xml report(TestSuite) generated in target/surefire-reports, it replaces class name as TestSuite and in console output it prints Running TestSuite instead of Running <classname>. May be thats the root, but not sure. How do I fix it. Please help!
By default, the Surefire Plugin will automatically include all test classes with the following wildcard patterns:
"**/Test*.java" - includes all of its subdirectories and all Java filenames that start with "Test".
"**/*Test.java" - includes all of its subdirectories and all Java filenames that end with "Test".
"**/*Tests.java" - includes all of its subdirectories and all Java filenames that end with "Tests".
"**/*TestCase.java" - includes all of its subdirectories and all Java filenames that end with "TestCase".
Make sure your test class names follow this pattern otherwise , add each class inclusively in pom.xml
I have created a maven project in intellij and added scala framework support
This project name is sparkexamples and I added the necessary dependencies
Below is the project directory structure .
S:\surender\intellij_1\sparkexamples
S:\surender\intellij_1\sparkexamples\src\main\scala\com\test\spark\examples\DemoMain.scala
S:\surender\intellij_1\sparkexamples\pom.xml
I went inside S:\surender\intellij_1\sparkexamples from command prompt and started running the below mvn commands
mvn clean compile
mvn package
After running mvn package I could see in cons
S:\surender\intellij_1\sparkexamples>mvn clean compile
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building spark-examples 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # spark-examples ---
[INFO] Deleting S:\surender\intellij_1\sparkexamples\target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # spark-exam
ples ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources,
i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # spark- examples
---
[INFO] No sources to compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.950 s
[INFO] Finished at: 2017-03-28T10:46:18+01:00
[INFO] Final Memory: 13M/224M
[INFO] ------------------------------------------------------------------------
S:\surender\intellij_1\sparkexamples>mvn package
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building spark-examples 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # spark-exam
ples ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources,
i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # spark-examples
---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # sp
ark-examples ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources,
i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory S:\surender\intellij_1\sparkexamples\
src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) # spark-e
xamples ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) # spark- examples ---
[INFO] No tests to run.
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) # spark-examples ---
[INFO] Building jar: S:\surender\intellij_1\sparkexamples\target\spark-examples-
1.0-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.651 s
[INFO] Finished at: 2017-03-28T10:47:09+01:00
[INFO] Final Memory: 15M/225M
[INFO] ------------------------------------------------------------------------
S:\surender\intellij_1\sparkexamples>ole that **No Sources to compile**
Could Someone help me to resolve this issue?
The Maven compiler is "incremental" by default. (That means that just the compile goal is "incremental", Maven still makes you go through the whole lifecycle, by default.)
When you first did:
mvn clean compile
Your sources got compiled. (Lifecycles: you ran up to and including the compile lifecycle phase.)
When you then did:
mvn package
The compiler was again invoked, and observed that it had already done its work previously. (Lifecycles: package is a lifecycle phase extending the compile phase.)
This is what seems to happen. Disclaimer: you only included output for mvn package. If your mvn compile also tells you that there's nothing to compile, something else going on, and you'd probably want to rephrase your question (or post a new one).
Also, if this lifecycle thing is messing you up, one more hint: compile is a lifecycle phase, and many people confuse it with doing a particular "task", which it is not. From mvn -h:
usage: mvn [options] [<goal(s)>] [<phase(s)>]
Again, compile is a phase, if you wanted to do a goal ("task"), in case of doing just compilation that'd be: compiler:compile (name_of_the_plugin:name_of_the_goal).
I try these tutorial https://cloud.google.com/tools/cloud-repositories/docs/push-to-deploy, and I do mvn gcloud:deploy,but got the error messages bellow:
[dev-jenkins-test-1] $ /bin/sh -xe /tmp/hudson4310631253025446569.sh
+ mvn gcloud:deploy
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building jenkins-test-java 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> gcloud-maven-plugin:2.0.9.88.v20151125:deploy (default-cli) > package # jenkins-test-java >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # jenkins-test-java ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /var/jenkins/workspace/dev-jenkins-test-1/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) # jenkins-test-java ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # jenkins-test-java ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /var/jenkins/workspace/dev-jenkins-test-1/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) # jenkins-test-java ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) # jenkins-test-java ---
[INFO] No tests to run.
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) # jenkins-test-java ---
[WARNING] JAR will be empty - no content was marked for inclusion!
[INFO]
[INFO] <<< gcloud-maven-plugin:2.0.9.88.v20151125:deploy (default-cli) < package # jenkins-test-java <<<
[INFO]
[INFO] --- gcloud-maven-plugin:2.0.9.88.v20151125:deploy (default-cli) # jenkins-test-java ---
[INFO] Running gcloud app deploy...
[INFO] Running python -S /google/google-cloud-sdk/lib/googlecloudsdk/gcloud/gcloud.py --quiet --project=straw-hat-pirates-dev preview app deploy /var/jenkins/workspace/dev-jenkins-test-1/target/appengine-staging/app.yaml
[INFO] WARNING: Soon, deployments will set the deployed version to receive all traffic by
[INFO] default.
[INFO]
[INFO] To keep the current behavior (where new deployments do not receive any traffic),
[INFO] use the `--no-promote` flag or run the following command:
[INFO]
[INFO] $ gcloud config set app/promote_by_default false
[INFO]
[INFO] To adopt the new behavior early, use the `--promote` flag or run the following
[INFO] command:
[INFO]
[INFO] $ gcloud config set app/promote_by_default true
[INFO]
[INFO] Either passing one of the new flags or setting one of these properties will
[INFO] silence this message.
[INFO]
[INFO] You are about to deploy the following modules:
[INFO] - straw-hat-pirates-dev/default (from [/var/jenkins/workspace/dev-jenkins-test-1/target/appengine-staging/app.yaml])
[INFO] Deployed URL: [https://20151223t054356-dot-straw-hat-pirates-dev.appspot.com]
[INFO] (add --promote if you also want to make this module available from
[INFO] [https://straw-hat-pirates-dev.appspot.com])
[INFO]
[INFO] Beginning deployment...
[INFO] Verifying that Managed VMs are enabled and ready.
[INFO]
[INFO] Provisioning remote build service.
[INFO] Copying certificates for secure access. You may be prompted to create an SSH keypair.
[INFO] Building and pushing image for module [default]
[INFO] ----------------------------- DOCKER BUILD OUTPUT ------------------------------
[INFO] Step 0 : FROM gcr.io/google_appengine/openjdk8
[INFO] ---> 3c058a018ce1
[INFO] Step 1 : ADD jenkins-test-java-1.0-SNAPSHOT.jar /app/
[INFO] ---> 938437aaa1a1
[INFO] Removing intermediate container 4106bc3645ca
[INFO] Step 2 : ENTRYPOINT java -jar /app/jenkins-test-java-1.0-SNAPSHOT.jar
[INFO] ---> Running in f187a76322dd
[INFO] ---> 4600e0f4d83a
[INFO] Removing intermediate container f187a76322dd
[INFO] Successfully built 4600e0f4d83a
[INFO] --------------------------------------------------------------------------------
[INFO]
[INFO] Updating module [default]...
[INFO] Updating module [default].../
[INFO] Updating module [default]...failed.
[INFO] ERROR: (gcloud.preview.app.deploy) Error Response: [400] "env" setting is not supported for this deployment.
[INFO] Deleted [https://www.googleapis.com/compute/v1/projects/straw-hat-pirates-dev/zones/us-central1-f/instances/gae-builder-vm-20151223t054356].
[ERROR] Error: gcloud app command with exit code : 1
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:03 min
[INFO] Finished at: 2015-12-23T05:45:57+00:00
[INFO] Final Memory: 11M/56M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.google.appengine:gcloud-maven-plugin:2.0.9.88.v20151125:deploy (default-cli) on project jenkins-test-java: Error: gcloud app command exit code is: 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
Build step 'Execute shell' marked build as failure
Finished: FAILURE
I guess :
It seems like something wrong with my environment configuration.
I still cannot fix this problem.
Thank for your help. :)
I figured it out.
I'll bet your maven module is not setup with <packaging>war</packaging>
If your module is set to jar (default), then it tried to deploy as a standard java application where you are going to launch your own server. Since you want a managed vm with appengine running, you need to package as war, and then the plugin will take care of the rest.
Cheers.
I am trying to set up a local DBpedia Information Extraction Framework, but there seems to have some problems which I cannot deal with. I followed the instructions on the official site using Intelli J, it went well until I get to the final step that tells "select DBpedia dump extraction ->Plugins -> scala ->scala:run", the error message shows below:
D:\program\jdk\bin\java -Dmaven.home=D:\program\apache-maven-3.0.5 -Dclassworlds.conf=D:\program\apache-maven-3.0.5\bin\m2.conf -Didea.launcher.port=7534 "-Didea.launcher.bin.path=D:\program\IntelliJ IDEA Community Edition 12.1.3\bin" -Dfile.encoding=UTF-8 -classpath "D:\program\apache-maven-3.0.5\boot\plexus-classworlds-2.4.jar;D:\program\IntelliJ IDEA Community Edition 12.1.3\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain org.codehaus.classworlds.Launcher --fail-fast --strict-checksums org.scala-tools:maven-scala-plugin:2.15.2:run
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building DBpedia Dump Extraction 3.8
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-scala-plugin:2.15.2:run (default-cli) # dump >>>
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) # dump ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory E:\code\Scala\extraction_framework\dump\src\main\resources
[INFO]
[INFO] --- maven-scala-plugin:2.15.2:compile (process-resources) # dump ---
[INFO] Checking for multiple versions of scala
[INFO] includes = [**/*.scala,**/*.java,]
[INFO] excludes = []
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) # dump ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-scala-plugin:2.15.2:compile (compile) # dump ---
[INFO] Checking for multiple versions of scala
[INFO] includes = [**/*.scala,**/*.java,]
[INFO] excludes = []
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) # dump ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory E:\code\Scala\extraction_framework\dump\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) # dump ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-scala-plugin:2.15.2:testCompile (test-compile) # dump ---
[INFO] Checking for multiple versions of scala
[INFO] includes = [**/*.scala,**/*.java,]
[INFO] excludes = []
[WARNING] No source files found.
[INFO]
[INFO] org.dbpedia.extraction.dump.sql.Import
parsing \home\release\wikipedia\wikipedias.csv
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org_scala_tools_maven_executions.MainHelper.runMain(MainHelper.java:161)
at org_scala_tools_maven_executions.MainWithArgsInFile.main(MainWithArgsInFile.java:26)
Caused by: java.io.FileNotFoundException: \home\release\wikipedia\wikipedias.csv (ϵͳ�Ҳ���ָ����·����)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(FileInputStream.java:138)
at scala.io.Source$.fromFile(Source.scala:91)
at scala.io.Source$.fromFile(Source.scala:76)
at org.dbpedia.extraction.util.WikiInfo$.fromFile(WikiInfo.scala:26)
at org.dbpedia.extraction.util.ConfigUtils$.parseLanguages(ConfigUtils.scala:43)
at org.dbpedia.extraction.dump.sql.Import$.main(Import.scala:26)
at org.dbpedia.extraction.dump.sql.Import.main(Import.scala)
... 6 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.104s
[INFO] Finished at: Fri May 24 18:34:48 CST 2013
[INFO] Final Memory: 10M/175M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.scala-tools:maven-scala-plugin:2.15.2:run (default-cli) on project dump: wrap: org.apache.commons.exec.ExecuteException: Process exited with an error: -10000(Exit value: -10000) -> [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
Process finished with exit code 1
what should I do to fix it?
PS: I did it all on windows 7 OS, with intelli j 12 community version, maven 3 and jdk 7 installed. If any other info is needed, please let me know, thanks.
I have a maven web app build using Eclipse, and have this command: install tomcat:deploy set in the goal. When I build the app, I hit this error:
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...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building web4 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) # web4 ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/kokhoe/workspace/web4/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) # web4 ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) # web4 ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/kokhoe/workspace/web4/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) # web4 ---
[INFO] Not compiling test sources
[INFO]
[INFO] --- maven-surefire-plugin:2.10:test (default-test) # web4 ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-war-plugin:2.1.1:war (default-war) # web4 ---
[INFO] Packaging webapp
[INFO] Assembling webapp [web4] in [/home/kokhoe/workspace/web4/target/web4-0.0.1-SNAPSHOT]
[INFO] Processing war project
[INFO] Copying webapp resources [/home/kokhoe/workspace/web4/src/main/webapp]
[INFO] Webapp assembled in [71 msecs]
[INFO] Building war: /home/kokhoe/workspace/web4/target/web4-0.0.1-SNAPSHOT.war
[INFO] WEB-INF/web.xml already added, skipping
[INFO]
[INFO] --- maven-install-plugin:2.3.1:install (default-install) # web4 ---
[INFO] Installing /home/kokhoe/workspace/web4/target/web4-0.0.1-SNAPSHOT.war to /home/kokhoe/.m2/repository/org/huahsin/web4/0.0.1-SNAPSHOT/web4-0.0.1-SNAPSHOT.war
[INFO] Installing /home/kokhoe/workspace/web4/pom.xml to /home/kokhoe/.m2/repository/org/huahsin/web4/0.0.1-SNAPSHOT/web4-0.0.1-SNAPSHOT.pom
[INFO]
[INFO] >>> tomcat-maven-plugin:1.1:deploy (default-cli) # web4 >>>
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) # web4 ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/kokhoe/workspace/web4/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) # web4 ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) # web4 ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/kokhoe/workspace/web4/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) # web4 ---
[INFO] Not compiling test sources
[INFO]
[INFO] --- maven-surefire-plugin:2.10:test (default-test) # web4 ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-war-plugin:2.1.1:war (default-war) # web4 ---
[INFO] Packaging webapp
[INFO] Assembling webapp [web4] in [/home/kokhoe/workspace/web4/target/web4-0.0.1-SNAPSHOT]
[INFO] Processing war project
[INFO] Copying webapp resources [/home/kokhoe/workspace/web4/src/main/webapp]
[INFO] Webapp assembled in [14 msecs]
[INFO] Building war: /home/kokhoe/workspace/web4/target/web4-0.0.1-SNAPSHOT.war
[INFO] WEB-INF/web.xml already added, skipping
[INFO]
[INFO] <<< tomcat-maven-plugin:1.1:deploy (default-cli) # web4 <<<
[INFO]
[INFO] --- tomcat-maven-plugin:1.1:deploy (default-cli) # web4 ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.938s
[INFO] Finished at: Mon Sep 17 12:16:34 MYT 2012
[INFO] Final Memory: 18M/215M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:tomcat-maven-plugin:1.1:deploy (default-cli) on project web4: Cannot find context file: /home/kokhoe/workspace/web4/target/web4-0.0.1-SNAPSHOT/META-INF/context.xml -> [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
The error mention that context.xml is missing. May I know how this problem could be solve?
I have the problem solved by using this command in maven goal:
install tomcat:run