blob: 31752f38a941f604413a90ba80c3ff22963d7087 [file] [log] [blame]
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.roller</groupId>
<artifactId>roller-project</artifactId>
<version>5.0.5-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<name>Apache Roller Planet Business Module</name>
<description>
Business logic and persistence for Roller Planet RSS/Atom aggregator,
also used in Roller Weblogger.
</description>
<groupId>org.apache.roller</groupId>
<artifactId>roller-planet-business</artifactId>
<properties>
<testOutputDirectory>${project.build.testOutputDirectory}</testOutputDirectory>
<testPlanetCache>${project.build.testOutputDirectory}${file.separator}planetcache</testPlanetCache>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.roller</groupId>
<artifactId>roller-core</artifactId>
<version>${roller.version}</version>
</dependency>
<!-- OpenJPA deps -->
<dependency>
<groupId>org.apache.openjpa</groupId>
<artifactId>openjpa</artifactId>
<exclusions>
<exclusion>
<groupId>commons-pool</groupId>
<artifactId>commons-pool</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jms_1.1_spec</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- EclipseLink deps (for sometimes testing purposes)
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>eclipselink</artifactId>
<version>2.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jta_1.1_spec</artifactId>
<version>1.1.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jpa_2.0_spec</artifactId>
<version>1.1</version>
<scope>provided</scope>
</dependency
-->
<!-- Hibernate deps (for sometimes testing purposes)
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>3.5.1-Final</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-jdk14</artifactId>
<version>1.5.6</version>
<scope>runtime</scope>
</dependency> -->
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</dependency>
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
</dependency>
<dependency>
<groupId>net.java.dev.rome</groupId>
<artifactId>rome</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>net.java.dev.rome</groupId>
<artifactId>rome-fetcher</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity</artifactId>
</dependency>
<dependency>
<groupId>org.apache.texen</groupId>
<artifactId>texen</artifactId>
</dependency>
<!-- test deps -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derbynet</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derbyclient</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-resources</id>
<phase>process-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<includeEmptyDirs>true</includeEmptyDirs>
<outputDirectory>${project.build.directory}/dbscripts</outputDirectory>
<resources>
<resource>
<directory>${basedir}/src/main/resources/sql</directory>
<filtering>false</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<!-- Ensure tests will run even if 'openjpa' profile not active -->
<forkMode>once</forkMode>
<argLine>-javaagent:${user.home}/.m2/repository/org/apache/openjpa/openjpa/2.0.1/openjpa-2.0.1.jar</argLine>
<systemProperties>
<property>
<name>catalina.base</name>
<value>${project.build.testOutputDirectory}</value>
</property>
<property>
<name>context.realpath</name>
<value>${project.basedir}/src/main/webapp</value>
</property>
<property>
<name>testPlanetCache</name>
<value>${project.build.testOutputDirectory}${file.separator}planetcache</value>
</property>
</systemProperties>
<excludes>
<exclude>**/TestUtils.java</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<dependencies>
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity</artifactId>
<version>1.6</version>
</dependency>
<dependency>
<groupId>org.apache.roller</groupId>
<artifactId>test-utils</artifactId>
<version>${roller.version}</version>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
<version>${derby.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derbynet</artifactId>
<version>${derby.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derbyclient</artifactId>
<version>${derby.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derbytools</artifactId>
<version>${derby.version}</version>
<scope>runtime</scope>
</dependency>
</dependencies>
<executions>
<execution>
<id>gen-db-scripts</id>
<phase>compile</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<taskdef name="texen"
classname="org.apache.velocity.texen.ant.TexenTask"
classpathref="maven.compile.classpath"/>
<texen
controlTemplate ="control.vm"
contextProperties="${project.build.directory}/dbscripts/dbscripts.properties"
templatePath ="${project.build.directory}/dbscripts"
outputDirectory ="${project.build.directory}/dbscripts"
outputFile="README.txt"/>
</tasks>
</configuration>
</execution>
<execution>
<id>startdb</id>
<phase>process-test-resources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<!-- Derby only for unit testing: skip when maven.text.skip is set -->
<delete dir="${project.build.directory}/derby-system" verbose="true" failonerror="false" />
<taskdef name="startdb" classname="org.apache.roller.weblogger.ant.StartDerbyTask"
classpathref="maven.test.classpath"/>
<startdb databaseDir="${project.build.directory}/derby-system"
port="3221"
databaseScriptsDir="${project.build.directory}/dbscripts"
skip="${maven.test.skip}" >
</startdb>
</tasks>
</configuration>
</execution>
<execution>
<id>stopdb</id>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<!-- Derby only for unit testing: skip when maven.text.skip is set -->
<taskdef name="stopdb" classname="org.apache.roller.weblogger.ant.StopDerbyTask"
classpathref="maven.test.classpath"/>
<stopdb databaseDir="${project.build.directory}/derby-system"
port="3221"
databaseScriptsDir="${project.build.directory}/dbscripts"
skip="${maven.test.skip}" >
</stopdb>
<delete dir="${project.build.directory}/derby-system" verbose="true" failonerror="false" />
</tasks>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<testResources>
<testResource>
<directory>${project.basedir}/src/test/resources</directory>
<filtering>true</filtering>
</testResource>
</testResources>
<resources>
<resource>
<directory>${project.basedir}/src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>**/**</include>
</includes>
<excludes>
<exclude>**/sql/**</exclude>
</excludes>
</resource>
</resources>
</build>
<profiles>
<profile>
<id>jboss</id>
<!-- building for JBoss, turn on 'java:/' prefix on datasource JNDI name -->
<activation>
<property><name>jboss</name></property>
</activation>
<properties>
<datasourceName>java:/RollerDS</datasourceName>
</properties>
</profile>
<profile>
<id>notjboss</id>
<!-- not building for JBoss, don't use 'java:/' prefix on datasource JNDI name -->
<activation>
<property><name>!jboss</name></property>
</activation>
<properties>
<datasourceName>jdbc/rollerdb</datasourceName>
</properties>
</profile>
<profile>
<id>openjpa</id>
<!-- building for Tomcat, so add OpenJPA bytecode enhancement -->
<activation>
<property>
<name>!javaee</name>
</property>
</activation>
<dependencies>
<dependency>
<groupId>org.apache.openjpa</groupId>
<artifactId>openjpa</artifactId>
</dependency>
</dependencies>
<properties>
<jpaProviderClass>org.apache.openjpa.persistence.PersistenceProviderImpl</jpaProviderClass>
</properties>
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>openjpa-enhance</id>
<phase>process-classes</phase>
<configuration>
<tasks>
<taskdef name="openjpac" classname="org.apache.openjpa.ant.PCEnhancerTask"
classpathref="maven.compile.classpath"/>
<openjpac enforcePropertyRestrictions="false">
<classpath refid="maven.compile.classpath"/>
</openjpac>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>