StreamingWordCount example maven compile time errors - maven

I am getting the following errors while running compiling the Google dataflow example on the cloud instance. I am trying to run the streaming example by the name of StreamingWordCount using the following command
mvn compile exec:java -Dexec.mainClass=com.google.cloud.dataflow.examples.complete.StreamingWordCount.java
Is there something that I am doing wrong?Any help is appreciated.
Thanks
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Google Cloud Dataflow Java Examples - All manual_build
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- build-helper-maven-plugin:1.10:add-source (add-java8-main-source) # google-cloud-dataflow-java-examples-all ---
[INFO] Source directory: /home/gaurav_bareja/pipeline/DataflowJavaSDK-examples/src/main/java8 added.
[INFO]
[INFO] --- build-helper-maven-plugin:1.10:add-test-source (add-java8-test-source) # google-cloud-dataflow-java-exam
ples-all ---
[INFO] Test Source directory: /home/gaurav_bareja/pipeline/DataflowJavaSDK-examples/src/test/java8 added.
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # google-cloud-dataflow-java-examples-all ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/gaurav_bareja/pipeline/DataflowJavaSDK-examples/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # google-cloud-dataflow-java-examples-all ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (java8-compile) # google-cloud-dataflow-java-examples-all ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] >>> exec-maven-plugin:1.1:java (default-cli) > validate # google-cloud-dataflow-java-examples-all >>>
[INFO]
[INFO] <<< exec-maven-plugin:1.1:java (default-cli) < validate # google-cloud-dataflow-java-examples-all <<<
[INFO]
[INFO] --- exec-maven-plugin:1.1:java (default-cli) # google-cloud-dataflow-java-examples-all ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.496 s
[INFO] Finished at: 2016-03-19T13:23:56+00:00
[INFO] Final Memory: 15M/56M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.1:java (default-cli) on project google-cloud-d
ataflow-java-examples-all: An exception occured while executing the Java class. com.google.cloud.dataflow.examples.
complete.StreamingWordCount.java -> [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/MojoExecution
Exception

You seem to be attempting to run the StreamingWordCount example that comes with the Google Cloud Dataflow SDK for Java. The example under that name doesn't exist -- hence, the exception you are seeing.
You likely want to run WindowedWordCount instead, an example that shows how to run the same pipeline over either unbounded PCollections in the streaming mode or bounded PCollections in the batch mode.
Please follow the instructions here.

Related

Problem getting maven plugin from jfrog artifactory

I'm trying to get an old maven project connected to private artifactory to download plugins when building. I'm sitting in a coporate network (using vpn), using a jfrog artifactory.
"mvn clean install -U" returns:
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] ProjektYXZ - parent POM [pom]
[INFO] ProjektYXZ - main POM [pom]
[INFO]
[INFO] ---------------------< com.*:mvn-project >----------------------
[INFO] Building ProjektYXZ - parent POM 1.14.0-SNAPSHOT [1/2]
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # mvn-project ---
[INFO] Deleting **mvn-project\target
[INFO]
[INFO] >>> maven-source-plugin:3.0.1:jar (attach-sources) > generate-sources # mvn-project >>>
[INFO]
[INFO] <<< maven-source-plugin:3.0.1:jar (attach-sources) < generate-sources # mvn-project <<<
[INFO]
[INFO]
[INFO] --- maven-source-plugin:3.0.1:jar (attach-sources) # mvn-project ---
[INFO]
[INFO] --- maven-javadoc-plugin:3.0.1:jar (attach-javadocs) # mvn-project ---
[INFO] Not executing Javadoc as the project is not a Java classpath-capable package
[INFO]
[INFO] --- maven-checkstyle-plugin:3.0.0:check (default) # mvn-project ---
[INFO]
[INFO] >>> spotbugs-maven-plugin:3.1.11:check (default) > :spotbugs # mvn-project >>>
[INFO]
[INFO] --- spotbugs-maven-plugin:3.1.11:spotbugs (spotbugs) # mvn-project ---
[INFO]
[INFO] <<< spotbugs-maven-plugin:3.1.11:check (default) < :spotbugs # mvn-project <<<
[INFO]
[INFO]
[INFO] --- spotbugs-maven-plugin:3.1.11:check (default) # mvn-project ---
[INFO]
[INFO] >>> maven-pmd-plugin:3.11.0:check (default) > :pmd # mvn-project >>>
[INFO]
[INFO] --- maven-pmd-plugin:3.11.0:pmd (pmd) # mvn-project ---
[INFO]
[INFO] <<< maven-pmd-plugin:3.11.0:check (default) < :pmd # mvn-project <<<
[INFO]
[INFO]
[INFO] --- maven-pmd-plugin:3.11.0:check (default) # mvn-project ---
[INFO]
[INFO] --- plugin:1.4.1:enforce (default) # mvn-project ---
Downloading from central-mirror: https://artifactory.*.de/artifactory/maven/**/*-1.0.2.pom
Downloading from company-releases: https://artifactory.**.de/artifactory/**/1.0.2/*-1.0.2.pom
[WARNING] The POM for com.**:jar:1.0.2 is missing, no dependency information available
Downloading from central-mirror: https://artifactory.**.de/artifactory/maven/**/*-1.0.2.jar
Downloading from company-releases: https://artifactory.**.de/artifactory/**/*-1.0.2.jar
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for ProjektYXZ - main POM 1.14.0-SNAPSHOT:
[INFO]
[INFO] ProjektYXZ - parent POM .................................. FAILURE [ 7.645 s]
[INFO] ProjektYXZ - main POM .................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.826 s
[INFO] Finished at: 2022-04-12T10:18:02+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:plugin:1.4.1:enforce (default) on project mvn-project: Execution default of goal org.apache.maven.plugins:plugin:1.4.1:enforce failed: Plugin org.apache.maven.plugins:plugin:1.4.1 or one of its dependencies could not be resolved: Could not find artifact com.**:jar:1.0.2 in central-mirror (https://artifactory.**.de/artifactory/maven) -> [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
in the line:
Downloading from company-releases: https://artifactory.**.de/artifactory/**/1.0.2/*-1.0.2.pom
maven looks at the correct place. I'm able to download it with curl:
curl -u username:password -X GET "https://artifactory.**.de/artifactory/**/1.0.2/*-1.0.2.pom"
but if I paste that path into Chrome, I get an 404 Error.
I also configured the settings.xml in my C:/Users/Username/.m2/ folder:
<server>
<id>company-releases</id>
<username>my_username</username>
<password>my_password</password>
</server>
I also checked the possible errors of the Link shown at the bottom of the log, but as I'm able to "curl" it these don't seem to be the reasons. Currently I'm out of ideas. I hope you can help me :) Please tell me if you need to see additional sources.
okay, the solution was to set preemptive authentification in settings.xml:
for example:
<server>
<username>*****</username>
<password>*****</password>
<id>central</id>
<configuration>
<httpConfiguration>
<all>
<usePreemptive>true</usePreemptive>
</all>
</httpConfiguration>
</configuration>
</server>
Explanation: maven first tries to request without authentification. If the Repo is private (this means that without authentification, artifacts are hidden), jfrog artifactory responses with 404 instead of unauthenticated. After 404 maven doesn't try again, but sees it as failed.
For more details see: https://jfrog.com/knowledge-base/why-does-my-maven-builds-are-failing-with-a-404-error-when-hide-existence-of-unauthorized-resources-is-enabled/

Failed to build quarkus application: java.lang.IllegalArgumentException: key can't be empty -> [Help 1]

I try to mvn clean install the quarkus project , and it shows the error down blow .
it says the key can't be empty .and what is the key ? where can i set it ?
my maven is 3.6.3 version
and my quarkus is 1.10.1.Final
"C:\Program Files\Java\jdk-14.0.2\bin\java.exe" -Dmaven.multiModuleProjectDirectory=D:\code\au\aws-lambda-dispatcher -Dmaven.home=D:\env\apache-maven-3.6.3 -Dclassworlds.conf=D:\env\apache-maven-3.6.3\bin\m2.conf "-Dmaven.ext.class.path=C:\Program Files\JetBrains\IntelliJ IDEA 2020.2.3\plugins\maven\lib\maven-event-listener.jar" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2020.2.3\lib\idea_rt.jar=65151:C:\Program Files\JetBrains\IntelliJ IDEA 2020.2.3\bin" -Dfile.encoding=UTF-8 #C:\Users\Administrator\AppData\Local\Temp\idea_arg_file1409729559 org.codehaus.classworlds.Launcher -Didea.version=2020.2.3 -s D:\env\apache-maven-3.6.3\conf\settings.xml -Dmaven.repo.local=D:\env\apache-maven-3.6.3\resp clean install
[INFO] Scanning for projects...
[INFO]
[INFO] -----------------< com.vitalgateway.lambda:dispatcher >-----------------
[INFO] Building dispatcher 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # dispatcher ---
[INFO] Deleting D:\code\au\aws-lambda-dispatcher\target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # dispatcher ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) # dispatcher ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 10 source files to D:\code\au\aws-lambda-dispatcher\target\classes
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # dispatcher ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) # dispatcher ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to D:\code\au\aws-lambda-dispatcher\target\test-classes
[INFO]
[INFO] --- maven-surefire-plugin:3.0.0-M5:test (default-test) # dispatcher ---
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) # dispatcher ---
[INFO] Building jar: D:\code\au\aws-lambda-dispatcher\target\dispatcher-1.0-SNAPSHOT.jar
[INFO]
[INFO] --- quarkus-maven-plugin:1.10.1.Final:build (default) # dispatcher ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.724 s
[INFO] Finished at: 2020-11-29T12:40:37+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:1.10.1.Final:build (default) on project dispatcher: Failed to build quarkus application: java.lang.IllegalArgumentException: key can't be empty -> [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
I got this error when I accidentally used the following construct.
#ConfigProperty(name = "")
Avoid using empty names for properties.

