grouper-dev - binary build script done
Subject: Grouper Developers Forum
List archive
- 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. https://bugs.internet2.edu/jira/browse/GRP-172 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
) Regards, Chris - 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 export JAVA_HOME=/home/mchyzer/java export ANT_HOME=/home/mchyzer/ant export
PATH=$JAVA_HOME/bin:$ANT_HOME/bin:/home/mchyzer/bin:$PATH - run the script, with the tag or branch: [mchyzer@ellis mchyzer]$
buildGrouperBinary.sh HEAD ... BUILD SUCCESSFUL 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/ total 44620 -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 .. [mchyzer@ellis mchyzer]$ - 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: ############################# findBadMemberships help: - 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: findBadMemberships() - find bad memberships in a specific stem (couple of
commands): subject=SubjectFinder.findById("GrouperSystem") session=GrouperSession.start(subject) stem = StemFinder.findByName(session, "test") findBadMembershipsByStem(stem) - find bad memberships in a specific group (couple of
commands): subject=SubjectFinder.findById("GrouperSystem") session=GrouperSession.start(subject) group = GroupFinder.findByName(session,
"test:testGroup") findBadMembershipsByGroup(group) ########################## 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): subject=SubjectFinder.findById("GrouperSystem") session=GrouperSession.start(subject) usdu() - you can pass in that you want to delete memberships in the
usdu call: usdu(usdu.DELETE) - you can work only in a specific subject source, pass in
the sourceId from sources.xml: usduBySource("schoolperson") - you can work in a specific source and delete membeships: usduBySource("schoolperson", usdu.DELETE) - you can work only with a specific member subject=SubjectFinder.findById("GrouperSystem") session=GrouperSession.start(subject) memberSubject=SubjectFinder.findById("1234567") member = MemberFinder.findBySubject(session, memberSubject) usduByMember(member) - usdu by member, and delete memberships: usduByMember(member, usdu.DELETE) ############################ Let me know if this broke anything, I can fix. Also, we
have a bunch of documentation changes… QUESTIONS: - 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.