POM文件内容: |
<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>
<parent>
<groupId>com.hazelcast</groupId>
<artifactId>hazelcast-root</artifactId>
<version>2.0.1</version>
<relativePath>../pom.xml</relativePath>
</parent>
<name>hazelcast</name>
<artifactId>hazelcast</artifactId>
<packaging>jar</packaging>
<properties>
<log4j.version>1.2.12</log4j.version>
</properties>
<build>
<filters>
<filter>${basedir}/target/filter.properties</filter>
</filters>
<plugins>
<!-- this create jar file of code from src/test/java so modules with tests can share code -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>${maven.jar.plugin.version}</version>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven.compiler.plugin.version}</version>
<configuration>
<source>${jdk.version}</source>
<target>${jdk.version}</target>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${maven.source.plugin.version}</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>${maven.bundle.plugin.version}</version>
<executions>
<execution>
<id>bundle-manifest</id>
<phase>process-classes</phase>
<goals>
<goal>manifest</goal>
</goals>
<configuration>
<instructions>
<_include>src/main/resources/META-INF/MANIFEST.MF</_include>
<Import-Package>
!junit.framework,
!org.junit,
!org.mockito,
org.apache.log4j;resolution:=optional,
org.apache.log4j.*;resolution:=optional,
org.slf4j;resolution:=optional,
*
</Import-Package>
</instructions>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>${maven.jar.plugin.version}</version>
<configuration>
<archive>
<index>true</index>
<compress>true</compress>
<manifestFile>${basedir}/target/classes/META-INF/MANIFEST.MF</manifestFile>
<!--<manifestFile>src/main/resources/META-INF/MANIFEST.MF</manifestFile>-->
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>${maven.antrun.plugin.version}</version>
<executions>
<execution>
<id>set-timestamp</id>
<phase>generate-resources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<mkdir dir="${project.build.directory}"/>
<tstamp>
<format property="timestamp"
pattern="yyyyMMdd"/>
</tstamp>
<echo file="${basedir}/target/filter.properties"
message="timestamp=${timestamp}"/>
<copy file="${basedir}/src/main/resources/hazelcast-default.xml"
tofile="${basedir}/target/hazelcast.xml"/>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven.surefire.plugin.version}</version>
<configuration>
<argLine>-Xms512m -Xmx512m -XX:MaxPermSize=128M -Dhazelcast.version.check.enabled=false
-Dhazelcast.mancenter.enabled=false
</argLine>
<excludes>
<exclude>**/ClusterTest.java</exclude>
<exclude>**/QueryTest.java</exclude>
<exclude>**/MapStoreTest.java</exclude>
<exclude>**/PerformanceTest.java</exclude>
<exclude>**/Redo*</exclude>
<exclude>**/CMapTest.java</exclude>
<exclude>**/*StressTest.java</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<!-- profile that runs the StressTests. Normally they should not be run because they take too much time. -->
<profile>
<id>stresstest</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven.surefire.plugin.version}</version>
<configuration>
<argLine>-Xms512m -Xmx512m -XX:MaxPermSize=128M -Dhazelcast.version.check.enabled=false
-Dhazelcast.mancenter.enabled=false
</argLine>
<includes>
<include>**/*StressTest.java</include>
</includes>
<!-- we need to clean the 'exclude' since it already is being filled by the original
plugin configuration for this plugin. -->
<excludes>
<exclude>Nonsense</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>aspect</id>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>1.6.7</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<configuration>
<source>${jdk.version}</source>
<target>${jdk.version}</target>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
<!-- use this goal to weave all your main classes -->
<goal>test-compile</goal>
<!-- use this goal to weave all your test classes -->
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>all</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven.surefire.plugin.version}</version>
<configuration>
<argLine>-Xms512m -Xmx512m -XX:MaxPermSize=128M -Dhazelcast.version.check.enabled=false
-Dhazelcast.mancenter.enabled=false
</argLine>
<excludes>
<exclude>**/PerformanceTest.java</exclude>
<exclude>**/*StressTest.java</exclude>
</excludes>
<reportNameSuffix>${reportNameSuffix}</reportNameSuffix>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>elastic</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven.surefire.plugin.version}</version>
<configuration>
<argLine>-Xms512m -Xmx512m -XX:MaxPermSize=128M -XX:MaxDirectMemorySize=1500m
-Dhazelcast.version.check.enabled=false -Dhazelcast.mancenter.enabled=false
</argLine>
<excludes>
<exclude>**/PerformanceTest.java</exclude>
<exclude>**/*StressTest.java</exclude>
<exclude>**/MemoryLeakTest.java</exclude>
<exclude>**/ICountDownLatchTest.java</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>client</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven.surefire.plugin.version}</version>
<configuration>
<argLine>-Xms512m -Xmx512m -XX:MaxPermSize=128M</argLine>
<includes>
<include>**/client/**.java</include>
</includes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<dependencies>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.api.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>
|