Subject: Grouper Developers Forum
- From: Chris Hyzer <>
- To: Grouper Dev <>
- Subject: binary build script done
- Date: Mon, 29 Sep 2008 00:56:26 -0400
- Accept-language: en-US
- Acceptlanguage: en-US
This is done: a build target to make a binary distribution of Grouper.
Basically this is ready to use (e.g. through GSH or the loader etc, not UI or WS), and does not require ant. Unzip and go (well, you probably want to set the DB to your database and maybe other configurations unless you like blank hsqldb databases… J )
- I added a script to run this from SSH in cvs.internet2.edu so any of us can reliably do the build with the same java version, ant version, etc…
- First you need to set some environment variables, and you should probably add these to your homeDir/.bash_profile
- run the script, with the tag or branch:
[mchyzer@ellis mchyzer]$ buildGrouperBinary.sh HEAD
Total time: 44 seconds
result is in /tmp/grouper/build_mchyzer/grouper/dist/binary/
[mchyzer@ellis mchyzer]$ ls -lat /tmp/grouper/build_mchyzer/grouper/dist/binary/
-rw-r--r-- 1 mchyzer i2mi 23541475 Sep 29 00:43 grouper.binary.1.4.0.zip
drwxr-xr-x 3 mchyzer i2mi 4096 Sep 29 00:43 .
-rw-r--r-- 1 mchyzer i2mi 22077421 Sep 29 00:43 grouper.binary.1.4.0.tar.gz
drwxr-xr-x 6 mchyzer i2mi 4096 Sep 29 00:42 grouper.binary.1.4.0
drwxr-xr-x 5 mchyzer i2mi 4096 Sep 29 00:42 ..
- note the output dir is based on the user who runs the script...
- I keep the build script in cvs under grouper/misc/buildGrouperBinary.sh… (though if you want to update it you have to manually copy to the server [as me])
- jars, renamed to not have version, but made sure the version is in the manifest of each jar. At some point we can consider Gary's idea of generating the README.txt from the manifests... there is other info not in the manifest, we would need to add (e.g. when in grouper, why, what the liecense is, etc)
- moved jars to the new directory structure... you need to merge your bat and sh files with the new examples since the path to the invoker changed...
- moved buildGrouper.properties to basedir, and renamed to build.example.properties and build.properties. Removed the classes in grouper which make these properties available (should only be needed during build)
- took src.dir.conf from build.properties, removed dir src/conf.
- set the log dir to "logs", and will auto-create log parent dir if not exist. This requires using GrouperUtil.getLog rather than LogFactory.getLog
- took out impl.version from build file, and put it in misc/version.properties, since we shouldnt rev build.xml for each new version... and shouldnt have to worry about accidentally merging it
- script to checkout and build from cvs.internet2?
- since we dont want to distribute the grouper test classes/resources with grouper, there is a bat/sh script to run the tests with the binary distribution: bin\groupertest.bat
- added registryInitializeSchema to gsh:
registryInitializeSchema() will generate schema DDL for the DB, and wont drop before creating, will not run script
registryInitializeSchema(registryInitializeSchema.DROP_THEN_CREATE) generate DDL for the DB, dropping existing tables, will not run script
registryInitializeSchema(registryInitializeSchema.WRITE_AND_RUN_SCRIPT) generate DDL for the DB, not dropping, but will run the script after writing it to file
registryInitializeSchema(registryInitializeSchema.DROP_THEN_CREATE | registryInitializeSchema.WRITE_AND_RUN_SCRIPT) generate DDL for the DB, drop existing grouper tables, and run the script after writing it to file
- took out extraneous ant targets: clover stuff, cpd, bench stuff, find bugs, xmlexport, xmlimport, pmd, info (moved to GSH version)
- removed outdated files: KNOWN_ISSUES.txt, NEWS.txt
- we discussed converting usdu and findBadMemberships to GSH... so I took a pass at this. Feel free to give feedback to move things around or undo or whatever. I have a system for options in GSH (e.g. usdu, registrySchemaInitialize), where ints are passed and or'ed to combine... see GSH help for info:
- this command will find membership records in the database which are invalid,
and prints them on the screen, along with scripts that will fix the memberships
- here is an example is a complete findBadMemberships run:
- find bad memberships in a specific stem (couple of commands):
stem = StemFinder.findByName(session, "test")
- find bad memberships in a specific group (couple of commands):
group = GroupFinder.findByName(session, "test:testGroup")
usdu help: unresolvable subject deletion utility
- usdu finds which memberships are with subjects which cannot be found in a subject source,
and prints them on the screen
- if the usdu.DELETE option is passed in, then the memberships will be deleted
- a grouper session must be open when this command is run.
- here is an example is a complete usdu run (a couple of commands):
- you can pass in that you want to delete memberships in the usdu call:
- you can work only in a specific subject source, pass in the sourceId from sources.xml:
- you can work in a specific source and delete membeships:
- you can work only with a specific member
member = MemberFinder.findBySubject(session, memberSubject)
- usdu by member, and delete memberships:
Let me know if this broke anything, I can fix. Also, we have a bunch of documentation changes…
- what about the hsqldb tasks in ant, those dont work for me, are they useful for anyone?
- I assume we need ant test, so that extensions can be tested. Right now we have a bat/sh for normal tests, thuogh it doesnt take any options (any we want to support)
- do we still need eg.bootstrap?
- binary build script done, Chris Hyzer, 09/29/2008
Archive powered by MHonArc 2.6.16.