You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Leo L <le...@gmail.com> on 2006/05/22 21:23:21 UTC

Re: [M2] Can´t find web.xml - Fixed for who is interested and one more doubt

Hi... I get!!!!!!

My pom.xml seemed like that now....

 </project>
...
<build>
    <sourceDirectory>${basedir}\src</sourceDirectory>
    <directory>target</directory>
    <outputDirectory>target/classes</outputDirectory>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <configuration>
           <warSourceDirectory>WebRoot</warSourceDirectory>
        </configuration>
      </plugin>
      ...
    </plugins>
  </build>
....
</project>


The only thing that I must do now, is How to get the sources ( *.java) to
my  web.war.
When maven package the war it puts all my sources with (*.java) and I need
only the  *.class in my war.

Any clue how do i get this???

Regards

Leo


2006/5/22, Mike Perham <Mi...@webifysolutions.com>:
>
> Your warSourceDirectory should be "WebRoot", not
> "${basedir}\src".  Directories should be specified with forward slashes and
> there is no need to prefix them with basedir.  The plugin should handle
> relative paths for you.
>
> -----Original Message-----
> From: Leo L [mailto:leo.maven@gmail.com]
> Sent: Monday, May 22, 2006 12:00 PM
> To: Maven Users List
> Subject: [M2] Can´t find web.xml
>
> >
> >  Hi!
> >  I have a project that i want to package the EAR with maven.
> >
>    My App.´s  structure look like this
>
> >  - Project
> >        |
> >        |___ ejb
> >        |___ components
> >        |___ web
> >                      |__ src
> >                      |__ webRoot
> >                      |              |__ WEB-INF
> >                      |              |               |__ my configuration
> > files like web.xml that the maven looking for...
> >                      |              |
> >                      |              | ___ my .jsps
> >
>                        |
>                        |__ pom.xml
>
>
> >
> > When i run mvn install  i get a build error : Error Assembling WAR:
> >
>    It can´t find web.xml
>    My pom.xml is like this:
> <project>
> ....
> <build>
>    <plugins>
>      <plugin>
>        <groupId>org.apache.maven.plugins</groupId>
>        <artifactId>maven-war-plugin</artifactId>
>        <executions>
>          <execution>
>            <goals>
>              <goal>war</goal>
>            </goals>
>            <configuration>
>              <warSourceDirectory>${basedir}\src</warSourceDirectory>
>              <webResources>
>                <resource>
>                  <directory>${basedir}\WebRoot</directory>
>                  <filtering>true</filtering>
>                  <includes>
>                    <include>**/*.xml</include>
>                  </includes>
>                </resource>
>              </webResources>
>            </configuration>
>           </execution>
>        </executions>
>      </plugin>
> ...
>   </plugins>
> </build>
> ...
> </project>
>
>
>
>    Any clue???
>
>
> >  Regards
> > Leo
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>