I have just gone through the same exercise and can probably help.

The 2 webapp issues I had, were that the web.xml file was not in the correct 
location, and that we needed to do filtering on different config files for 
prod/dev environments.

Our structure is

/src/java -for code
/src/test - test classes
/src/ws - generated webservice stubs
/src/conf/web - for web.xml and filterable files
/webapp for webpp

The interesting bits of my pom file are:

  <build>
    <sourceDirectory>src/java</sourceDirectory>
    <testSourceDirectory>src/test</testSourceDirectory>
    <finalName>admin</finalName>
    <filters>
      <filter>src/filters/filter-${env}.properties</filter>
    </filters>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-war-plugin</artifactId>
            <configuration>
                <warSourceDirectory>webapp</warSourceDirectory>
                <webResources>
                        <webResource>
                                <directory>
                                        ${basedir}/src/conf/web
                                </directory>
                                <filtering>true</filtering>
                        </webResource>
                </webResources>
            </configuration>
        </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>add-source</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>add-source</goal>
            </goals>
            <configuration>
              <sources>
                <source>src/ws</source>
              </sources>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

I'm still trying to work out how to compile the JSP's, I want to do this to 
ensure that the will compile, not compile for release reasons.

Let me know if you have any other questions.

Steve

----- Original Message ----
From: Kram <[EMAIL PROTECTED]>
To: [email protected]
Sent: Tuesday, 25 September, 2007 10:29:38 AM
Subject: Maven custom project directory


Hello Maven users,

I have a somewhat large project that needs Maven 2 implementation, and the
problem is that it does not follow the standard Maven directory structure. I
know that it should, and I also understand the reasons why. But sadly we
just can do it, mainly because we would loose all our years of source
control history in CVS...

(Its a web app by the way)

I can get it to build ok using the dependencies, but I just dont understand
how to make the war file correctly using a custom directory structure, I
have looked in Maven books and the website, but there really isnt much more
information than "use the <build> tag in your POM for custom directory
structures". If any one has had any experience with this, i would love to
hear it!!

Any help is greatly appreciated!

Mark
-- 
View this message in context: 
http://www.nabble.com/Maven-custom-project-directory-tf4512616s177.html#a12871061
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






      Sick of deleting your inbox? Yahoo!7 Mail has free unlimited storage.
http://au.docs.yahoo.com/mail/unlimitedstorage.html



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to