[Cosmo-dev] Maven 2 conversion -- status report
Mike Taylor
bear at osafoundation.org
Thu Nov 30 20:36:43 PST 2006
I have all of the changes required to have maven 2 compile, test and
generate a war bundle for Cosmo.
I have almost all of the changes required to build an osaf-server-
bundle from the two Cosmo war files. There are a couple of bugs
specific to the Maven 2 assembly plugin that is causing me trouble:
1) The assembly plugin does not honor file permissions when unpacking
an archive file. This means that when the plugin unpacks the tomcat
zip file all of the tomcat/bin/*.sh files are missing +x
2) The assembly plugin does not carry over empty directories - so the
logs directory will have to be created by the osfsrvctl.sh script
3) The proper way to reference the Cosmo and Cosmo-docs war files
would be to use the ${pom.version} variable so that the Snarf
assembly step would pull the current version and package them, but
the bug is resolving the pom.version for a SNAPSHOT two different
ways so the server.xml file ends up with a different version
reference than the war file copied into tomcat/webapps/
Issue #1 I have a work-around for - basically modfiy osafctrl.sh to
chmod +x the tomcat/bin/*.sh files before trying to call them. It's
a short term hack until I can get the latest version of the assembly
plugin patched
Issue #3 is a little messier - the work-around for it is to not try
and pull the war file from the osaf repository but rather reference
it directly from the cosmo/target/ directory. This means that when
you (or actually me since I think I'm the only one building Snarf)
want to build a Snarf bundle you have to have run "mvn package" in
the cosmo directory first.
All of these issues are being worked on by the maven-assembly-plugin
team, it's just a matter of when they get them done.
When I have tested the above work-arounds I get a Snarf bundle that
seems to be working except that I cannot get the Cosmo login screen
and I see the following in the log file:
2006-11-30 18:55:10,101 DEBUG [CosmoUrlFilenameViewController]
Returning view name 'login' for lookup path: /login
2006-11-30 18:55:10,116 INFO [http-operations] GET /cosmo/js/lib/
dojo-event_and_io/dojo.js null http 84D5724A1FC2BAB3310C90E1926F59E1
2006-11-30 18:55:10,137 INFO [http-operations] GET /cosmo/js/cosmo/
ui/ui.conf.js null http 84D5724A1FC2BAB3310C90E1926F59E1
2006-11-30 18:55:10,144 INFO [http-operations] GET /cosmo/js/cosmo/
ui/styler.js null http 84D5724A1FC2BAB3310C90E1926F59E1
2006-11-30 18:55:10,149 INFO [http-operations] GET /cosmo/js/cosmo/
util/cookie.js null http 84D5724A1FC2BAB3310C90E1926F59E1
2006-11-30 18:55:10,151 INFO [http-operations] GET /cosmo/js/cosmo/
util/log.js null http 84D5724A1FC2BAB3310C90E1926F59E1
2006-11-30 18:55:10,154 INFO [http-operations] GET /cosmo/js/cosmo/
util/popup.js null http 84D5724A1FC2BAB3310C90E1926F59E1
2006-11-30 18:55:10,234 INFO [http-operations] GET /cosmo/js/cosmo/
ui/global.css.js null http 84D5724A1FC2BAB3310C90E1926F59E1
Now I have verified that the named files are present in tomcat/
webapps/cosmo/WEB-INF/cosmo/js/cosmo/ui/ directory and I've also done
a file/directory diff against my new bundle and a maven 1 generated
bundle - no differences except the one jar file that is no longer
needed in a maven 2 build.
Now, if you have followed my ramblings so far, this is where I need
some dev help. Can one of you guys take a look at the generated
Snarf bundle and let me know where I messed up? To build one you
will need to do the following:
- cd to your cosmo trunk tree
- cd src/main/
- ln -s ../webapp webapp (this is needed until we throw the maven
2 switch)
- cd ../..
- mvn clean package (this will compile, test and generate target/
cosmo-0.6-SNAPSHOT.war)
- cd snarf
- mvn clean assembly:directory
Maven will have created in the dist/ directory the image it would us
to create the tarball
- cd dist/osaf-server-bundle-0.6-SNAPSHOT-/osaf-server-bundle-0.6-
SNAPSHOT/ (yes, I know here is a trailing - in there)
This puts you at the base of the snarf bundle - to start cosmo:
- mkdir logs (maven 2 assembly plugin doesn't like empty directories)
- ./bin/osafsrvctl start
thanks!
---
bear
Build and Release Engineer
Open Source Applications Foundation (OSAF)
bear at osafoundation.org
http://www.osafoundation.org
bear at code-bear.com
http://code-bear.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osafoundation.org/pipermail/cosmo-dev/attachments/20061130/d372576d/attachment.htm
More information about the cosmo-dev
mailing list