MAVEN Error assembling WAR : webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode) -> [Help 1]

I try to assemble war using maven and I get :

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 13.761s
[INFO] Finished at: Tue Apr 09 02:46:52 GST 2013
[INFO] Final Memory: 6M/18M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.1.1:war (default-war) on project RegMaster: Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.1.1:war (default-war) on project RegMaster: Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
    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.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode)
    at org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java:175)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
    ... 19 more
Caused by: org.codehaus.plexus.archiver.ArchiverException: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode)
    at org.codehaus.plexus.archiver.war.WarArchiver.initZipOutputStream(WarArchiver.java:149)
    at org.codehaus.plexus.archiver.zip.AbstractZipArchiver.createArchiveMain(AbstractZipArchiver.java:346)
    at org.codehaus.plexus.archiver.zip.AbstractZipArchiver.execute(AbstractZipArchiver.java:250)
    at org.codehaus.plexus.archiver.AbstractArchiver.createArchive(AbstractArchiver.java:871)
    at org.apache.maven.archiver.MavenArchiver.createArchive(MavenArchiver.java:543)
    at org.apache.maven.plugin.war.WarMojo.performPackaging(WarMojo.java:225)
    at org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java:159)
    ... 21 more
[ERROR]
[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

solution is :

1
2
3
4
5
6
7
<plugin>            
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-war-plugin</artifactId>
  <configuration>
    <webXml>src\main\webapp\WEB-INF\web.xml</webXml>        
  </configuration>
</plugin

Eclipse templates

newmap
Java statement
Yes
Creates a new java.util.Map of the type java.util.HashMap

1
2
3
${:import(java.util.Map, java.util.HashMap)}
Map<${key}, ${value}> ${mapname} = new HashMap<${key}, ${value}>();
${cursor}

newlist
Java statement
Yes
Creates a new java.util.List of the type java.util.ArrayList

1
2
3
 ${:import(java.util.List, java.util.ArrayList)}
List<${type}> ${listname} = new ArrayList<${type}>();
${cursor}

newset
Java statement
Yes
Creates a new java.util.Set of the type java.util.HashSet

1
2
3
${:import(java.util.Set, java.util.HashSet)}
Set<${type}> ${setname} = new HashSet<${type}>();
${cursor}

ECLIPSE.INI sample, example

Here is my last eclipse.ini example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
-vm
C:/Program Files/Java/jdk1.6.0_29/bin/javaw.exe
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20120522-1813
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
512M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
512m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Dhelp.lucene.tokenizer=standard
-Xms512m
-Xmx3048m
-XX:+UseParallelGC
-XX:PermSize=256M
-XX:MaxPermSize=512M

ECLIPSE JAVA HOT KEYS

– – – – – – – – – – – – – – – – – –
^+SHIFT+P – new package
^+SHIFT+C – new class
^+SHIFT+I – new Interface
^+SHIFT+S – new Servlet ~ REDEFINE this combination!
– – – – – – – – – – – – – – – – – –
CTRL+SHIFT+ALT+S – SAVE ALL (ReDefine)
– – – – – – – – – – – – – – – – – –
^+ALT+S – new Source
^+ALT+E – new Enum
^+ALT+T – new JUnit Test Case
– – – – – – – – – – – – – – – – – –
Java > Code Style > Code Templates
Add to Code > Class body this :
//——[ PRIVATE ]——
private static Logger LOGSTORE = LoggerFactory.getLogger( ${type_name}.class );
– – – – – – – – – – – – – – – – – –
WINDOWS HOT KEYZ :
^+SHIFT+L – Monitor OFF
SHIFT+ESC – Minimize CURRENT window
SHIFT+F7 – File search
^+ALT+Q – windows Calculator
WIN+SHIFT+DEL – HIBERNATE OS

– – – – – – – – – – – – – – – – – –

Java > Code Style > Code Templates
Add to Comments > Files :

1
2
3
4
5
6
7
8
9
10
11
12
13
14
/**
 * Copyright ${year}. ABN Software. All Rights reserved.<br>
 *<br>
 * Homepage .... http://www.ABNsoft.info<br>
 *<br>
 * Project ..... ${project_name}<br>
 * Package ..... ${package_name}<br>
 * File name ... ${file_name}<br>
 *<br>
 * Author ...... ${user}<br>
 * Created ..... ${date} ${time}<br>
 * <br>
 * $$Source$$
 */

–//– > Fields

1
2
3
/**
 * ${field} ${field_type} ${file_name}
 */

–//– > Constructors

1
2
3
4
/**
 * Constructor.
 * ${tags}
 */