Monday, October 21, 2013

Create web project using maven plugin and set the facets...


  <!-- Allows to create an eclipse project with mvn eclipse:clean eclipse:eclipse -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-eclipse-plugin</artifactId>
                <version>2.9</version>
                <configuration>
                    <wtpversion>2.0</wtpversion>
                    <downloadSources>true</downloadSources>
                    <downloadJavadocs>true</downloadJavadocs>

                    <additionalProjectFacets>
                        <jst.jaxrs>1.1</jst.jaxrs>
                        <jst.jstl>1.2</jst.jstl>
                        <jst.web>3.0</jst.web>
                    </additionalProjectFacets>

                    <!-- Set Eclipse project to UTF-8 (if you use eclipse) -->
                    <additionalConfig>
                        <file>
                            <name>.settings/org.eclipse.core.resources.prefs</name>
                            <content>
                                <![CDATA[eclipse.preferences.version=1${line.separator}encoding/<project>=${project.build.sourceEncoding}${line.separator}]]>
                            </content>
                        </file>
                    </additionalConfig>

                </configuration>
            </plugin>