Compiling Java 1.6 projects using Maven on Mac OS X

Posted December 1st, 2009 in Personal by jayshao

Compiling Java 1.6 projects using Maven on Mac OS X

This makes much sense (took a few minutes though) had my JVM defaulted to JDK 5 from Eclipse 3.4 which wouldn’t run on the 64-bit Java 6 VM – easy fix though – personally I prefer changing the symlinks in /System/Library/Frameworks/JavaVM.Framework/ to point to the JDK version myself…

Shooting myself in the foot w/maven:release

Posted October 30th, 2009 in Commentary by jayshao

I was using mvn:release (release:prepare, release:perform) to release a number of modules today (for several hours – so much for speeding up through automation) but kept getting errors to the effect of:

[INFO] Error deploying artifact: Authentication failed: Cannot connect. Reason: Auth fail
[INFO] Error deploying artifact: Authentication failed: Cannot connect. Reason: Auth fail
It looks like the reason boiled down to extra, old passwords in my .m2/settings.xml file. Go figure. Quite an interaction between servers, scm, repository tags though – mostly blogging this since I’m sure I’ll quickly forget through the magic of copy&paste.

BDD with easyb

Posted July 19th, 2009 in Commentary, Work by jayshao

Recently I’ve grown increasingly fond of the concepts embodied in the “Behavior Driven Development” (BDD) outgrowth of “Test Driven Development” (TDD) and “Domain Driven Design” (DDD) . BDD is a neat twist on TDD and DDD that strives to more closely tie automated tests with both the “ubiquitous language” terminology espoused in DDD, along with an Agile-style tight integration with business users in defining the TDD tests.

A great challenge with implementing TDD I think has been the difficulty in writing tests first — often driven by a difficulty in amassing sufficient detail in terms of requirements and acceptance tests to truly generate specifications for test-first development. Too often TDD ends up being a case of writing tests after-the fact to test code which we’ve written to incomplete conceptions of what the code needs to do.

A number of toolkits have emerged recently for BDD — and recent reading at http://www.agiledeveloper.com (which has some truly awesome content) led me to a PPT on BDD using easyb. Easyb provides some tools (built around Groovy) for restructuring your code to have unit/acceptance tests written in a smooth DSL — this especially appeals to me given it’s close congruence with the way my team at CampusEAI has moved to handling our requirements and user-stories.

Cutting to the chase, easyb lets you express acceptance tests in code that looks like:

1
2
3
4
5
6
7
8
9
10
11
narrative 'description', {
as_a 'account holder'
i_want 'depost money'
so_that 'whatever benefit...'
}

scenario 'deposit money', {
given 'account 12345'
when 'deposit 10000'
then 'balance of account 12345 goes up by $10000'
}

These scenarios can then be directly tied to acceptance tests in code, and there’s even nice support for putting them in without implmeentations to be marked as “pending”. The overall sytax looks inspired by RSpec, but tied into Java. There’s even some nice reporting builtin to handle producing reports — plaintext here:

9 behavior steps executed successfully
 Story: blackjack
  scenario tie game when cards are dealt but dealer gets higher card
    given a game a blackjack game and both players have a score of 10
    when the dealer gets an Ace and you get a 10
    then the dealer should win
  scenario tie game when cards are dealt but player gets higher card
    given a game a blackjack game and both players have a score of 10
    when the dealer gets a 10 and you get an Ace
    then the player should win

– looks like this would hook in well to Maven to incorporate into something like a Maven site/build process, with some tasks existing — dreaming about a report in Hudson to graph this….

Maven, Tools.jar, and Macs

Posted July 10th, 2009 in Commentary by jayshao

On the Mac, was using some maven build scripts (well, ANT wrapped in Maven) recently that had references to tools.jar. This is problematical on the mac, since Apple repackages tools.jar (some bits go in Classes.jar) and ironic since some of the classes are already available, so it’s an unecessary error. Some digging revealed a recipe for using profiles to fix this:

https://jira.jboss.org/jira/browse/JASSIST-44

Maven 2 tar.gz issues

Posted January 8th, 2008 in Sakai by jayshao

I reinstalled my local copy of maven2 recently, and thought I’d add into to google a problem I experienced trying to unarchive the tar.gz or tar.bz2 flavors of their binary distribution. (.zip files seem fine)

