Index: README_Maven.txt
===================================================================
--- README_Maven.txt	(revision 0)
+++ README_Maven.txt	(revision 0)
@@ -0,0 +1,25 @@
+NOTES ON MAVEN IN XALAN
+=======================
+
+The current Maven build system (only consisting of added POM files and module directories) are intended as a basis for discussion and may change.
+
+Overview
+========
+
+There is a project parent POM, which groups the project into the following modules:
+* serializer (builds serializer.jar, from the org.apache.xml.serializer.* packages)
+* xalan-impl (builds an intermediate jar from the rest of the sources)
+* xalan (builds xalan.jar, using the maven shade plugin to integrate xalan-impl and dependent libraries into an uber-jar - this replicates the output of the ant build process)
+
+Output artifacts (xalan.jar and serializer.jar) are placed in the 'build' directory, like in the ant build. The groupId and artifactId are the same as the ones in Maven Central for Xalan-J 2.7.1
+
+Details
+=======
+
+In the Maven build, dependent libraries (BCEL, java_cup, regexp) are pulled from Maven Central and differ slightly in version from what's checked into SVN in the lib-directory.
+The same goes for the tools directory; the Maven tooling uses artifacts from Maven central and ignores the tools directory altogether.
+
+Since the versioning scheme in the project differs from standard Maven versioning (2.7.D2 for a defelopment version of 2.7.2 vs its Maven equivalent 2.7.2-SNAPSHOT), I've left it with Maven standard for now. The current version in the POMs is set to 2.8-SNAPSHOT, as I'd expect a change like this to go into a minor release rather than a bugfix release.
+
+Because the versioning question is still open, the POMs leave Version.java in both serializer.jar and xalan.jar alone. Depending on what we decide to do with project versioning and whether or not we preserve the ant build (preferably no), the way the Version classes operate will need to change (either read the version from a generated property file, read it from META-INF or use Maven filtering). Currently, the ant build simple overwrites them and removes them on clean (even though they're checked in).
+

Property changes on: xalan-impl
___________________________________________________________________
Added: svn:ignore
   + target


Index: xalan-impl/pom.xml
===================================================================
--- xalan-impl/pom.xml	(revision 0)
+++ xalan-impl/pom.xml	(revision 0)
@@ -0,0 +1,214 @@
+<?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>
+	<artifactId>xalan-impl</artifactId>
+	<packaging>jar</packaging>
+	<name>Apache Xalan - Xalan Implementation</name>
+	<parent>
+		<groupId>xalan</groupId>
+		<artifactId>xalan-parent</artifactId>
+		<version>2.8-SNAPSHOT</version>
+	</parent>
+	<properties>
+		<xpathparser.package.dir>org/apache/xalan/xsltc/compiler</xpathparser.package.dir>
+		<xpathlexer.target.dir>${basedir}/target/generated-sources/jlex/${xpathparser.package.dir}</xpathlexer.target.dir>
+		<xpathparser.target.dir>${basedir}/target/generated-sources/java_cups/${xpathparser.package.dir}</xpathparser.target.dir>
+		
+		<impl.version>${project.version}</impl.version>
+	</properties>
+	
+	<dependencies>
+		<dependency>
+			<groupId>xalan</groupId>
+			<artifactId>serializer</artifactId>
+			<version>2.8-SNAPSHOT</version>
+		</dependency>
+		<dependency>
+			<groupId>xerces</groupId>
+			<artifactId>xercesImpl</artifactId>
+			<version>2.11.0</version>
+			<optional>true</optional>
+		</dependency>
+		<dependency>
+			<groupId>bcel</groupId>
+			<artifactId>bcel</artifactId>
+			<version>5.1</version>
+		</dependency>
+		<dependency>
+			<groupId>edu.princeton.cup</groupId>
+			<artifactId>java-cup</artifactId>
+			<version>10k</version>
+		</dependency>
+	</dependencies>
+	<build>
+		<sourceDirectory>../src</sourceDirectory>
+		<finalName>${project.artifactId}</finalName>
+		
+		<resources>
+			<resource>
+				<directory>${project.build.sourceDirectory}</directory>
+				<includes>
+					<include>META-INF/**</include>
+				</includes>
+			</resource>
+			<resource>
+				<directory>${project.build.sourceDirectory}</directory>
+				<targetPath>META-INF</targetPath>
+				<includes>
+					<include>MANIFEST.MF</include>
+				</includes>
+				<filtering>true</filtering>
+			</resource>
+			<resource>
+				<directory>${project.build.sourceDirectory}</directory>
+				<includes>
+					<include>trax/*.properties</include>
+				</includes>
+				<filtering>true</filtering>
+			</resource>
+			<resource>
+				<directory>${project.build.sourceDirectory}</directory>
+				<includes>
+					<include>org/apache/xalan/res/*.properties</include>
+				</includes>
+				<filtering>true</filtering>
+			</resource>
+			<resource>
+				<directory>..</directory>
+				<targetPath>META-INF</targetPath>
+				<includes>
+					<include>LICENSE.txt</include>
+				</includes>
+			</resource>
+		</resources>
+		
+		<plugins>
+			<plugin>
+				<!-- we need this for the Manifest source file, because
+				the filtering keys in there are ANT keys... -->
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-resources-plugin</artifactId>
+				<version>2.6</version>
+				<configuration>
+					<delimiters>
+						<delimiter>${*}</delimiter><!-- to keep the default behavior -->
+						<delimiter>@</delimiter><!-- to add Ant-like tokens style -->
+					</delimiters>
+				</configuration>
+			</plugin>			
+			<plugin>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<version>3.1</version>
+				<configuration>
+					<excludes>
+						<exclude>org/apache/xml/serializer/**/*.java</exclude>
+						<exclude>org/apache/xalan/xsltc/util/JavaCupRedirect.java</exclude>
+					</excludes>
+				</configuration>
+			</plugin>
+			<plugin>
+				<artifactId>maven-jar-plugin</artifactId>
+				<version>2.4</version>
+				<configuration>
+					<useDefaultManifestFile>true</useDefaultManifestFile>
+					<!--
+					<defaultManifestFile>${project.build.sourceDirectory}/MANIFEST.MF</defaultManifestFile>
+					-->
+				</configuration>
+			</plugin>
+			<plugin>
+				<groupId>org.codehaus.mojo</groupId>
+				<artifactId>build-helper-maven-plugin</artifactId>
+				<version>1.8</version>
+				<executions>
+					<execution>
+						<phase>generate-sources</phase>
+						<goals>
+							<goal>add-source</goal>
+						</goals>
+						<configuration>
+							<sources>
+								<source>${project.build.directory}/generated-sources/jlex</source>
+								<source>${project.build.directory}/generated-sources/java_cups</source>
+							</sources>
+						</configuration>
+					</execution>
+				</executions>
+			</plugin>
+			<plugin>
+				<artifactId>maven-antrun-plugin</artifactId>
+				<dependencies>
+					<dependency>
+						<groupId>edu.princeton.cup</groupId>
+						<artifactId>java-cup</artifactId>
+						<version>10k</version>
+					</dependency>
+				</dependencies>
+				<executions>
+					<execution>
+						<!-- make directory for jlex plugin, it can't
+						do that by itself -->
+						<id>make-jlex-target-dir</id>
+						<phase>initialize</phase>
+						<configuration>
+							<tasks>
+								<mkdir dir="${xpathlexer.target.dir}"/>
+							</tasks>
+						</configuration>
+						<goals>
+							<goal>run</goal>
+						</goals>
+					</execution>
+					<execution>
+						<!-- run java_cup via antrun - there is no maven
+						plugin for it ATM -->
+						<id>run-java_cups</id>
+						<phase>generate-sources</phase>
+						<configuration>
+							<tasks>
+								<property name="compile_classpath" refid="maven.compile.classpath"/>
+								<property name="plugin_classpath" refid="maven.plugin.classpath"/>
+								<mkdir dir="${xpathparser.target.dir}"/>
+								<java fork="yes" dir="${xpathparser.target.dir}" failonerror="true" 
+								   classname="java_cup.Main">
+									<classpath>
+										<pathelement path="${compile_classpath}"/>
+										<pathelement path="${plugin_classpath}"/>
+									</classpath>
+								  <!-- We're using JavaCupRedirect to call the java_cup application -->
+								  <arg line="-parser XPathParser -expect 0"/>
+								  <arg file="${project.build.sourceDirectory}/${xpathparser.package.dir}/xpath.cup"/>
+								</java>
+							</tasks>
+						</configuration>
+						<goals>
+							<goal>run</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>			
+			<plugin>
+				<groupId>net.sourceforge.maven-jlex</groupId>
+				<artifactId>maven-jlex-plugin</artifactId>
+				<version>1.0</version>
+				<configuration>
+					<files>
+						<filePair>
+							<inputFile>${project.build.sourceDirectory}/org/apache/xalan/xsltc/compiler/xpath.lex</inputFile>
+							<outputFile>${xpathlexer.target.dir}/XPathLexer.java</outputFile>
+						</filePair>
+					</files>
+				</configuration>
+				<executions>
+					<execution>
+						<phase>generate-sources</phase>
+						<goals>
+							<goal>generate</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+		</plugins>
+	</build>
+
+</project>

Property changes on: xalan
___________________________________________________________________
Added: svn:ignore
   + target


Index: xalan/pom.xml
===================================================================
--- xalan/pom.xml	(revision 0)
+++ xalan/pom.xml	(revision 0)
@@ -0,0 +1,100 @@
+<?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>
+	<artifactId>xalan</artifactId>
+	<packaging>jar</packaging>
+	<name>Apache Xalan - Xalan</name>
+	<parent>
+		<groupId>xalan</groupId>
+		<artifactId>xalan-parent</artifactId>
+		<version>2.8-SNAPSHOT</version>
+	</parent>
+	<properties>
+		<impl.version>${project.version}</impl.version>
+	</properties>
+	<dependencies>
+		<dependency>
+			<groupId>xalan</groupId>
+			<artifactId>xalan-impl</artifactId>
+			<version>2.8-SNAPSHOT</version>
+		</dependency>
+	</dependencies>
+	
+	<build>
+		<finalName>${project.artifactId}</finalName>
+		
+		<resources>
+			<resource>
+				<directory>../src</directory>
+				<targetPath>META-INF</targetPath>
+				<includes>
+					<include>MANIFEST.MF</include>
+				</includes>
+				<filtering>true</filtering>
+			</resource>
+		</resources>
+		
+		<plugins>
+			<plugin>
+				<artifactId>maven-jar-plugin</artifactId>
+				<version>2.4</version>
+				<configuration>
+					<useDefaultManifestFile>true</useDefaultManifestFile>
+					<!--
+					<defaultManifestFile>${project.build.sourceDirectory}/MANIFEST.MF</defaultManifestFile>
+					-->
+				</configuration>
+			</plugin>
+			<plugin>
+				<!-- we need this for the Manifest source file, because
+				the filtering keys in there are ANT keys... -->
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-resources-plugin</artifactId>
+				<version>2.6</version>
+				<configuration>
+					<delimiters>
+						<delimiter>${*}</delimiter><!-- to keep the default behavior -->
+						<delimiter>@</delimiter><!-- to add Ant-like tokens style -->
+					</delimiters>
+				</configuration>
+			</plugin>			
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-shade-plugin</artifactId>
+				<version>2.2</version>
+				<configuration>
+					<outputDirectory>../build</outputDirectory>
+					<outputFile>../build/xalan.jar</outputFile>
+					<artifactSet>
+						<excludes>
+							<exclude>xalan:serializer</exclude>
+						</excludes>
+					</artifactSet>
+					<filters>
+						<filter>
+							<artifact>edu.princeton.cup:java-cup</artifact>
+							<includes>
+								<include>java_cup/runtime/**</include>
+							</includes>
+						</filter>
+						<filter>
+							<artifact>xalan:xalan-impl</artifact>
+							<includes>
+								<include>**</include>
+							</includes>
+						</filter>
+					</filters>
+  				</configuration>
+				<executions>
+					<execution>
+						<phase>package</phase>
+						<goals>
+							<goal>shade</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+		</plugins>
+	</build>
+
+</project>

Property changes on: serializer
___________________________________________________________________
Added: svn:ignore
   + target


Index: serializer/pom.xml
===================================================================
--- serializer/pom.xml	(revision 0)
+++ serializer/pom.xml	(revision 0)
@@ -0,0 +1,62 @@
+<?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>xalan</groupId>
+	<artifactId>serializer</artifactId>
+	<packaging>jar</packaging>
+	<name>Apache Xalan - Serializer</name>
+	<parent>
+		<groupId>xalan</groupId>
+		<artifactId>xalan-parent</artifactId>
+		<version>2.8-SNAPSHOT</version>
+	</parent>
+	<properties>
+		<impl.version>${version}</impl.version>
+	</properties>
+	<build>
+		<!-- note that this is a symbolic link on the file system!! -->
+		<sourceDirectory>../src</sourceDirectory>
+		<finalName>${project.artifactId}</finalName>
+		
+		<resources>
+			<resource>
+				<directory>${project.build.sourceDirectory}</directory>
+				<includes>
+					<include>org/apache/xml/serializer/**/*.properties</include>
+				</includes>
+			</resource>
+			<resource>
+				<directory>${project.build.sourceDirectory}</directory>
+				<targetPath>META-INF</targetPath>
+				<includes>
+					<include>MANIFEST.SERIALIZER</include>
+				</includes>
+				<filtering>true</filtering>
+			</resource>
+		</resources>
+		<plugins>
+			<plugin>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<version>3.1</version>
+				<configuration>
+					<includes>
+						<include>org/apache/xml/serializer/**/*.java</include>
+					</includes>
+				</configuration>
+			</plugin>
+			 <plugin>
+				 <artifactId>maven-jar-plugin</artifactId>
+				 <version>2.4</version>
+				 <configuration>
+					 <outputDirectory>../build</outputDirectory>
+					 <useDefaultManifestFile>true</useDefaultManifestFile>
+					 <defaultManifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.SERIALIZER</defaultManifestFile>
+					 <excludes>
+						 <exclude>META-INF/MANIFEST.SERIALIZER</exclude>
+					 </excludes>
+				 </configuration>
+			 </plugin>
+		</plugins>
+	</build>
+
+</project>
Index: pom.xml
===================================================================
--- pom.xml	(revision 0)
+++ pom.xml	(revision 0)
@@ -0,0 +1,34 @@
+<?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>xalan</groupId>
+	<artifactId>xalan-parent</artifactId>
+	<version>2.8-SNAPSHOT</version>
+	<name>Apache Xalan</name>
+	<packaging>pom</packaging>
+	<modules>
+		<module>xalan-impl</module>
+		<module>serializer</module>
+	 <module>xalan</module>
+	</modules>
+
+	<build>
+		<plugins>
+			<plugin>
+				<inherited>true</inherited>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<version>3.1</version>
+				<configuration>
+					<source>1.6</source>
+					<target>1.6</target>
+					<optimize>true</optimize>
+					<debug>true</debug>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+	<properties>
+		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+	</properties>
+</project>
