blob: 0cb33c4306ffdc51fd8bfd347c151cab70640f05 [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 Weblogger Business Module</name>
<description>
Business logic and persistence for Roller Weblogger.
</description>
<groupId>org.apache.roller</groupId>
<artifactId>roller-weblogger-business</artifactId>
<properties>
<testOutputDirectory>${project.build.testOutputDirectory}</testOutputDirectory>
<testMediaDir> ${project.build.testOutputDirectory}${file.separator}mediafiles</testMediaDir>
<testUploadsDir>${project.build.testOutputDirectory}${file.separator}uploadsdir</testUploadsDir>
<testThemesDir> ${project.build.testOutputDirectory}${file.separator}themes</testThemesDir>
<testIndexDir> ${project.build.testOutputDirectory}${file.separator}index</testIndexDir>
<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>
<dependency>
<groupId>org.apache.roller</groupId>
<artifactId>roller-planet-business</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>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-core</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>
<dependency>
<groupId>org.apache.xmlrpc</groupId>
<artifactId>xmlrpc-common</artifactId>
</dependency>
<dependency>
<groupId>org.apache.xmlrpc</groupId>
<artifactId>xmlrpc-client</artifactId>
</dependency>
<dependency>
<groupId>org.apache.xmlrpc</groupId>
<artifactId>xmlrpc-server</artifactId>
</dependency>
<dependency>
<groupId>org.apache.ws.commons.util</groupId>
<artifactId>ws-commons-util</artifactId>
</dependency>
<dependency>
<groupId>net.oauth.core</groupId>
<artifactId>oauth</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>net.oauth.core</groupId>
<artifactId>oauth-provider</artifactId>
<scope>compile</scope>
</dependency>
<!-- test deps -->
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derbynet</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derbyclient</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>commons-validator</groupId>
<artifactId>commons-validator</artifactId>
<version>1.3.1</version>
<type>jar</type>
</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>project.build.directory</name>
<value>${project.build.directory}</value>
</property>
</systemProperties>
<excludes>
<exclude>**/TestUtils.java</exclude>
<exclude>**/TestTask.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>
<scope>runtime</scope>
</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>
</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="3219"
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="3219"
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>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<version>1.0-beta-3</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>create</goal>
</goals>
</execution>
</executions>
<configuration>
<doUpdate>false</doUpdate>
<revisionOnScmFailure>UNKNOWN</revisionOnScmFailure>
</configuration>
</plugin>
</plugins>
<testResources>
<testResource>
<directory>${project.basedir}/../weblogger-webapp/src/main/webapp/</directory>
<filtering>false</filtering>
<includes>
<include>themes/**</include>
</includes>
</testResource>
<testResource>
<directory>${project.basedir}/src/test/resources</directory>
<filtering>true</filtering>
<includes>
<include>**/**</include>
</includes>
</testResource>
</testResources>
<resources>
<resource>
<directory>${project.basedir}/src/main/resources</directory>
<filtering>false</filtering>
<includes>
<include>org/**</include>
</includes>
<excludes>
<exclude>**/sql/**</exclude>
</excludes>
</resource>
<resource>
<!-- ensure version and persistence files get substitions -->
<directory>${project.basedir}/src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>roller-version.properties</include>
<include>META-INF/**</include>
</includes>
</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>
<scope>provided</scope>
</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>