Skip to content

Commit

Permalink
Splits the deployed artifacts into different modules, each with their…
Browse files Browse the repository at this point in the history
… own POM descriptor.

git-svn-id: https://olap4j.svn.sourceforge.net/svnroot/olap4j/trunk@414 c6a108a4-781c-0410-a6c6-c2d559e19af0
  • Loading branch information
lucboudreau committed Mar 20, 2011
1 parent bc518b9 commit 38d2fff
Show file tree
Hide file tree
Showing 5 changed files with 269 additions and 177 deletions.
175 changes: 72 additions & 103 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -221,14 +221,16 @@ class XmlaOlap4jDriverVersion {
</target>

<!-- Override of subfloor to resolve artifacts of custom configurations -->
<target name="resolve" depends="resolve-xmla,resolve-jdk14,subfloor.resolve"/>
<target name="resolve-jdk14" depends="resolve-init">
<ivy:resolve file="ivy.xml" conf="default-jdk1.4" />
<ivy:retrieve conf="default-jdk1.4" pattern="${lib.dir}/[module](-[classifier]).[ext]" />
</target>
<target name="resolve-xmla" depends="resolve-init">
<ivy:resolve file="ivy.xml" conf="xmla" />
<ivy:retrieve conf="xmla" pattern="${lib.dir}/[module](-[classifier]).[ext]" />
<target name="resolve" depends="install-ivy,install-antcontrib">
<antcall target="subfloor.resolve"/>
<ivy:resolve file="ivy-jdk14.xml" conf="jdk14.default" />
<ivy:retrieve conf="jdk14.default" pattern="${lib.dir}/[module](-[classifier]).[ext]" />
<ivy:resolve file="ivy-xmla.xml" conf="xmla.default" />
<ivy:retrieve conf="xmla.default" pattern="${lib.dir}/[module](-[classifier]).[ext]" />
<ivy:resolve file="ivy-tck.xml" conf="tck.test" />
<ivy:retrieve conf="tck.test" pattern="${testlib.dir}/[module](-[classifier]).[ext]" />
<ivy:resolve file="ivy.xml" conf="codegen" />
<ivy:retrieve conf="codegen" pattern="${testlib.dir}/[module](-[classifier]).[ext]" />
</target>

<!-- override compile task to account for special jdk handling -->
Expand Down Expand Up @@ -305,105 +307,72 @@ class XmlaOlap4jDriverVersion {
</if>
</target>

<!-- Override from subfloor to allow filtering of core dependencies -->
<target name="create-pom" depends="install-ivy,ivy.deliver">
<ivy:makepom ivyfile="${dist.dir}/ivy.xml" pomfile="${dist.dir}/pom.xml">
<mapping conf="default" scope="compile" />
<mapping conf="test" scope="test" />
<mapping conf="codegen" scope="test" />
</ivy:makepom>
</target>
<target name="ivy.deliver">
<ivy:deliver conf="default,test,codegen" deliverpattern="${dist.dir}/ivy.xml" />
</target>

<!-- override from subfloor to publish tck and xmla artifacts as well -->
<target name="publish-nojar">
<antcall target="subfloor.publish-nojar"/>
<property
name="publish.file"
value="${dist.dir}/${ivy.artifact.id}-tck-${project.revision}.jar"/>
<sequential>
<fail message="No file found at: ${publish.file}">
<condition>
<not>
<available file="${publish.file}" />
</not>
</condition>
</fail>
<echo message="Publishing ${publish.file} to ${ivy.repository.publish}..." />
<if>
<isset property="isWindows" />
<then>
<exec executable="cmd" failonerror="true">
<arg value="/c" />
<arg value="mvn.bat" />
<arg value="deploy:deploy-file" />
<arg value="-DrepositoryId=${ivy.repository.id}" />
<arg value="-Durl=${ivy.repository.publish}" />
<arg value="-DgroupId=${ivy.artifact.group}" />
<arg value="-DartifactId=${ivy.artifact.id}-tck" />
<arg value="-Dpackaging=jar" />
<arg value="-Dversion=${project.revision}" />
<arg value="-Dfile=${publish.file}" />
</exec>
</then>
<else>
<exec executable="mvn" failonerror="true">
<arg value="deploy:deploy-file" />
<arg value="-DrepositoryId=${ivy.repository.id}" />
<arg value="-Durl=${ivy.repository.publish}" />
<arg value="-DgroupId=${ivy.artifact.group}" />
<arg value="-DartifactId=${ivy.artifact.id}-tck" />
<arg value="-Dpackaging=jar" />
<arg value="-Dversion=${project.revision}" />
<arg value="-Dfile=${publish.file}" />
</exec>
</else>
</if>
</sequential>
<property
name="publish.file.xmla"
value="${dist.dir}/${ivy.artifact.id}-xmla-${project.revision}.jar"/>
<sequential>
<fail message="No file found at: ${publish.file.xmla}">
<condition>
<not>
<available file="${publish.file.xmla}" />
</not>
</condition>
</fail>
<echo message="Generating pom file for XMLA module"/>
<ivy:makepom ivyfile="${basedir}/ivy.xml" pomfile="${bin.dir}/olap4j-xmla.pom">
<mapping conf="default" scope="compile"/>
<mapping conf="xmla" scope="compile"/>
<antcall target="subfloor.publish-nojar"/>

<!-- Generate pom files -->
<ivy:makepom ivyfile="${basedir}/ivy-tck.xml" pomfile="${bin.dir}/${ivy.artifact.id}-tck.pom">
<mapping conf="tck.default" scope="test"/>
<mapping conf="tck.test" scope="test"/>
<mapping conf="tck.test.transitive" scope="test"/>
</ivy:makepom>
<replace
file="${bin.dir}/olap4j-xmla.pom"
token="artifactId>olap4j"
value="artifactId>olap4j-xmla"/>
<echo message="Publishing ${publish.file.xmla} to ${ivy.repository.publish}..." />
<if>
<isset property="isWindows" />
<then>
<exec executable="cmd" failonerror="true">
<arg value="/c" />
<arg value="mvn.bat" />
<arg value="deploy:deploy-file" />
<arg value="-DrepositoryId=${ivy.repository.id}" />
<arg value="-Durl=${ivy.repository.publish}" />
<arg value="-DgroupId=${ivy.artifact.group}" />
<arg value="-DartifactId=${ivy.artifact.id}-xmla" />
<arg value="-Dpackaging=jar" />
<arg value="-Dversion=${project.revision}" />
<arg value="-Dfile=${publish.file.xmla}" />
<arg value="-DpomFile=${bin.dir}/olap4j-xmla.pom" />
<arg value="-DupdateReleaseInfo=true" />
</exec>
</then>
<else>
<exec executable="mvn" failonerror="true">
<arg value="deploy:deploy-file" />
<arg value="-DrepositoryId=${ivy.repository.id}" />
<arg value="-Durl=${ivy.repository.publish}" />
<arg value="-DgroupId=${ivy.artifact.group}" />
<arg value="-DartifactId=${ivy.artifact.id}-xmla" />
<arg value="-Dpackaging=jar" />
<arg value="-Dversion=${project.revision}" />
<arg value="-Dfile=${publish.file.xmla}" />
<arg value="-DpomFile=${bin.dir}/olap4j-xmla.pom" />
<arg value="-DupdateReleaseInfo=true" />
</exec>
</else>
</if>

<ivy:makepom ivyfile="${basedir}/ivy-jdk14.xml" pomfile="${bin.dir}/${ivy.artifact.id}-jdk14.pom">
<mapping conf="jdk14.default" scope="compile"/>
</ivy:makepom>

<ivy:makepom ivyfile="${basedir}/ivy-xmla.xml" pomfile="${bin.dir}/${ivy.artifact.id}-xmla.pom">
<mapping conf="xmla.default" scope="compile"/>
<mapping conf="xmla.default.transitive" scope="compile"/>
</ivy:makepom>

<!-- Publish -->
<antcall target="maven-publish-dependencies">
<param name="publish.groupId" value="${ivy.artifact.group}" />
<param name="publish.artifactId" value="${ivy.artifact.id}-tck" />
<param name="publish.version" value="${project.revision}" />
<param name="publish.file" value="${basedir}/ivy-tck.xml" />
</antcall>
<antcall target="maven-publish-artifact">
<param name="publish.pomFile" value="${bin.dir}/${ivy.artifact.id}-tck.pom" />
<param name="publish.file" value="${dist.dir}/${ivy.artifact.id}-tck-${project.revision}.jar" />
</antcall>

<antcall target="maven-publish-dependencies">
<param name="publish.groupId" value="${ivy.artifact.group}" />
<param name="publish.artifactId" value="${ivy.artifact.id}-xmla" />
<param name="publish.version" value="${project.revision}" />
<param name="publish.file" value="${basedir}/ivy-xmla.xml" />
</antcall>
<antcall target="maven-publish-artifact">
<param name="publish.pomFile" value="${bin.dir}/${ivy.artifact.id}-xmla.pom" />
<param name="publish.file" value="${dist.dir}/${ivy.artifact.id}-xmla-${project.revision}.jar" />
</antcall>

<antcall target="maven-publish-dependencies">
<param name="publish.groupId" value="${ivy.artifact.group}" />
<param name="publish.artifactId" value="${ivy.artifact.id}-jdk14" />
<param name="publish.version" value="${project.revision}" />
<param name="publish.file" value="${basedir}/ivy-jdk14.xml" />
</antcall>
<antcall target="maven-publish-artifact">
<param name="publish.pomFile" value="${bin.dir}/${ivy.artifact.id}-jdk14.pom" />
<param name="publish.file" value="${dist.dir}/${ivy.artifact.id}-jdk14-${project.revision}.jar" />
</antcall>
</sequential>
</target>

Expand Down
56 changes: 56 additions & 0 deletions ivy-jdk14.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="http://ivyrep.jayasoft.org/ivy-doc.xsl"?>
<!--
== $Id:$
== This software is subject to the terms of the Eclipse Public License v1.0
== Agreement, available at the following URL:
== http://www.eclipse.org/legal/epl-v10.html.
== Copyright (C) 2009-2011 Julian Hyde
== All Rights Reserved.
== You must accept the terms of that agreement to use this software.
-->
<ivy-module
version="2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:m="http://ant.apache.org/ivy/maven"
xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
<info organisation="${ivy.artifact.group}" module="${ivy.artifact.id}-jdk14" revision="${project.revision}">
<license name="EPL" url="http://www.eclipse.org/legal/epl-v10.html"/>
<ivyauthor name="Julian Hyde" />
<repository name="pentaho-repository" url="http://repo.pentaho.org/artifactory"/>
<description homepage="http://olap4j.org">
olap4j is an open Java API for OLAP.
Think of it like JDBC, but for accessing multi-dimensional data.
Olap4j is designed to be a common API for any OLAP server,
so you can write an application on one OLAP server and easily
switch it to another. And built on that API, there will be a
growing collection of tools and components.
</description>
</info>
<configurations>
<conf name="jdk14.default"/>
</configurations>

<publications>
<artifact name="${ivy.artifact.id}-jdk14" type="jar" conf="jdk14.default" />
</publications>

<dependencies defaultconf="jdk14.default->default">

<!-- Runtime deps here -->
<dependency org="javacup" name="javacup" rev="10k"/>

<!-- JDK 1.4 dependencies -->
<dependency org="asm" name="asm" rev="2.2.3"/>

<dependency org="asm" name="asm-commons" rev="2.2.3"/>

<!-- get retroweaver from Pentaho repo since ibilio one is corrupted -->
<dependency org="retroweaver" name="retroweaver" rev="1.2.4"/>

<dependency org="retroweaver" name="retroweaver-rt" rev="1.2.4"/>

</dependencies>
</ivy-module>

<!-- End ivy.xml -->
95 changes: 95 additions & 0 deletions ivy-tck.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="http://ivyrep.jayasoft.org/ivy-doc.xsl"?>
<!--
== $Id:$
== This software is subject to the terms of the Eclipse Public License v1.0
== Agreement, available at the following URL:
== http://www.eclipse.org/legal/epl-v10.html.
== Copyright (C) 2009-2011 Julian Hyde
== All Rights Reserved.
== You must accept the terms of that agreement to use this software.
-->
<ivy-module
version="2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:m="http://ant.apache.org/ivy/maven"
xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
<info organisation="${ivy.artifact.group}" module="${ivy.artifact.id}-tck" revision="${project.revision}">
<license name="EPL" url="http://www.eclipse.org/legal/epl-v10.html"/>
<ivyauthor name="Julian Hyde" />
<repository name="pentaho-repository" url="http://repo.pentaho.org/artifactory"/>
<description homepage="http://olap4j.org">
TCK for olap4j.
</description>
</info>
<configurations>
<conf name="tck.test"/>
<conf name="tck.test.transitive"/>
</configurations>

<publications>
<artifact name="${ivy.artifact.id}-tck" type="jar" conf="tck.test" />
</publications>

<dependencies defaultconf="tck.test->default">

<dependency org="org.olap4j" name="olap4j" rev="${project.revision}"
conf="tck.test.transitive" />

<!-- test deps here -->

<dependency org="log4j" name="log4j" rev="1.2.9"
conf="tck.test->default" />

<dependency org="commons-dbcp" name="commons-dbcp" rev="1.1"
conf="tck.test->default" />

<dependency org="hsqldb" name="hsqldb" rev="1.8.0.7"
conf="tck.test->default" />

<dependency org="simple-jndi" name="simple-jndi" rev="0.11.4.1"
conf="tck.test->default" />

<dependency org="commons-pool" name="commons-pool" rev="1.1"
conf="tck.test->default" />

<dependency org="commons-collections" name="commons-collections" rev="3.2"
conf="tck.test->default" />

<dependency org="commons-vfs" name="commons-vfs" rev="1.0"
conf="tck.test->default" />

<dependency org="commons-logging" name="commons-logging" rev="1.1"
conf="tck.test->default" />

<dependency org="commons-math" name="commons-math" rev="1.1"
conf="tck.test->default" />

<dependency org="javax.servlet" name="servlet-api" rev="2.4"
conf="tck.test->default" />

<dependency org="junit" name="junit" rev="3.8.1"
conf="tck.test->default" />



<!-- OLAP tests dependencies - uses Mondrian -->

<dependency org="pentaho" name="mondrian" rev="3.3-SNAPSHOT"
changing="true" conf="tck.test->default">
<exclude org="${ivy.artifact.group}" module="${ivy.artifact.id}"/>
<exclude org="${ivy.artifact.group}" module="${ivy.artifact.id}-tck"/>
</dependency>

<dependency org="eigenbase" name="eigenbase-xom" rev="1.3.0.11999"
conf="tck.test->default"/>

<dependency org="eigenbase" name="eigenbase-properties" rev="1.1.0.10924"
conf="tck.test->default"/>

<dependency org="eigenbase" name="eigenbase-resgen" rev="1.3.0.11873"
conf="tck.test->default"/>
</dependencies>
</ivy-module>

<!-- End ivy-tck.xml -->
41 changes: 41 additions & 0 deletions ivy-xmla.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="http://ivyrep.jayasoft.org/ivy-doc.xsl"?>
<!--
== $Id:$
== This software is subject to the terms of the Eclipse Public License v1.0
== Agreement, available at the following URL:
== http://www.eclipse.org/legal/epl-v10.html.
== Copyright (C) 2009-2011 Julian Hyde
== All Rights Reserved.
== You must accept the terms of that agreement to use this software.
-->
<ivy-module
version="2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:m="http://ant.apache.org/ivy/maven"
xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
<info organisation="${ivy.artifact.group}" module="${ivy.artifact.id}-xmla" revision="${project.revision}">
<license name="EPL" url="http://www.eclipse.org/legal/epl-v10.html"/>
<ivyauthor name="Julian Hyde" />
<repository name="pentaho-repository" url="http://repo.pentaho.org/artifactory"/>
<description homepage="http://olap4j.org">
XML/A driver for olap4j.
</description>
</info>
<configurations>
<conf name="xmla.default"/>
<conf name="xmla.default.transitive"/>
</configurations>

<publications>
<artifact name="${ivy.artifact.id}-xmla" type="jar" conf="xmla.default" />
</publications>

<dependencies defaultconf="xmla.default->default">
<dependency org="org.olap4j" name="olap4j" rev="${project.revision}"
conf="xmla.default.transitive"/>
<dependency org="xerces" name="xercesImpl" rev="2.6.0"/>
</dependencies>
</ivy-module>

<!-- End ivy-xmla.xml -->
Loading

0 comments on commit 38d2fff

Please sign in to comment.