The problem shows itself while extracting — tar reports “tar: A lone zero block at 2970″. Some googling seems to trace the problem to a maven/ANT lib problem encoding tar files. I got this with both 2.0.8 and 2.0.7, possibly with other releases as well.

New Macbook Pro

Posted April 16th, 2007 in Commentary by jayshao

Got a new Macbook Pro (gotta add the pro at the end) at work, and have literally spent the whole day adding in all the stuff I “need” to make it my own development box. It’s amazing how much stuff you end up with that you quickly come to rely on. My short list seems to include:

  • Quicksilver
  • Macports
  • NetNewsWire & Marsedit
  • WeatherPop Advance
  • Textmate
  • Omni Group Stuff (Omnigraffle Pro & Outliner Pro)
  • Micrsoft Office: Mac
  • Eclipse & Webtools
  • SVN (through Macports)
  • … which means Apple’s developer tools, for GCC
  • Maven
  • Colloquy

And I’m sure a whole bunch of crap that I’m forgetting right now… It’s amazing how easy it is to justify all this upfront investment for productivity down the line :)

Comments Off

Resume

Posted November 6th, 2006 in Commentary by jayshao

Jason Shao

Jason Shao

Sr. Java Developer at ContextWeb

Greater New York City Area

Current
Past
  • Director of Product Development at CampusEAI
  • Board Member at Jasig
  • Director of Open Source Solutions at CampusEAI

4 more...

Education
  • Rutgers, The State University of New Jersey-New Brunswick
Connections
322 connections
Industry
Information Technology and Services
Websites

Summary

I enjoy producing software which gets used, that users can look at and think "this solves a problem." I'm particularly interested in portlets and Web 2.0 (the Read-Write web) and the implications/oportunities of increasingly inter-linked, meta-data enhanced digital information. Automatic population & analysis of meta-data and the scalability of ad-hoc "folksonomies" seem like they'll be particular important as we shift to an increasingly user-produced content & service model.

Specialties:

Web Development, CAS, uPortal, Liveray, Portals, Portlets (JSR-168), Sakai, LMS, VLE, Identity Management, IDM, Java, J2EE, Spring Framework, Spring Security, Spring Portfolio, Spring Modules (Caching, Validation), Servlet, JSP, JSTL, Eclipse, ANT, Maven, SQL, Oracle, PostgreSQL, MySQL, Internet Technologies, XSLT, XML, (X)HTML, CSS, DDD, BDD, TDD, CVS, SVN, OpenID, iCal, IMAP, POP, SMTP, Standards Compliant & Accessible Content Authoring, Agile, SCRUM, LEAN


Experience

  • Sr. Java Developer

    ContextWeb

    (Privately Held; Online Media industry)

    January 2010Present (3 months)


Education

  • Rutgers, The State University of New Jersey-New Brunswick

    B.S. , Computer Science , 19992004

    Sigma Phi Epsilon Fraternity President, IFC President, Targum Publishing Company Marketing Director, RHA Hall President

    Activities and Societies:
    Sigma Phi Epsilon, IFC, Army ROTC, Targum Publishing Company, Rutgers College General Honors Program, RHA Hall Government

Additional Information

Websites:

Interests:

open-source, software development methodologies, user interaction & interfaces, Web 2.0, technology, IP law

Groups:

IEEE, NYC Java User Group (JUG), JA-SIG, Sigma Phi Epsilon, Boy Scouts of America, Sakai

  •    International Association of Software Architects
  •    Sakai Community
  •    The Official IEEE Group
  •    Rutgers Alumni
  •    Open Source
  •    Scrum Practitioners
  •    Java Developers
  •    ITANA
  •    Eagle Scouts of America
  •    Higher Education Professionals
  •    Jasig uPortal developers
  •    Domain Driven Design
  •    EDUCAUSE
  •    Rutgers Sigma Phi Epsilon
  •    jQuery Framework
  •    Agile CMMI
  •    The Daily Targum Alumni (Official)
  •    Linked Local On The Central Jersey Shore
  •    Banner ERP Professionals Network
  •    Getting Things Done® - Network of GTD® Enthusiasts

Honors:

Order of the World Wars, 2002
Henry Ruck Scholar, 2001
Sigma Phi Epsilon Scholar, 2001
Eagle Scout, 1999