Maven Deploy Command

Here I just tried to deploy my simple maven project to git hub.I added some more plugins for deploying.I can compile,and package that.While deploying still i'm facing some errors.Please help me to resolve this.Can you give any idea for deploy a maven project from eclipse.
C:\MavApp\MavDep>mvn clean deploy
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building MavDep 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # MavDep ---
[INFO] Deleting C:\MavApp\MavDep\target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # MavDep ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\MavApp\MavDep\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # MavDep ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to C:\MavApp\MavDep\target\classes
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # MavDep ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\MavApp\MavDep\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) # MavDep ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to C:\MavApp\MavDep\target\test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) # MavDep ---
[INFO] Surefire report directory: C:\MavApp\MavDep\target\surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running com.MavDep.AppTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.015 sec
Results :
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) # MavDep ---
[INFO] Building jar: C:\MavApp\MavDep\target\MavDep-1.0-SNAPSHOT.jar
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) # MavDep ---
[INFO] Installing C:\MavApp\MavDep\target\MavDep-1.0-SNAPSHOT.jar to C:\Users\mstemp 401\.m2\repository\com\MavDep\MavDep\1.0-SNAPSHOT\MavDep-1.0-SNAPSHOT.jar
[INFO] Installing C:\MavApp\MavDep\pom.xml to C:\Users\mstemp 401\.m2\repository\com\MavDep\MavDep\1.0-SNAPSHOT\MavDep-1.0-SNAPSHOT.pom
[INFO]
[INFO] --- maven-deploy-plugin:2.7:deploy (default-deploy) # MavDep ---
Downloading: file://C:\MavApp\MavDep\target/mvn-repo/com/MavDep/MavDep/1.0-SNAPSHOT/maven-metadata.xml
Uploading: file://C:\MavApp\MavDep\target/mvn-repo/com/MavDep/MavDep/1.0-SNAPSHOT/MavDep-1.0-20170412.080139-1.jar
Uploaded: file://C:\MavApp\MavDep\target/mvn-repo/com/MavDep/MavDep/1.0-SNAPSHOT/MavDep-1.0-20170412.080139-1.jar (3 KB at 78.8 KB/sec)
Uploading: file://C:\MavApp\MavDep\target/mvn-repo/com/MavDep/MavDep/1.0-SNAPSHOT/MavDep-1.0-20170412.080139-1.pom
Uploaded: file://C:\MavApp\MavDep\target/mvn-repo/com/MavDep/MavDep/1.0-SNAPSHOT/MavDep-1.0-20170412.080139-1.pom (2 KB at 121.9 KB/sec)
Downloading: file://C:\MavApp\MavDep\target/mvn-repo/com/MavDep/MavDep/maven-metadata.xml
Uploading: file://C:\MavApp\MavDep\target/mvn-repo/com/MavDep/MavDep/1.0-SNAPSHOT/maven-metadata.xml
Uploaded: file://C:\MavApp\MavDep\target/mvn-repo/com/MavDep/MavDep/1.0-SNAPSHOT/maven-metadata.xml (760 B at 23.2 KB/sec)
Uploading: file://C:\MavApp\MavDep\target/mvn-repo/com/MavDep/MavDep/maven-metadata.xml
Uploaded: file://C:\MavApp\MavDep\target/mvn-repo/com/MavDep/MavDep/maven-metadata.xml (274 B at 17.8 KB/sec)
[INFO]
[INFO] --- site-maven-plugin:0.11:site (default) # MavDep ---
[INFO] Creating 12 blobs
[INFO] Creating tree with 12 blob entries
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 15.161 s
[INFO] Finished at: 2017-04-12T13:31:51+05:30
[INFO] Final Memory: 19M/160M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.github:site-maven-plugin:0.11:site (default) on project MavDep: Error creating commit: Invalid request.
[ERROR]
[ERROR] For 'properties/name', nil is not a string.
[ERROR] For 'properties/name', nil is not a string. (422)
[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/MojoExecutionException
It seems that in your maven properties the name is incorrect. Check your pom.xml file.
If this is not the case, try running it with the -e switch on

Running Hadoop Wordcount Job Error

I am new to using Hadoop, and I am currently trying to run wordcount on a single node cluster on my ubuntu desktop. I am trying to follow this guide to run the hadoop job:
http://javabeginnerstutorial.com/hadoop/your-first-hadoop-map-reduce-job/
Currently I am stuck on step 3, when I try to mvn clean install, this is the error I receive. I am using the exact same pom.xml file that is linked on step 3. Was I supposed to edit something in the pom.xml file in order to successfully compile? Or do the links possibly not work? Any help would be great. Thanks.
hduser#venus:~/development/Hadoop_projects/word_count$ mvn clean install
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.impetus.code:hadoop-examples:jar:1.0
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. # line 38, 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 hadoop-examples 1.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # hadoop-examples ---
[INFO]
[INFO] --- maven-resources-plugin:2.3:resources (default-resources) # hadoop-examples ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /home/hduser/development/Hadoop_projects/word_count/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.0.2:compile (default-compile) # hadoop-examples ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.3:testResources (default-testResources) # hadoop-examples ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /home/hduser/development/Hadoop_projects/word_count/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.0.2:testCompile (default-testCompile) # hadoop-examples ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.10:test (default-test) # hadoop-examples ---
[INFO] No tests to run.
[INFO] Surefire report directory: /home/hduser/development/Hadoop_projects/word_count/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.874s
[INFO] Finished at: Wed Jul 15 00:34:04 PDT 2015
[INFO] Final Memory: 7M/240M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.10:test (default-test) on project hadoop-examples: Error creating properties files for forking; nested exception is java.io.IOException: No such file or directory -> [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
Try to get the pom and maven dependice from this http://mvnrepository.com/artifact/org.apache.hadoop/hadoop-mapreduce-client-core
Try to check the hadoop version before adding this pom file.
Run the maven command with -DskipTests

Maven gives MojoExecutionException when Maven install

I am trying to install a Maven project, I am getting the following error message.
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 mail maven webapp 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) # mail ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 5 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.0:compile (default-compile) # mail ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 13 source files to C:\Users\gk\workspace-juno\mail\target\classes
[INFO]
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) # mail
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.0:testCompile (default-testCompile) # mail ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 2 source files to C:\Users\gk\workspace-juno\mail\target\test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.13:test (default-test) # mail ---
[INFO] Surefire report directory: C:\Users\gk\workspace-juno\mail\target\surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running TestSuite
Configuring TestNG with: TestNG652Configurator
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.684 sec
Results :
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] --- maven-war-plugin:2.3:war (default-war) # mail ---
[INFO] Packaging webapp
[INFO] Assembling webapp [mail] in [C:\Users\gk\workspace-juno\mail\target\mail-1.0-SNAPSHOT]
[INFO] Processing war project
[INFO] Copying webapp resources [C:\Users\gk\workspace-juno\mail\src\main\webapp]
[INFO] Webapp assembled in [895 msecs]
[INFO] Building war: C:\Users\gk\workspace-juno\mail\target\mail.war
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.398s
[INFO] Finished at: Mon May 20 12:28:45 IST 2013
[INFO] Final Memory: 15M/35M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.3:war (default-war) on project mail: Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode) -> [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
Please help me in resolving this issue.
This error is self explainable:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.3:war (default-war) on project mail: Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode) -> [Help 1]
It says that you either need to have a "web.xml" file pre-existing in "WEB-INF" directory, or specify its location explicitly using a "webxml" parameter in the pom.xml or command line.

Resources