archetype-resources.pom.xml Maven / Gradle / Ivy
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>${groupId}</groupId> <artifactId>${artifactId}</artifactId> <packaging>war</packaging> <version>${version}</version> <name>${artifactId}</name> <url>http://maven.apache.org/</url> <profiles> <profile> <id>production</id> <activation> <property> <name>env.MAVEN_WORKING_MODE</name> <value>production</value> </property> </activation> <properties> <env>production</env> <env.db.environment>production</env.db.environment> </properties> </profile> <profile> <id>development-unix</id> <activation> <activeByDefault>true</activeByDefault> <property> <name>env.MAVEN_WORKING_MODE</name> <value>development-unix</value> </property> </activation> <properties> <env>development-unix</env> <env.db.environment>develop</env.db.environment> </properties> </profile> <profile> <id>ci</id> <properties> <env>ci</env> </properties> </profile> <profile> <id>standalone</id> <activation> <property> <name>env.MAVEN_WORKING_MODE</name> <value>standalone</value> </property> </activation> <properties> <env>standalone</env> <env.db.environment>production</env.db.environment> </properties> </profile> <profile> <id>development-windows</id> <activation> <os> <family>windows</family> </os> </activation> <properties> <env>development-windows</env> <env.db.environment>develop</env.db.environment> </properties> </profile> <!-- Added for jboss --> <profile> <id>production-jboss</id> <activation> <property> <name>env.MAVEN_WORKING_MODE</name> <value>production-jboss</value> </property> </activation> <properties> <env>production-jboss</env> <env.db.environment>production</env.db.environment> <jboss>jboss</jboss> </properties> </profile> </profiles> <properties> <!-- <test.database.driver>org.postgresql.Driver</test.database.driver> <test.database.hostname>localhost</test.database.hostname> <test.database.port>5432</test.database.port> <test.database.username>agile</test.database.username> <test.database.password>agile</test.database.password> <test.database.port.url>jdbc:postgresql://${test.database.hostname}:${test.database.port}/${project.artifactId}testPort</test.database.port.url> <test.database.serv.url>jdbc:postgresql://${test.database.hostname}:${test.database.port}/${project.artifactId}testServ</test.database.serv.url> --> <!-- <test.database.driver>com.mysql.jdbc.Driver</test.database.driver> <test.database.hostname>localhost</test.database.hostname> <test.database.port>3306</test.database.port> <test.database.username>root</test.database.username> <test.database.password>agile</test.database.password> <test.database.port.url>jdbc:mysql://${test.database.hostname}:${test.database.port}/${project.artifactId}testPort</test.database.port.url> <test.database.serv.url>jdbc:mysql://${test.database.hostname}:${test.database.port}/${project.artifactId}testServ</test.database.serv.url> --> <test.database.driver>org.apache.derby.jdbc.EmbeddedDriver</test.database.driver> <test.database.hostname>localhost</test.database.hostname> <test.database.port>1527</test.database.port> <test.database.username>agile</test.database.username> <test.database.password>agile</test.database.password> <test.database.port.url>jdbc:derby:${project.build.directory}/test/db/${project.artifactId}testPort;create=true</test.database.port.url> <test.database.serv.url>jdbc:derby:${project.build.directory}/test/db/${project.artifactId}testServ;create=true</test.database.serv.url> <skipDerby>true</skipDerby> <skipStandalone>true</skipStandalone> <entando.version>4.3.2</entando.version> <spring.version>4.1.6.RELEASE</spring.version> <struts2.version>2.5.10.1</struts2.version> <cxf.version>2.7.14</cxf.version> </properties> <build> <finalName>${artifactId}</finalName> <resources> <resource> <directory>src/main/resources</directory> </resource> <resource> <directory>src/main/java</directory> <includes> <include>**/*.properties</include> <include>**/*.xml</include> <include>**/*.xsd</include> </includes> </resource> <resource> <directory>src/main/tld</directory> <targetPath>META-INF</targetPath> <includes> <include>**/*.tld</include> </includes> </resource> </resources> <filters> <filter>src/main/filters/filter-${env}.properties</filter> </filters> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> <version>1.0-beta-1</version> <executions> <execution> <id>enforce-versions</id> <goals> <goal>enforce</goal> </goals> <configuration> <rules> <requireMavenVersion> <version>2.2.1</version> </requireMavenVersion> <requireJavaVersion> <version>1.6</version> </requireJavaVersion> </rules> </configuration> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.4</version> <configuration> <target>1.7</target> <source>1.7</source> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <version>2.8</version><!--$NO-MVN-MAN-VER$ --> <dependencies> <dependency> <groupId>org.codehaus.plexus</groupId> <artifactId>plexus-archiver</artifactId> <version>2.4.1</version> </dependency> </dependencies> <executions> <execution> <id>unpack-dependencies-jsp-frontend-core-webapp</id> <phase>initialize</phase> <goals> <goal>unpack</goal> </goals> <configuration> <skip>${core-webapp-cant-overwrite}</skip> <verbose>true</verbose> <overWriteReleases>false</overWriteReleases> <overWriteSnapshots>false</overWriteSnapshots> <overWriteIfNewer>false</overWriteIfNewer> <artifactItems> <artifactItem> <groupId>org.entando.entando</groupId> <artifactId>entando-admin-console</artifactId> <type>war</type> <outputDirectory>src/main/webapp</outputDirectory> <overWrite>false</overWrite> </artifactItem> </artifactItems> <includes>WEB-INF/aps/jsp/internalservlet/api/**/*.jsp</includes> </configuration> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> <version>2.5</version> <executions> <execution> <id>prepare-config-test-override-config</id> <phase>process-test-classes</phase> <goals> <goal>copy-resources</goal> </goals> <configuration> <outputDirectory>${project.build.directory}/test/conf</outputDirectory> <encoding>UTF-8</encoding> <overwrite>true</overwrite> <resources> <resource> <directory>src/test/config/conf</directory> <filtering>true</filtering> </resource> </resources> </configuration> </execution> <execution> <id>copy-resources-conf</id> <phase>validate</phase> <goals> <goal>copy-resources</goal> </goals> <configuration> <outputDirectory>src/main/webapp/WEB-INF/conf</outputDirectory> <encoding>UTF-8</encoding> <resources> <resource> <directory>src/main/config</directory> <includes> <include>systemParams.properties</include> <include>security.properties</include> </includes> <filtering>true</filtering> </resource> </resources> </configuration> </execution> <execution> <id>copy-resources-conf-jboss</id> <phase>validate</phase> <goals> <goal>copy-resources</goal> </goals> <configuration> <outputDirectory>src/main/webapp/WEB-INF/conf</outputDirectory> <encoding>UTF-8</encoding> <overwrite>true</overwrite> <resources> <resource> <directory>src/main/config/${jboss}</directory> <includes> <include>systemParams.properties</include> </includes> <filtering>true</filtering> </resource> <resource> <directory>src/main/config</directory> <includes> <include>security.properties</include> </includes> <filtering>true</filtering> </resource> </resources> </configuration> </execution> <execution> <id>copy-resources-webxml</id> <phase>validate</phase> <goals> <goal>copy-resources</goal> </goals> <configuration> <outputDirectory>src/main/webapp/WEB-INF</outputDirectory> <encoding>UTF-8</encoding> <overwrite>true</overwrite> <resources> <resource> <directory>src/main/config</directory> <includes> <include>web.xml</include> </includes> <filtering>true</filtering> </resource> </resources> </configuration> </execution> <execution> <id>copy-resources-webxml-jboss</id> <phase>validate</phase> <goals> <goal>copy-resources</goal> </goals> <configuration> <outputDirectory>src/main/webapp/WEB-INF</outputDirectory> <encoding>UTF-8</encoding> <overwrite>true</overwrite> <resources> <resource> <directory>src/main/config/${jboss}</directory> <includes> <include>web.xml</include> </includes> <filtering>true</filtering> </resource> </resources> </configuration> </execution> <execution> <id>copy-resources-contextxml</id> <phase>validate</phase> <goals> <goal>copy-resources</goal> </goals> <configuration> <outputDirectory>src/main/webapp/META-INF</outputDirectory> <encoding>UTF-8</encoding> <overwrite>true</overwrite> <resources> <resource> <directory>src/main/config</directory> <includes> <include>context.xml</include> </includes> <filtering>true</filtering> </resource> </resources> </configuration> </execution> <execution> <id>copy-resources-contextxml-jboss</id> <phase>validate</phase> <goals> <goal>copy-resources</goal> </goals> <configuration> <outputDirectory>src/main/webapp/META-INF</outputDirectory> <encoding>UTF-8</encoding> <overwrite>true</overwrite> <resources> <resource> <directory>src/main/config/${jboss}</directory> <includes> <include>context.xml</include> </includes> <filtering>true</filtering> </resource> </resources> </configuration> </execution> <execution> <id>copy-jndi-lookup-jboss</id> <phase>validate</phase> <goals> <goal>copy-resources</goal> </goals> <configuration> <outputDirectory>src/main/webapp/WEB-INF/classes/spring</outputDirectory> <encoding>UTF-8</encoding> <overwrite>true</overwrite> <resources> <resource> <directory>src/main/config/${jboss}</directory> <includes> <include>jbossBaseSystemConfig.xml</include> </includes> <filtering>true</filtering> </resource> </resources> </configuration> </execution> <execution> <id>copy-resources-jettycontextxml</id> <phase>validate</phase> <goals> <goal>copy-resources</goal> </goals> <configuration> <outputDirectory>${project.build.directory}/jetty/</outputDirectory> <encoding>UTF-8</encoding> <resources> <resource> <directory>src/main/config</directory> <includes> <include>jetty-env.xml</include> </includes> <filtering>true</filtering> </resource> </resources> </configuration> </execution> <execution> <id>copy-resources-tld</id> <phase>validate</phase> <goals> <goal>copy-resources</goal> </goals> <configuration> <outputDirectory>src/main/webapp/WEB-INF/tld</outputDirectory> <encoding>UTF-8</encoding> <resources> <resource> <directory>src/main/tld</directory> <includes> <include>**/*.tld</include> </includes> <filtering>false</filtering> </resource> </resources> </configuration> </execution> <execution> <id>copy-resources-standalone</id> <phase>prepare-package</phase> <goals> <goal>copy-resources</goal> </goals> <configuration> <outputDirectory>${project.build.directory}/${env}</outputDirectory> <encoding>UTF-8</encoding> <resources> <resource> <directory>src/main/config/${env}</directory> <filtering>true</filtering> </resource> </resources> </configuration> </execution> <execution> <id>lesscss-include-in-pagemodels</id> <!-- here the phase you need --> <phase>process-resources</phase> <goals> <goal>copy-resources</goal> </goals> <configuration> <outputDirectory>${project.basedir}/src/main/webapp/WEB-INF/aps/jsp/models/inc/lesscss-active</outputDirectory> <encoding>UTF-8</encoding> <overwrite>true</overwrite> <resources> <resource> <directory>${project.basedir}/src/main/webapp/WEB-INF/aps/jsp/models/inc/lesscss-available/${env}</directory> <includes> <include>lesscss.jsp</include> </includes> </resource> </resources> </configuration> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> <version>1.7</version><!--$NO-MVN-MAN-VER$ --> <executions> <execution> <id>decide-if-core-webapp-can-overwrite</id> <phase>validate</phase> <configuration> <exportAntProperties>true</exportAntProperties> <target> <taskdef resource="net/sf/antcontrib/antcontrib.properties" classpathref="maven.plugin.classpath" /> <if> <available file="src/main/webapp/WEB-INF/aps/jsp/internalservlet/api" type="dir" /> <then> <property name="core-webapp-cant-overwrite" value="true"/> </then> </if> </target> </configuration> <goals> <goal>run</goal> </goals> </execution> </executions> <dependencies> <dependency> <groupId>ant-contrib</groupId> <artifactId>ant-contrib</artifactId> <version>20020829</version> </dependency> </dependencies> </plugin> <plugin> <groupId>org.zeroturnaround</groupId> <artifactId>jrebel-maven-plugin</artifactId> <version>1.1.3</version> <configuration> <name>${project.artifactId}</name> <version>${project.version}-${maven.build.timestamp}</version> </configuration> <executions> <execution> <id>generate-liverebel-xml</id> <phase>process-resources</phase> <goals> <goal>generate-liverebel-xml</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.12</version> <configuration> <argLine>-Xms512m -Xmx1024m</argLine> <testFailureIgnore>false</testFailureIgnore> <excludes> <exclude>**/*BaseTestCase*</exclude> </excludes> <includes> <include>**/AllTests.java</include> </includes> </configuration> </plugin> <!-- mvn jetty:run (with hot-redeploy) --> <plugin> <groupId>org.mortbay.jetty</groupId> <artifactId>jetty-maven-plugin</artifactId> <version>7.6.16.v20140903</version> <configuration> <scanIntervalSeconds>5</scanIntervalSeconds> <webAppSourceDirectory>${basedir}/src/main/webapp</webAppSourceDirectory> <webApp> <defaultsDescriptor>${basedir}/src/main/config/webdefault.xml</defaultsDescriptor> <contextPath>/${project.artifactId}</contextPath> <jettyEnvXml>${project.build.directory}/jetty/jetty-env.xml</jettyEnvXml> </webApp> </configuration> <dependencies> <dependency> <groupId>postgresql</groupId> <artifactId>postgresql</artifactId> <version>9.1-901.jdbc4</version> </dependency> <!-- uncomment if you need --> <!-- <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.1.18</version> </dependency> --> <dependency> <groupId>org.apache.derby</groupId> <artifactId>derby</artifactId> <version>10.9.1.0</version> </dependency> <dependency> <groupId>org.apache.derby</groupId> <artifactId>derbyclient</artifactId> <version>10.9.1.0</version> </dependency> <dependency> <groupId>commons-dbcp</groupId> <artifactId>commons-dbcp</artifactId> <version>1.2.2</version> </dependency> </dependencies> </plugin> <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.1</version> <dependencies> <dependency> <groupId>org.codehaus.plexus</groupId> <artifactId>plexus-archiver</artifactId> <version>2.4.1</version> </dependency> </dependencies> <executions> <execution> <id>war-build-standalone</id> <goals> <goal>exec-war-only</goal> </goals> <phase>package</phase> <configuration> <buildDirectory>${project.build.directory}/${env}</buildDirectory> <path>/${project.artifactId}</path> <finalName>${project.artifactId}-${project.version}-${env}.jar</finalName> <!-- Not working... waiting for the plugin... <tomcatWebXml>${basedir}/src/main/config/tomcat-exewar-web.xml</tomcatWebXml> --> <enableNaming>true</enableNaming> <skip>${skipStandalone}</skip> <extraDependencies> <extraDependency> <groupId>org.apache.derby</groupId> <artifactId>derby</artifactId> <version>10.9.1.0</version> </extraDependency> </extraDependencies> </configuration> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.2</version> <dependencies> <dependency> <groupId>org.codehaus.plexus</groupId> <artifactId>plexus-archiver</artifactId> <version>2.4.1</version> </dependency> </dependencies> <configuration> <packagingExcludes>WEB-INF/classes/**/*.tld</packagingExcludes> </configuration> </plugin> <plugin> <groupId>org.lesscss</groupId> <artifactId>lesscss-maven-plugin</artifactId> <version>1.3.0</version> <configuration> <sourceDirectory>${project.basedir}/src/main/webapp/resources/static/less</sourceDirectory> <outputDirectory>${project.build.directory}/${project.build.finalName}/resources/static/css</outputDirectory> <compress>true</compress> </configuration> <executions> <execution> <id>build-lesscss-files</id> <phase>prepare-package</phase> <goals> <goal>compile</goal> </goals> </execution> </executions> </plugin> </plugins> <pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-clean-plugin</artifactId> <version>2.5</version> <configuration> <excludeDefaultDirectories>true</excludeDefaultDirectories> <followSymlinks>true</followSymlinks><!-- performance --> <filesets> <fileset> <directory>${project.build.directory}</directory> <excludes> <exclude>**/derby/production/**</exclude> </excludes> </fileset> </filesets> </configuration> </plugin> <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself. --> <plugin> <groupId>org.eclipse.m2e</groupId> <artifactId>lifecycle-mapping</artifactId> <version>1.0.0</version> <configuration> <lifecycleMappingMetadata> <pluginExecutions> <pluginExecution> <pluginExecutionFilter> <groupId> org.apache.maven.plugins </groupId> <artifactId> maven-dependency-plugin </artifactId> <versionRange> [2.3,) </versionRange> <goals> <goal> unpack-dependencies </goal> </goals> </pluginExecutionFilter> <action> <execute></execute> </action> </pluginExecution> <pluginExecution> <pluginExecutionFilter> <groupId> org.codehaus.mojo </groupId> <artifactId> sql-maven-plugin </artifactId> <versionRange> [1.5,) </versionRange> <goals> <goal>execute</goal> </goals> </pluginExecutionFilter> <action> <ignore></ignore> </action> </pluginExecution> <pluginExecution> <pluginExecutionFilter> <groupId> org.apache.maven.plugins </groupId> <artifactId> maven-antrun-plugin </artifactId> <versionRange> [1.6,) </versionRange> <goals> <goal>run</goal> </goals> </pluginExecutionFilter> <action> <ignore></ignore> </action> </pluginExecution> </pluginExecutions> </lifecycleMappingMetadata> </configuration> </plugin> </plugins> </pluginManagement> </build> <dependencies> <dependency> <groupId>org.entando.entando.bundles.misc</groupId> <artifactId>entando-misc-less</artifactId> <version>${entando.version}</version> <type>war</type> </dependency> <dependency> <groupId>org.entando.entando</groupId> <artifactId>entando-engine</artifactId> <version>${entando.version}</version> <type>jar</type> <scope>provided</scope> </dependency> <dependency> <groupId>org.entando.entando</groupId> <artifactId>entando-engine</artifactId> <version>${entando.version}</version> <type>test-jar</type> <scope>test</scope> </dependency> <dependency> <groupId>org.entando.entando</groupId> <artifactId>entando-admin-console</artifactId> <version>${entando.version}</version> <type>jar</type> <scope>provided</scope> </dependency> <dependency> <groupId>org.entando.entando</groupId> <artifactId>entando-admin-console</artifactId> <version>${entando.version}</version> <type>war</type> </dependency> <dependency> <groupId>org.entando.entando</groupId> <artifactId>entando-admin-console</artifactId> <version>${entando.version}</version> <type>test-jar</type> <scope>test</scope> </dependency> <dependency> <groupId>org.entando.entando</groupId> <artifactId>entando-portal-ui</artifactId> <version>${entando.version}</version> <type>jar</type> <scope>provided</scope> </dependency> <dependency> <groupId>org.entando.entando</groupId> <artifactId>entando-portal-ui</artifactId> <version>${entando.version}</version> <type>war</type> </dependency> <dependency> <groupId>org.entando.entando</groupId> <artifactId>entando-portal-ui</artifactId> <version>${entando.version}</version> <type>test-jar</type> <scope>test</scope> </dependency> <dependency> <groupId>javax.servlet.jsp</groupId> <artifactId>jsp-api</artifactId> <version>2.2</version> <scope>provided</scope> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>2.5</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-test</artifactId> <version>${spring.version}</version> <scope>test</scope> </dependency> <dependency> <groupId>postgresql</groupId> <artifactId>postgresql</artifactId> <version>9.1-901.jdbc4</version> <scope>test</scope> </dependency> <dependency> <groupId>org.apache.derby</groupId> <artifactId>derby</artifactId> <version>10.9.1.0</version> <scope>test</scope> </dependency> <dependency> <groupId>org.apache.derby</groupId> <artifactId>derbyclient</artifactId> <version>10.9.1.0</version> <scope>test</scope> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.8.2</version> <scope>test</scope> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> <version>3.1.0</version> <scope>test</scope> </dependency> </dependencies> </project>