Browse Source

#7997 Ivyfied custom SmartSprites library

Patched SmartSprites jar is now fetched using Ivy tooling.
Custom dependency resolver is used to retrieve module description
from local filesystem (in project hierarchy) and the master artifact
from Vaadin (6.x) SVN repository.

This is a temporary solution until required patches get contributed and
committed back to SmartSprite upstream and artifacts are available in
Maven central.
tags/7.0.0.alpha1
Mikael Vappula 12 years ago
parent
commit
b41b0a91f6

+ 1
- 2
.gitignore View File

@@ -48,6 +48,5 @@
/build/test-output
/build/integration-test-output

# /build/buildhelpers/com/vaadin/buildhelpers/
/build/buildhelpers/com/vaadin/buildhelpers/*.class
# /bin/
/bin

+ 13
- 9
build/build.xml View File

@@ -47,7 +47,7 @@
<target name="ivy-resolve" depends="ivy-configure" unless="ivy.resolved">
<property name="ivy.resolved" value="1" />
<ivy:resolve />
<ivy:resolve resolveid="main"/>
<ivy:cachepath pathid="compile.classpath" conf="compile"/>
<ivy:cachepath pathid="client-side.compile.classpath" conf="client-side.compile"/>
<ivy:cachepath pathid="test.runtime.classpath" conf="test.runtime"/>
@@ -158,6 +158,9 @@
<!-- init-nonpackage target before calling this main init target. -->
<property name="widgetsets-output-dir" value="${output-dir}/WebContent/VAADIN/widgetsets" />
<!-- Build helpers -->
<property name="buildhelpers-src" value="build/buildhelpers" />
<property name="buildhelpers-classes" value="${result-path}/buildhelpers/classes" />

<!-- Create Output Directory Hierarchy -->
<mkdir dir="${output-dir}/WebContent" />
@@ -361,9 +364,9 @@
<target name="webcontent" depends="preprocess-src,defaulttheme">

<!-- copy 3rd part libraries used by tests -->
<ivy:retrieve pattern="${output-dir}/WebContent/tests/lib/[artifact]-[revision].[ext]" conf="jetty"/>
<ivy:retrieve pattern="${output-dir}/WebContent/tests/lib/[artifact]-[revision].[ext]" conf="jetty" resolveid="main"/>
<ivy:retrieve pattern="${output-dir}/WebContent/tests/lib/[artifact]-[revision].[ext]"
organisation="emma" module="emma" revision="2.0.5312-patched" inline="true" />
organisation="emma" module="emma" revision="2.0.5312-patched" inline="true" resolveid="main" />

<!-- Add WebContent -->
<echo>Adding VAADIN/themes, demo and hsqldb.jar files.</echo>
@@ -431,7 +434,10 @@
</target>

<target name="compile-helpers" depends="init">
<javac source="1.5" target="1.5" includeantruntime="false" srcdir="build/buildhelpers" classpath="build/smartsprites/lib/smartsprites-0.2.3-itmill.jar"/>
<mkdir dir="${buildhelpers-classes}" />
<ivy:cachepath pathid="buildhelpers.dependencies" resolveId="buildhelpers" conf="compile" file="build/ivy/buildhelpers-ivy.xml"/>
<javac source="1.5" target="1.5" includeantruntime="false" srcdir="${buildhelpers-src}"
classpathref="buildhelpers.dependencies" destdir="${buildhelpers-classes}" debug="true" encoding="UTF-8" />
</target>
<target name="defaulttheme" depends="init, compile-helpers">
@@ -440,10 +446,8 @@
<arg value="-version" />
<arg value="${version.full}"/>
<classpath>
<pathelement location="build/buildhelpers" />
<fileset dir="build/smartsprites/lib">
<include name="*.jar"/>
</fileset>
<path location="${buildhelpers-classes}" />
<path refid="buildhelpers.dependencies" />
</classpath>
<jvmarg value="-Djava.awt.headless=true"/>
</java>
@@ -635,7 +639,7 @@
<java classname="com.vaadin.buildhelpers.GeneratePackageExports" failonerror="true" fork="yes">
<arg value="${output-dir}/WebContent/WEB-INF/lib/${lib-jar-name}"/>
<classpath>
<pathelement location="build/buildhelpers" />
<pathelement location="${buildhelpers-classes}" />
</classpath>
</java>

+ 13
- 0
build/ivy/buildhelpers-ivy.xml View File

@@ -0,0 +1,13 @@
<ivy-module version="2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation= "http://ant.apache.org/ivy/schemas/ivy.xsd">
<info organisation="com.vaadin" module="buildhelpers"/>
<configurations>
<conf name="compile" visibility="private"/>
</configurations>
<publications />
<dependencies>
<dependency org="com.carrotsearch" name="smartsprites" rev="0.2.3-itmill" conf="compile->compile(*),master(*)"/>
</dependencies>
</ivy-module>

+ 13
- 3
build/ivy/ivysettings.xml View File

@@ -2,13 +2,23 @@
<ivysettings>
<settings defaultResolver="public" />
<resolvers>
<ibiblio name="public" m2compatible="true"/>
<ibiblio name="public" m2compatible="true"/>
<url name="gwt-redist">
<artifact pattern="http://google-web-toolkit.googlecode.com/svn/tools/redist/[organisation]/[artifact](-[revision]).[ext]" />
</url>
</url>
<dual name="custom-smartsprites">
<filesystem name="smartsprites-ivy">
<ivy pattern="${basedir}/build/ivy/module/[module]-ivy-[revision].xml" />
</filesystem>
<url name="smartsprites-artifact">
<artifact pattern="http://dev.vaadin.com/svn/versions/6.8/build/smartsprites/lib/[artifact](-[revision]).[ext]" />
</url>
</dual>
</resolvers>
<modules>
<!-- GWT patched Emma -->
<module organisation="emma" name="emma" resolver="gwt-redist"/>
</modules>
<!-- IT Mill patched SmartSprites -->
<module organisation="com.carrotsearch" name="smartsprites" revision="0.2.3-itmill" resolver="custom-smartsprites"/>
</modules>
</ivysettings>

+ 38
- 0
build/ivy/module/smartsprites-ivy-0.2.3-itmill.xml View File

@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<ivy-module version="2.0" xmlns:m="http://ant.apache.org/ivy/maven">
<info organisation="com.carrotsearch"
module="smartsprites"
revision="0.2.3-itmill"
status="release"
publication="20111130000000">
<license name="BSD license" url="http://csssprites.org/smartsprites.LICENSE" />
<description homepage="http://csssprites.org">
CSS Sprites Generator Done Right. SmartSprites maintains CSS sprites in your designs,
fully automatically. No tedious copying and pasting to your CSS when adding or changing
sprited images.
</description>
</info>
<configurations>
<conf name="default" visibility="public" description="runtime dependencies and master artifact can be used with this conf" extends="runtime,master"/>
<conf name="master" visibility="public" description="contains only the artifact published by this module itself, with no transitive dependencies"/>
<conf name="compile" visibility="public" description="this is the default scope, used if none is specified. Compile dependencies are available in all classpaths."/>
<conf name="provided" visibility="public" description="this is much like compile, but indicates you expect the JDK or a container to provide it. It is only available on the compilation classpath, and is not transitive."/>
<conf name="runtime" visibility="public" description="this scope indicates that the dependency is not required for compilation, but is for execution. It is in the runtime and test classpaths, but not the compile classpath." extends="compile"/>
<conf name="test" visibility="private" description="this scope indicates that the dependency is not required for normal use of the application, and is only available for the test compilation and execution phases." extends="runtime"/>
<conf name="system" visibility="public" description="this scope is similar to provided except that you have to provide the JAR which contains it explicitly. The artifact is always available and is not looked up in a repository."/>
<conf name="sources" visibility="public" description="this configuration contains the source artifact of this module, if any."/>
<conf name="javadoc" visibility="public" description="this configuration contains the javadoc artifact of this module, if any."/>
<conf name="optional" visibility="public" description="contains all optional dependencies"/>
</configurations>
<publications>
<artifact name="smartsprites" type="jar" ext="jar" conf="master"/>
</publications>
<dependencies>
<dependency org="com.google.collections" name="google-collections" rev="0.9" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="args4j" name="args4j" rev="2.0.9" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="commons-math" name="commons-math" rev="1.1" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="commons-io" name="commons-io" rev="1.4" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="commons-lang" name="commons-lang" rev="2.3" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="junit" name="junit" rev="4.4" force="true" conf="test->runtime(*),master(*)"/>
</dependencies>
</ivy-module>

Loading…
Cancel
Save