[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [sapphire-dev] Sapphire + tycho build support
|
FYI, new page has been added:
http://wiki.eclipse.org/Sapphire_Modeling_Tycho_build_supportOn Mon, Jun 6, 2011 at 1:42 PM, Konstantin Komissarchik
<konstantin.komissarchik@xxxxxxxxxx> wrote:
Greg,
Thanks for this info. It is bound to be useful to other adopters.
There is a placeholder location for Sapphire wiki:
http://wiki.eclipse.org/Sapphire
You should be able to add a new page beneath that to hold this writeup.
- Konstantin
Hello everyone,
This is just a FYI for any users that are trying to use tycho to build their eclipse plugins that use sapphire. Below is how I setup the customBuildCallbacks.xml so the annotations processor and sapphire ant tasks would run at the right point during the build.
Here is what I did. In the pom.xml for any plugin that has sapphire generated models I modified the pom to fire off a ant script during the generate-sources phase and then had to modify the callback ant script to reference maven/tycho provided classpath references.
1) In your pom.xml used snippet [1] to launch the ant script during generate-sources
2) In customBuildCallback.xml, had to make the following changes:
2a) modify the location of ant-contrib.jar for my build environment
2b) Change the <safe-apt /> task [2] to reference classpath refs provided by maven3/tycho
2c) Change the <taskdef /> element [3] for how to find the sapphire SDK ant task
3) In my plugin.xml I had to explicitly depend on these bundles [4], so that when maven/tycho generates the classpath references it will include those two jars on the classpath. There may be a more elegant way to do encode this dependnecy in maven/pom.xml but I am not a maven expert but doing this worked.
Hope this can be of help to other sapphire+tycho users. Konstantin, is there a wiki for sapphire project that I could add this to?
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<id>generate-sources</id>
<phase>generate-sources</phase>
<ant antfile="customBuildCallbacks.xml" inheritRefs="true" />
[2] <safe-apt srcdir="src"
preprocessdir=".apt_generated"
classpathref="maven.compile.classpath"
factorypathref="maven.compile.classpath"
resource="org/eclipse/sapphire/sdk/build/antlib.xml"
classpathref="maven.compile.classpath"/>
[4] org.eclipse.sapphire.sdk
org.eclipse.sapphire.sdk.build.processor
--
Liferay, Inc. (#liferay)
_______________________________________________
sapphire-dev mailing list
sapphire-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/sapphire-dev
--
Liferay, Inc. (
#liferay)