Skip to content

Commit

Permalink
Generates cleaner and more standard Ivy descriptors to be deployed.
Browse files Browse the repository at this point in the history
git-svn-id: https://olap4j.svn.sourceforge.net/svnroot/olap4j/trunk@416 c6a108a4-781c-0410-a6c6-c2d559e19af0
  • Loading branch information
lucboudreau committed Mar 20, 2011
1 parent 7d0dd82 commit b33bf9f
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 96 deletions.
80 changes: 45 additions & 35 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -220,17 +220,55 @@ class XmlaOlap4jDriverVersion {
<antcall target="init-hsql"/>
</target>

<!-- Override of subfloor to resolve artifacts of custom configurations -->
<!-- Override of subfloor to resolve modules artifacts -->
<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]" />

<ivy:resolve file="ivy-jdk14.xml" conf="default" />
<ivy:deliver conf="default" deliverpattern="${bin.dir}/ivy-jdk14.xml" />
<ivy:retrieve conf="default" pattern="${lib.dir}/[module](-[classifier]).[ext]" />

<ivy:resolve file="ivy-xmla.xml" conf="default" />
<ivy:deliver conf="default,default.transitive" deliverpattern="${bin.dir}/ivy-xmla.xml" />
<replace token="default.transitive" value="default" file="${bin.dir}/ivy-xmla.xml"/>
<ivy:retrieve conf="default" pattern="${lib.dir}/[module](-[classifier]).[ext]" />

<ivy:resolve file="ivy-tck.xml" conf="test" />
<ivy:deliver conf="test,test.transitive" deliverpattern="${bin.dir}/ivy-tck.xml" />
<replace token="test.transitive" value="test" file="${bin.dir}/ivy-tck.xml"/>
<ivy:retrieve conf="test" pattern="${testlib.dir}/[module](-[classifier]).[ext]" />

<ivy:resolve file="ivy.xml" conf="default" />
<ivy:deliver conf="default" deliverpattern="${bin.dir}/ivy.xml" />

</target>

<!-- Override from subfloor so we generate a pom per module. -->
<target name="create-pom" depends="install-ivy,ivy.deliver">
<ivy:makepom ivyfile="${bin.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>
<ivy:makepom ivyfile="${bin.dir}/ivy-tck.xml" pomfile="${bin.dir}/${ivy.artifact.id}-tck.pom">
<mapping conf="default" scope="test"/>
<mapping conf="test" scope="test"/>
<mapping conf="test.transitive" scope="test"/>
</ivy:makepom>
<ivy:makepom ivyfile="${bin.dir}/ivy-jdk14.xml" pomfile="${bin.dir}/${ivy.artifact.id}-jdk14.pom">
<mapping conf="default" scope="compile"/>
</ivy:makepom>
<ivy:makepom ivyfile="${bin.dir}/ivy-xmla.xml" pomfile="${bin.dir}/${ivy.artifact.id}-xmla.pom">
<mapping conf="default" scope="compile"/>
<mapping conf="default.transitive" scope="compile"/>
</ivy:makepom>
</target>
<target name="ivy.deliver">
<!-- Purposely left empty. Exportable Ivy files are generated when resolving. -->
</target>

<!-- override compile task to account for special jdk handling -->
Expand Down Expand Up @@ -306,39 +344,11 @@ 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">
<sequential>
<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>

<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}" />
Expand Down
13 changes: 3 additions & 10 deletions ivy-jdk14.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,26 +28,19 @@
</description>
</info>
<configurations>
<conf name="jdk14.default"/>
<conf name="default"/>
</configurations>

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

<dependencies defaultconf="jdk14.default->default">
<dependencies defaultconf="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>
Expand Down
61 changes: 17 additions & 44 deletions ivy-tck.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,72 +23,45 @@
</description>
</info>
<configurations>
<conf name="tck.test"/>
<conf name="tck.test.transitive"/>
<conf name="test"/>
<conf name="test.transitive"/>
</configurations>

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

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

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

<!-- test deps here -->
<dependency org="log4j" name="log4j" rev="1.2.9"/>

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

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

<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"/>

<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"/>

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

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

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

<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" />
<dependency org="commons-math" name="commons-math" rev="1.1"/>

<dependency org="javax.servlet" name="servlet-api" rev="2.4"/>

<dependency org="junit" name="junit" rev="3.8.1"/>

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

<dependency org="pentaho" name="mondrian" rev="3.3-SNAPSHOT"
changing="true" conf="tck.test->default">
<dependency org="pentaho" name="mondrian" rev="3.3-SNAPSHOT" changing="true">
<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>

Expand Down
10 changes: 5 additions & 5 deletions ivy-xmla.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@
</description>
</info>
<configurations>
<conf name="xmla.default"/>
<conf name="xmla.default.transitive"/>
<conf name="default"/>
<conf name="default.transitive"/>
</configurations>

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

<dependencies defaultconf="xmla.default->default">
<dependencies defaultconf="default->default">
<dependency org="org.olap4j" name="olap4j" rev="${project.revision}"
conf="xmla.default.transitive"/>
conf="default.transitive"/>
<dependency org="xerces" name="xercesImpl" rev="2.6.0"/>
</dependencies>
</ivy-module>
Expand Down
2 changes: 0 additions & 2 deletions ivy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,9 @@

<dependencies defaultconf="default->default">

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

<!-- Javadoc -->
<dependency org="net.sf" name="pdfdoclet" rev="1.0.2"
conf="codegen->default" />

Expand Down

0 comments on commit b33bf9f

Please sign in to comment.