Hello

I am trying to use myfaces-example-simple20-1.1.10.war pom.xml file that
comes with the application

I am trying to deploy the application in WebSphere 7

I am able to deploy it but when I am going to open the apps in the browser I
get an error asking me for this in the applicastion web.xml :

Add the following lines to your web.xml file to work around this issue :
<listener>
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
</listener>

I unpacked the war file and updated its web.xml ...

But when I try to recreate a new war I get the following error :


[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Error assembling WAR: webxml attribute is required (or pre-existing
WEB-INF/web.xml if executing in update mode)

[INFO]
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error assembling
WAR: webxml attribute is required (or pre-existing WEB-INF/web
.xml if executing in update mode)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:584)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:513)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:483)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:331)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:292)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:345)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:132)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:290)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
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:159)
        at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:454)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
        ... 16 more
Caused by: org.codehaus.plexus.archiver.ArchiverException: webxml attribute
is required (or pre-existing WEB-INF/web.xml if executing i
n update mode)


I have tried this the pom.xml :


            <plugin>
                <artifactId>maven-source-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-source</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <webxml>WebContent/WEB-INF/web.xml</webxml> **** added
this line ****
                </configuration>
            </plugin>

            ....

            <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>dependency-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>unpack-source</id>
                                <phase>process-resources</phase>
                                <goals>
                                    <goal>unpack</goal>
                                </goals>
                                <configuration>
                                    <artifactItems>
                                        <artifactItem>

<groupId>org.apache.myfaces.tomahawk</groupId>

<artifactId>${artifactId}</artifactId>

<version>${project.version}</version>
                                            <classifier>sources</classifier>
                                        </artifactItem>
                                        <artifactItem>

<groupId>org.apache.myfaces.tomahawk</groupId>

<artifactId>tomahawk</artifactId>

<version>${project.version}</version>
                                            <classifier>sources</classifier>
                                        </artifactItem>
                                    </artifactItems>

<outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/src</outputDirectory>

<webXml>WebContent/WEB-INF/web.xml</webXml> **** added this line ****
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>


But I still get the same error

My maven version is 2.0.11

Can some one help me out with this please ?

Thks&Regards
Erico

Reply via email to