LCHCAPITALHUMAIN / maven-gaelyk

Automatically exported from code.google.com/p/maven-gaelyk
0 stars 0 forks source link

Patch: Use maven configuration to relocate the webapp directory #2

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
By default the webapp root is buried in src/main/webapp

To move it to a subdirectory of the project root, add these lines to the 
<plugins> section of your 
pom.xml:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-war-plugin</artifactId>
    <configuration>
    <!-- 4.8. Specify the location of Web Application directory (if non-standard). -->
    <!-- Defailt is: ${basedir}/src/main/webapp -->
        <warSourceDirectory>webapp</warSourceDirectory>
    </configuration>
</plugin>

Not everyone will want to do this, but it does make the project look more like 
a standard Gaelyk (or even 
Grails) project.

Original issue reported on code.google.com by msgilli...@gmail.com on 31 May 2010 at 10:41

GoogleCodeExporter commented 9 years ago
I am hesitant to do this for 2 reasons:
1. It isn't the standard maven way to do things.
2. I use groovy and java files in my project which go in the src/main/java or 
src/main/groovy folder and unit tests that go in the src/test/* folder.

However, I do plan on releasing a more elaborate plugin with the groovy plugin 
installed to compile the groovy classes.  At that point, we could simplify this 
template.  Right now you can create a java folder and those classes will be 
compiled and made available to the Gaelyk application.

Original comment by scottlan...@msn.com on 12 Aug 2010 at 1:53

GoogleCodeExporter commented 9 years ago
You can still use src/* for other things.  But it's really a choice between the 
standard Maven way or the standard gaelyk/grails way.  I prefer the later, but 
understand you might want to go with the Maven default.  At the very least 
making the above pom.xml change should be supported and documented.

Original comment by msgilli...@gmail.com on 12 Aug 2010 at 4:26