> If you're interested, I can provide you guys with a pom.xml file and
> you can deploy artifacts whenever you make a release. The alternative
> is to manually deploy artifacts, but that requires repackaging the
> current source jar and generating a javadoc jar a well. It's always
> best to get the actual developers of the software to do that, for
> reasons of continuity. I'm just trying to make it as easy as possible
> for you, to make it easier for me in the future! :-)

As a follow-up...

I've spent some time yesterday on putting together a pom.xml file that
works with the non-standard directory layout
(http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html)
that is used for the current Ant build. I've also uploaded the
remaining artifacts that weren't available from Maven Central. The
maven build generates now a single jar with all the dependencies
included (considered bad practice in maven circles, btw) equivalent to
the one generated by Ant.

Let me know if you have any questions.

Cheers, Peter
-- 
Peter Reutemann, Dept. of Computer Science, University of Waikato, NZ
http://www.cs.waikato.ac.nz/~fracpete/           Ph. +64 (7) 858-5174
<?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/xsd/maven-4.0.0.xsd";>

  <modelVersion>4.0.0</modelVersion>

  <groupId>org.jopendocument</groupId>
  <artifactId>jOpenDocument</artifactId>
  <version>1.3-SNAPSHOT</version>
  <packaging>jar</packaging>

  <name>jOpenDocument (including dependencies)</name>
  <description>jOpenDocument is a free library for developers looking to use
  Open Document files without OpenOffice.org.</description>
  <url>http://www.jopendocument.org/</url>

  <organization>
    <name>ILM Informatique</name>
    <url>http://www.ilm-informatique.fr/</url>
  </organization>

  <licenses>
    <license>
      <name>GNU General Public License 3</name>
      <url>http://www.gnu.org/licenses/gpl-3.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <developers>
    <developer>
      <id>ilm</id>
      <name>ILM Informatique</name>
    </developer>
  </developers>

  <mailingLists>
    <mailingList>
      <name>jopendocument</name>
      <subscribe>http://groups.google.com/group/jopendocument</subscribe>
      <unsubscribe>http://groups.google.com/group/jopendocument</unsubscribe>
      <archive>http://www.mail-archive.com/mailing@jopendocument.org</archive>
    </mailingList>
  </mailingLists>

  <scm>
    <connection>not available</connection>
    <url>http://jopendocument.org/download/jOpenDocument-src-${version}.zip</url>
  </scm>

  <parent>
    <groupId>org.sonatype.oss</groupId>
    <artifactId>oss-parent</artifactId>
    <version>7</version>
  </parent>

  <dependencies>
    <dependency>
      <groupId>ognl</groupId>
      <artifactId>ognl</artifactId>
      <version>2.6.9</version>
    </dependency>
    <dependency>
      <groupId>org.jopendocument</groupId>
      <artifactId>ognl-engine</artifactId>
      <version>2.6.9</version>
    </dependency>
    <dependency>
      <groupId>org.jopendocument</groupId>
      <artifactId>jdom</artifactId>
      <version>1.1.1</version>
    </dependency>
    <dependency>
      <groupId>commons-collections</groupId>
      <artifactId>commons-collections</artifactId>
      <version>3.1</version>
    </dependency>
    <dependency>
      <groupId>org.jopendocument</groupId>
      <artifactId>rhino</artifactId>
      <version>1.7R1</version>
    </dependency>
    <dependency>
      <groupId>org.jopendocument</groupId>
      <artifactId>isorelax-jaxp-bridge-ILM</artifactId>
      <version>1.1</version>
    </dependency>
    <dependency>
      <groupId>com.lowagie</groupId>
      <artifactId>itext</artifactId>
      <version>2.1.7</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>jaxen</groupId>
      <artifactId>jaxen</artifactId>
      <version>1.1</version>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.10</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
  </properties>

  <build>
    <sourceDirectory>src</sourceDirectory>
    <testSourceDirectory>src</testSourceDirectory>
    <directory>dist</directory>
    <outputDirectory>build</outputDirectory>
    <testOutputDirectory>build</testOutputDirectory>

    <resources>
      <resource>
        <targetPath>${project.build.outputDirectory}</targetPath>
        <directory>${project.build.sourceDirectory}</directory>
        <includes>
          <include>**/*.dtd</include>
          <include>**/*.html</include>
          <include>**/*.mod</include>
          <include>**/*.ods</include>
          <include>**/*.odt</include>
          <include>**/*.png</include>
          <include>**/*.properties</include>
          <include>**/*.rng</include>
          <include>**/*.sxc</include>
          <include>**/*.sxw</include>
          <include>**/*.txt</include>
          <include>**/*.violet</include>
          <include>**/*.xml</include>
          <include>**/NEWS</include>
          <include>**/README</include>
        </includes>
      </resource>
      <resource>
        <targetPath>${project.build.testOutputDirectory}</targetPath>
        <directory>${project.build.testSourceDirectory}</directory>
        <includes>
          <include>**/*.dtd</include>
          <include>**/*.html</include>
          <include>**/*.mod</include>
          <include>**/*.ods</include>
          <include>**/*.odt</include>
          <include>**/*.png</include>
          <include>**/*.properties</include>
          <include>**/*.rng</include>
          <include>**/*.sxc</include>
          <include>**/*.sxw</include>
          <include>**/*.txt</include>
          <include>**/*.violet</include>
          <include>**/*.xml</include>
          <include>**/NEWS</include>
          <include>**/README</include>
        </includes>
      </resource>
    </resources>

    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>2.0.2</version>
          <configuration>
            <source>1.6</source>
            <target>1.6</target>
            <excludes>
              <exclude>**/*Test.java</exclude>
            </excludes>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.12</version>
          <configuration>
            <skipTests>true</skipTests>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.1</version>
          <configuration>
            <useReleaseProfile>false</useReleaseProfile>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-clean-plugin</artifactId>
        <version>2.4.1</version>
        <configuration>
          <filesets>
            <fileset>
              <directory>.</directory>
              <includes>
                <include>**/*~</include>
                <include>**/.attach_pid*</include>
                <include>**/hs_err_pid*</include>
              </includes>
              <followSymlinks>false</followSymlinks>
            </fileset>
          </filesets>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>2.1.2</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar</goal>
            </goals>
            <configuration>
              <excludeResources>true</excludeResources>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.8.1</version>
        <configuration>
          <maxmemory>256m</maxmemory>
          <show>public</show>
          <outputDirectory>${project.basedir}/doc</outputDirectory>
          <additionnalDependencies>
            <additionnalDependency>
              <groupId>junit</groupId>
              <artifactId>junit</artifactId>
              <version>4.10</version>
            </additionnalDependency>
          </additionnalDependencies>
          <quiet>true</quiet>
        </configuration>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      
      <!-- for including necessary classes from the lib directory -->
      <plugin>
        <artifactId>maven-dependency-plugin</artifactId>
        <version>2.4</version>
        <executions>
          <execution>
            <id>expand system jars</id>
            <goals>
              <goal>unpack-dependencies</goal>
            </goals>
            <phase>generate-resources</phase>
            <configuration>
              <includeGroupIds>org.jopendocument,ognl,commons-collections,jaxen</includeGroupIds>
              <includes>**/*</includes>
              <outputDirectory>${project.build.outputDirectory}</outputDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin> 
    </plugins>
  </build>
</project>

Reply via email to