An IRC Chat Transcript that will form the basis of a description of how to build distributiuons using maven
at the end of the discussion the extracted files looked like this sdo_distribution.zip
<kgoodson_away> jboynes are you there?
=-= YOU are now known as kgoodson
[INFO] You are no longer marked as away.
<jboynes> yes but otp
<kgoodson> ok, np, perhaps later
<jboynes> 10 min?
<kgoodson> sure, thanks
<kgoodson> lresende did you see that jeremy will be available soon?
<lresende> yes
<jboynes> winding up :)
<kgoodson> ok, great, let us know when you are free
<lresende> i'm ready too kgoodson
<jboynes> ok, sorry about that
<jboynes> these things always seem to run long
<kgoodson> no problem, its about the separate packaging thread on the mailing list
<jboynes> ok
<kgoodson> lresende pinged me to say he was thinking of the ssame for das
<jboynes> saw your note - that should be trivial
<jboynes> doing that for das would be simple
<jboynes> as well
<kgoodson> ok, thats great, but im a true novice, so how can we best make use of your expertise, can you take us through what we need to do?
<jboynes> sure
<lresende> great
<jboynes> have you had a chance to look at the assembly plugin?
<kgoodson> i took a look at the web page you mentioned, but haven't delved into detail
<jboynes> want a quick summary?
<kgoodson> yes please
<jboynes> ok
<jboynes> what it does is enable you to produce distribution assemblies as part of the build
<jboynes> it gathers together all the files etc. and generates an output archive as a zip/tgz/rpm etc.
<jboynes> it doesn't compile/test or anything, it really just assembles stuff together
<jboynes> it is configured using two sources: the pom and an assembly descriptor
<jboynes> the pom is a standard maven pom and defines what the dependencies are and what version to use
<jboynes> the descriptor defines the layout of the distribution archive
<jboynes> so what output directories there are and what files go in them
<jboynes> files come from two sources - things in the assembly project itself or dependencies in the pom
<jboynes> ok, I just committed a skeleton in java/distribution/sdo
<jboynes> it is not complete yet ;)
<kgoodson> thats great, but I have been having lots of trouble with svn update today, so i'll see if i can get it out
<lresende> ok, i'm getting that... i'll take a look
....
<jboynes> ok, update again :)
<jboynes> I added an empty assembly descriptor as well
....
<kgoodson> so we just run plain "mvn" against the pom file in distro/sdo yes?
<jboynes> yes that should work
....
<jboynes> if you "jar tvf target/sdo-1.0-SNAPSHOT-bin.zip" you should see it contains license and notice files
<kgoodson> jboynes i get a build error
<kgoodson> just investigating -- here it is ...
<kgoodson> Error reading assemblies: Error locating assembly descriptor file: C:\Development\Tortoise\1\distribution\sdo\src\main
\assembly\sdo.xml
and indeed the folder is empty, despite another svn update
<jboynes> sorry, update again
<jboynes> that is the error you get when you forget to check in the descriptor
<kgoodson> np, rebuilding now :-)
<kgoodson> yes, i see the zip files in target now
<jboynes> ok, so we have the plugin executing and building an archive based on the descriptor
<jboynes> the legal files are added by the <fileSets> element in the descriptor
<kgoodson> ok, i see that
<jboynes> you can add any files you want from this module
<jboynes> useful for readmes and other things that relate to the distro
<jboynes> the other element in there is <dependencySets> which allow you to add dependencies from the pom
<jboynes> and which also add all transitive deps as well
<jboynes> so lets add the sdo impl
<kgoodson> sounds good!
<jboynes> first we declare a dependency in the pom
<jboynes> http://rafb.net/paste/results/XVkO3n83.html
... insert ...
Index: pom.xml
===================================================================
--- pom.xml (revision 430389)
+++ pom.xml (working copy)
@@ -24,9 +24,17 @@
<description>Tuscany Distribution for SDO.</description>
<properties>
- <sca.version>1.0-SNAPSHOT</sca.version>
+ <sdo.version>1.0-SNAPSHOT</sdo.version>
</properties>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany</groupId>
+ <artifactId>tuscany-sdo-impl</artifactId>
+ <version>${sdo.version}</version>
+ </dependency>
+ </dependencies>
+
<pluginRepositories>
<pluginRepository>
<id>apache-snapshot</id>
... end insert ...
<kgoodson> got that thanks
<jboynes> and then we include the dependency in the assembly
<jboynes> http://rafb.net/paste/results/5cUG5q80.html
... insert ...
Index: src/main/assembly/sdo.xml
===================================================================
--- src/main/assembly/sdo.xml (revision 430393)
+++ src/main/assembly/sdo.xml (working copy)
@@ -33,6 +33,13 @@
</fileSets>
<dependencySets>
+ <dependencySet>
+ <outputDirectory>lib</outputDirectory>
+ <includes>
+ <include>org.apache.tuscany:tuscany-sdo-impl</include>
+ </includes>
+ <fileMode>644</fileMode>
+ </dependencySet>
</dependencySets>
</assembly>
Index: pom.xml
===================================================================
--- pom.xml (revision 430389)
+++ pom.xml (working copy)
@@ -24,9 +24,17 @@
<description>Tuscany Distribution for SDO.</description>
<properties>
- <sca.version>1.0-SNAPSHOT</sca.version>
+ <sdo.version>1.0-SNAPSHOT</sdo.version>
</properties>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany</groupId>
+ <artifactId>tuscany-sdo-impl</artifactId>
+ <version>${sdo.version}</version>
+ </dependency>
+ </dependencies>
+
<pluginRepositories>
<pluginRepository>
<id>apache-snapshot</id>
... end insert ...
<kgoodson> ok
<jboynes> (update to get the changes)
<kgoodson> done
<jboynes> if you build now and jar t the archive you should see it contain the sdo jar plus all of its dependencies
<kgoodson> yes i have that!
<kgoodson> and it has dragged the api by way of the transitive nature of dependencies
<jboynes> yes
<jboynes> that's basically it
<kgoodson> ok, so the pattern is established fully , yes? I guess I'll need to put in javadoc, readme, samples, tooling for code gen, do you think I am now set to do all that
<jboynes> I think the pattern is there
<kgoodson> jboynes, many thanks for your time
<jboynes> the only thing is I would suggest setting up a directory under source where things like readme and scripts can go
<jboynes> e.g. src/main/"something"
<jboynes> and add that as a second fileset
<kgoodson> so juyst to be clear, that's under distribution/sdo/src/main
<jboynes> yes
<jboynes> e.g src/main/distrib/bin/foo.bat
<jboynes> and add src/main/distrib as the source for the fileset with outputDirectory empty
<jboynes> that will copy all files from src/main/distrib into the output archive
<jboynes> or you might have src/main/bin as a separate fileset with the execute bit set (mode 755)
<jboynes> personally I'd distribute the samples and javadoc separately but that's up to you :)
<lresende> and, so.. i just need to follow similar aproach and use sample sdo skeleton as model for DAS, right ?
<jboynes> yes
<Venkat> kgoodson.. is it possible for you to collate whatever jboynes has mentioned here and put it over the wiki..
<Venkat> just to capture it there.. we will trim it as we go along...
<jboynes> gotta run guys - another phone call
<kgoodson> venkat yes, i can do that
<kgoodson> thanks again
<Venkat> thanks... :)
<lresende> thanks jboynes