tag:blogger.com,1999:blog-245256842024-02-20T17:24:29.061+00:00The Music of TimeThis is not, unfortunately, a blog dedicated to that great twelve volume series of novels by Anthony Powell. However, it is a form of record of my journey through the world of information technology; a journey motivated by both profit (it is intimately related to my profession) and inquisitiveness (I love to know how things work).
It is my intention, therefore to record. These records are primarily for my benefit, but may be useful to others as a side effect.Unknownnoreply@blogger.comBlogger128125tag:blogger.com,1999:blog-24525684.post-19653046520137637312012-10-04T11:50:00.000+00:002012-10-04T11:50:07.317+00:00Writing Unit Tests to Ensure Your "@Transactional ... rollbackFor" Annotations are Honoured<b><i>Thanks to Russ Hart for providing the info on how to get this to work. I just cut and paste, and then blogged it.</i></b><br />
<br />
It's nice to write unit tests. I wanted to write a set of tests for a method that I'd marked with the Spring @Transactional annotation:<br />
<br />
<br />
<span style="font-size: x-small;"> <span style="font-family: Courier New, Courier, monospace;">@Transactional(propagation = Propagation.MANDATORY, rollbackFor = {MessagingException.class})</span></span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> @Transformer</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> public IncomingEmailDTO receiveMessage(Message<mimemessage> message) throws MessagingException {</mimemessage></span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> IncomingEmailDTO emailDTO = null;</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> ...</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: inherit;">The tests for the method were simple. But then I realised I wanted to also test that rollbacks were happening or not as required as specified by the "</span><span style="font-family: 'Courier New', Courier, monospace;"><span style="font-size: x-small;">rollbackFor = {MessagingException.class}</span></span><span style="font-family: inherit;">" part of the annotation.</span><br />
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;">A quick aside (because I was asked this by the person who gave me the solution to this, and it's entirely valid). Why did I want to test this? Aren't I just testing that this Spring annotation works? In part, yes, this will be the effect of any tests for this. But there was something else I wanted. Unit tests, over time, build into a massive, executable spec. for your system. It would be very easy for someone in the future to change this small part of the annotation (or remove it altogether) and have a very significant effect on the running of the whole system. Consequently, by adding tests which check that this test is a) </span>transactional, and b) set to rollback for specific exceptions only; I can protect myself against this unfortunate outcome.<br />
<div>
<br /></div>
<div>
But back to the example. </div>
<div>
<br /></div>
<div>
We had the following Spring XML config:</div>
<div>
<blockquote class="tr_bq">
<blockquote class="tr_bq">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><?xml version="1.0" encoding="UTF-8"?></span></blockquote>
<blockquote class="tr_bq">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"</span></blockquote>
<blockquote class="tr_bq">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> xmlns="http://www.springframework.org/schema/beans"</span></blockquote>
<blockquote class="tr_bq">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> xmlns:context="http://www.springframework.org/schema/context"</span></blockquote>
<blockquote class="tr_bq">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> xmlns:tx="http://www.springframework.org/schema/tx"</span></blockquote>
<blockquote class="tr_bq">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd</span></blockquote>
<blockquote class="tr_bq">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd</span></blockquote>
<blockquote class="tr_bq">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.1.xsd"></span></blockquote>
<blockquote class="tr_bq">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> </span></blockquote>
<blockquote class="tr_bq">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <context:annotation-config /></span></blockquote>
<blockquote class="tr_bq">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <tx:annotation-driven transaction-manager="transactionManager" /></span></blockquote>
<blockquote class="tr_bq">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"></span></blockquote>
<blockquote class="tr_bq">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <property name="dataSource" ref="dataSource"/></span></blockquote>
<blockquote class="tr_bq">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> </bean></span></blockquote>
<blockquote class="tr_bq">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"></span></blockquote>
<blockquote class="tr_bq">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <property name="driverClassName" value="oracle.jdbc.OracleDriver"/></span></blockquote>
<blockquote class="tr_bq">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <property name="url" value="jdbc:oracle:thin:@localhost:1521:MYSID"/></span></blockquote>
<blockquote class="tr_bq">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <property name="username" value="ME"/></span></blockquote>
<blockquote class="tr_bq">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <property name="password" value="ME"/></span></blockquote>
<blockquote class="tr_bq">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> </bean></span></blockquote>
<blockquote class="tr_bq">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"></beans></span></blockquote>
</blockquote>
</div>
<div>
And then in our unit test we had to have the following:</div>
<div>
<br /></div>
<div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">@ContextConfiguration(locations = {"classpath:spring/appContext-incomingEmailReceiverTest.xml"})</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">@RunWith(SpringJUnit4ClassRunner.class)</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">public class IncomingEmailTransformerTest {</span></div>
<div>
<br /></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> @Autowired</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> private PlatformTransactionManager transactionManager;</span></div>
</div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><span style="font-size: x-small;"> </span><span style="font-size: x-small;">@Transactional</span></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> @Test</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> public void test_transform_valid_incoming_email_with_no_attachment_works_and_no_rollback()</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> throws MessagingException {</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> </span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> IncomingEmailDTO result = emailTransformer.receiveMessage(validInputMessage);</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> assertFalse(transactionManager.getTransaction(null).isRollbackOnly());</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> }</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> </span><span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">@Transactional</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> @Test</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> public void test_MessagingException_when_extracting_originator_gets_thrown_and_tx_rolls_back()</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> throws MessagingException {</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> stub(mockEmailDataExtractor.extractOriginator(incomingEmailMessage)).toThrow(new MessagingException());</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> </span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> IncomingEmailDTO result = emailTransformer.receiveMessage(validInputMessage);</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> assertTrue(transactionManager.getTransaction(null).isRollbackOnly());</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> }</span></div>
<div>
<br /></div>
<br />
<div>
And there we have it.</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-24525684.post-6213435696972241382010-11-02T09:20:00.003+00:002010-11-02T13:13:19.224+00:00Track Technical Debt with @Debt - v0.0.1 Available<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; "><p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.6em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.2em; ">The @Debt annotation can be used in Java 6 or above to measure in code instances of technical debt. If a configurable threshold is exceeded then the build will fail.</p><p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.6em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.2em; ">It is intended to be used by both developers and dev leads. The number one use case is the situation when expediency has driven you to make a design or implementation decision which you are not 100% happy with. Normally you will moan to yourself quietly, write the less-than-pretty code, and move on. If you are lucky you will remember the exact position where this trade-off was cast in stone; but probably you will not. Then in the future, you hit the problem again, and again there is no time to put in a "nicer" implementation. You grumble again, and move on. If only there was a way to mark all the occurrences of this technical debt, and to indicate every time it later causes you real development pain.</p><p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.6em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.2em; ">The @Debt annotation lets you do this. Now, when you make the concession, you quickly add the "@Debt" to the member in question (adding a quick description string and set the counter to "1") and move on. Later on, when you hit it again, you just increment the counter. Meanwhile, behind the scenes, at every build you are automatically trawling through your codebase and crunching all this debt and keeping a track of it. How debt-ridden is a given part of your code? Now more than relying on smells alone, you can have a look at the @Debt output and have a real idea.</p><p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.6em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.2em; ">But beware! You need to be disciplined in your marking and updates of your @Debt trackers. Otherwise it's as useless as thoise unit tests which now fail so you switched off. You have been warned!</p><p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.6em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.2em; "><br /></p><p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.6em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.2em; ">Get it here: <a href="http://kenai.com/projects/csdutilities/downloads">http://kenai.com/projects/csdutilities/downloads</a></p></span>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-24525684.post-45061909836365921132010-10-28T16:11:00.002+00:002010-10-28T16:21:34.844+00:00Reuse (ii): Definition of DoneAs I said in my <a href="http://the-music-of-time.blogspot.com/2010/10/reuse-i-way-of-working.html">previous post</a>, our project has suddenly taken a new path. There are two bits of collateral which I'd recently produced which will now no longer be required. Here are the notes for myself, and anyone else who might be intetested.<br /><br /><span style="font-size:130%;">Part (ii) - Definition of Done</span><br /><br />INTEGRATION READY<ul><li>Code Committed (associated with Task and commented meaningfully)<br /></li><li>Code Review (if required / requested) Completed<br /></li><li>Unit Tested</li><li>Static Analysis Checks (Findbugs, PMD, Checkstyle, Cobertura) passed based on thresholds<br /></li><li>Acceptance Tested against Acceptance Criteria</li><li>Story / Defect, Design Decisions, and Test Plan, Conditions and Results documented on Wiki</li><li>Acceptance tests automated and added to Regression Suite</li><li>Story / Defect added to Release Note (including installation and admin instructions)</li><li>Story and all Tasks updated and set to "Ready for Review"</li></ul>INTEGRATED AND RELEASED<br /><ul><li>System Integration Testing completed</li><li>Test Plan, Conditions and Results documented on Wiki</li><li>Release tagged in SCM</li><li>Maven version numbers updated</li><li>Artifacts published to Artifactory<br /></li></ul>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-24525684.post-70743144164850590382010-10-28T15:48:00.005+00:002010-10-28T16:22:09.417+00:00Reuse (i): Way of WorkingOur project has suddenly taken a new path. There are two bits of collateral which I'd recently produced which will now no longer be required. Here are the notes for myself, and anyone else who might be intetested.<br /><br /><span style="font-size:130%;">Part (i) - Way of Working for an Agile Distributed Team</span><br /><ul><li>3 week iterations (all teams starting and ending on the same days)<br /></li><li>Sprint Planning with the teams (Planning Poker for Stories, hours for tasks)</li><li>Daily Scrums (3 questions plus "What have your learned?")</li><li>Prioritised Backlog (Stories for the next-up phases, Use Cases for further out, Epics beyond that)</li><li>Product Owners own Product Backlog<br /></li><li>Release Plan (always visible with named internal releases each iteration)<br /></li><li>Defects, Technical Stories (NFR's) and Technical Risks on the Product Backlog too</li><li>Cross Functional Teams (UI Designers, Product Owners, Designer / Developers, Testers)</li><li>Core Services Team (Environments, CM, CI, DBA)<br /></li><li>Crozz Timezone Teams (no primary location - Scrum Masters could be anywhere)</li><li>Scrum of Scrums (meeting 2-3 times a week)</li><li>Demos each iteration with client Acceptance / Signoff</li><li>Empowered Onsite Clients (but not full time)</li><li>Retrospectives every Iteration<br /></li><li>Definition of Done (see <a href="http://the-music-of-time.blogspot.com/2010/10/reuse-ii-definition-of-done.html">part (ii)</a>)<br /></li><li>Automated Integration Tests (captured with Selenium from Wireframes before development)</li><li>Automated Acceptance Tests / Regression Tests (ensuring "Accepted Functionality never gets lost)</li><li>IBM RTC for Stories, Tasks, Defects</li><li>IBM RTC for SCM</li><li>Hudson for CI<br /></li><li>Virtual Taskboards (IBM RTC)<br /></li><li>Each teams Velocity tracked and displayed</li><li>Product Burnup displayed as Lean Cumulative Flow Diagrams</li><li>Sprint Burndowns tracked and displayed</li><li>Teams (Re)Plan and (Re)Estimate every Iteration</li><li>System Testing within an Iteration</li><li>Hudson and RTC Radiators (builds and graphs displayed on Screens plus audible feedback from HudsonTracker)</li><li>Collaborative workspaces (whiteboards, pens, post-its, breakout areas)</li><li>Regular High Bandwidth COmmunications (Eyecatcher VC Units, MSCommunicator VoIP, desktop sharing)</li><li>No changes during an Iteration</li></ul>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-24525684.post-60730507004967106402010-10-28T14:00:00.002+00:002010-10-28T14:07:29.167+00:00Hudson and RTC - Cowley 1.0.1 ReleasedI've had some time recently and managed to get back to looking at my Hudson RTC plugin. I found a lot of things making the 1.0.0 version really unstable and have made some updates and come up with 1.0.1.<br /><br />To get it and start getting the Hudson build love in your RTC projects visit the <a href="http://kenai.com/projects/cowley/pages/Home">project site</a>.<br /><br />Please let me know too how it works for you - the site has an issue tracker so please log all bugs and RFE's there.<br /><br />There are some extra features I'm working on for 2.0.0 which hopefully will be along soon including change set parsing (let Hudson know just who's changes sparked a build), personal builds, and automated releases. Watch this space...Unknownnoreply@blogger.com10tag:blogger.com,1999:blog-24525684.post-91604756780109630922010-06-20T20:58:00.002+00:002010-06-20T21:01:47.923+00:00Achieving Agility with IBM Rational Team Concert SCM - Powerpoint SlidesAs promised, here is a link to the slides I presented at the recent IBM Innovate 2010 - "<a href="http://kenai.com/projects/cowley/sources/source-code-repository/content/jazz-hudson-scm/docs/Achieving%20Agility%20with%20IBM%20RTC%20SCM.pptx?rev=9">Achieving Agility with Rational Team Concert SCM</a>". Hopefully they're useful to you.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-24525684.post-19323791517081025622010-05-28T08:20:00.004+00:002010-06-08T21:36:47.315+00:00Notes from a Reluctant CM/CI/Release ManagerI'm in the midst of transitioning out of my role as a CM/CI/Release Manager. I've learned a lot while doing it (some things the easy way, some the hard way), and thought I'd blog my conclusions and lessons learned so I don't make the same mistakes then next time.<br /><br /><span style="font-size:180%;">Grow; Gradually</span><br />There is immense value in even a small bit of SCM, build automation, or CI feedback. As long as your approach is flexible (and if your tools don't support this then seriously consider changing your tools).<br /><br />What does this mean in practice?<br /><ul><li>For SCM, choose a tool, (a free one preferably as this is quicker), get it installed, and get everyone checking in their code and other artefacts early. In my experience a distributed SCM (i.e.Git or Mercurial, or even Jazz SCM) is best as it's structure can easily be changed as the project changes over time.</li><li>For build automation, choose anything (Ant, Maven, Rake, hell even shell scripts) but get it set up at the start and have all your bits use it. Also seperate the build from the environment right from the start. This makes it very flexible.</li><li>For CI choose Hudson (IMHO it's the best engine at the moment by a country mile). Get it set up on a dedicated server right away (this will take 30 minutes) and get it polling your SCM, running builds, and going all red/yellow/green right from the outset.<br /></li></ul><span style="font-size:180%;">Start with a Small, Simple, Core Build as Early as Possible</span><br />Continuing on from the last tip, you want to depend upon Hudson from the outset. Get the team aware of the benefit of the feedback it provides. Make it the team's friend, rather than their enemy.<br /><br />To do this resist the urge to get clever to begin with. A single build will do at the begnning. You can grow it later. You'll read all about upstream and downstream builds and promotion and everything else. These are all great concepts, and you will use them, but nt yet. Implement them when the time investment warrants it. At the outset, your code base will be tiny, and you will have few Unit Tests. Don't worry about your build speed. It's not slow yet. Just get the code compiling, and the unit tests running.<br /><span style="font-size:180%;"><br />Ensure the Whole Dev Team Understands how their SCM Tool Works</span><br />Your SCM is a powerful tool. If you understand it beyond the basic "checkin/checkout" dynamics it will allow you to have maximum confidence in the code you are working on both individually and as a team.<br /><br />On our project we were soon taking advantage of the facilities for personal revision history, suspension and revision of change sets, creation of patches, reversals, and more. To get to this we created a training session which was run for each new joiner which took them slowly through the basics of the Jazz SCM "Change Set" system, and then build upon this so they all had a workable meta model of their changes in the context of their team, and the wider project.<br /><br />Beyond this (and as a result of having to evolve the SCM model from the simple one we started with to the one we ended up with when everything went offshore) the CM/CI team had a deep understanding of how the entire system worked, which allowed us to do some really clever tricks, digging people out of messes when they did (infrequently) get into them, and making sure we could have just the right amount of seperation between bugfix, next release, and PoC / Investigation development.<br /><br /><span style="font-size:180%;">Have a Sandpit</span><br />After the basic setup for both your SCM and your CI build is done you'll want to get cleverer and cleverer. This isn't a bad thing, but you <span style="font-style: italic;">will</span> make mistakes. Especially if you want to get <span style="font-style: italic;">really</span> clever. <br /><br />We made the mistake of doing this experimentation on our "production" systems (i.e. the SCM and CI servers that the Dev Teams were using. Aside from the danger of catastrophic problems which you may cause, there is also the confusion you generate. CI is best when it is simple, clear and reliable. Red is bad. Green is good. You don't want to have to tell people to "ignore this for the minute while we get it working" or "don't worry about that, it'll work soon." This errodes trust in your tools, and gives others a source of excuses. As the CM/CI team, you need to lead by example. Hide your mistakes. Have a sandpit.<br /><br /><span style="font-size:180%;">Make Sure the Architecture is "Developable"</span><br />What do I mean by "Developable"? It's my first real neologism and one I'm more and more confident of the more I work in Software Development. In reality it needs a whole post to itself (perhaps even a book), but in essence I mean that the chosen architecture and component technologies which it comprises should be easy to develop against. Perhaps a few examples are required.<br /><ul><li><span style="font-style: italic;">Compilable</span>: Is it straightforward to compile your code? Do I just need the compiler, the dependencies, and the build scripts? No? I need the vendors too installed, and their server, and I need to deploy a dependency to compile downstream projects? Think again...<span style="font-style: italic;"></span></li><li><span style="font-style: italic;">Unit Testable</span>: Is the code you write easy to unit test? Can you automate the running of these tests with your IDE and CI server and collect and view the results effectively? Is it easy to mock? No? I need to deploy in order to unit test? Perhaps you should re-consider...</li><li><span style="font-style: italic;">Tool Independent</span>: Can you run your builds headlessly, without the need to install an IDE? No? Is this the 1980's? Come on...<br /></li><li><span style="font-style: italic;">Version Controlable:</span> Can we easily manage the code and configuration files in an SCM? You don't know SCM is? Let me explain...<br /></li><li><span style="font-style: italic;">Manageable Dependencies:</span> Can we automate the management of dependencies? You want me to check-in the compiled results? Are you serious? Alarm bells...</li><li>Quick to Build: Can I poke my build scripts (on my machine, or via Hudson) and within a relatively sensible period of time get a red/green feedback? It takes 30 minutes just to compile, and its going to get longer as you add more code? Hmmmm<br /></li><li><span style="font-style: italic;">Quick-Turnaround, Lightweight Dev Environment</span> - Can I deploy my latest edits to my local server and see the results in a few minutes max? Can I develop on the same platform as production without having to take up hundereds of gig's of disk and have a 64-bit OS to address all the memory required to run all the servers and databases just to compile and run the unit tests? No? Have you heard of Tomcat?...<br /></li></ul>I'd recommend you think about (and investgate if needed) all these things and more when you get told what your architecture is and what you're going to build it in. Pushing back at the start is a lot easier than pushing back later on. Trust me...<br /><br /><span style="font-size:180%;">Publicise the CI Build</span><br />Despite the fact the Hudson is a superb resource which all developers should embrace because it makes their lives easier, most of them hate it because it goes red when they screw up. In an ideal world they would love to know that the change they <span style="font-style: italic;">just made</span> caused a problem, but the majority seem to want to forget about it until later, when the detail has been swapped out of their mental L1 cachee and it's far more of a challenge to resolve.<br /><br />You can remedy this by making Hudson and the status of Jobs ubiquitous. Get Hudson to send emails; use the Hudson Tracked and Growl to pop up toast on their screens (and play a sound too); but best of all set up a build radiator. At worst, this should be a screen, widely visible to all (especially the Project Managers / clients) and displaying the colours of all key jobs. (All jobs preferably). At best, it should be a singing-dancing, attention grabbing machine which rewards good behavious and punishes the bad. Come on, get creative!<br /><br /><span style="font-size:180%;">Automate the Release Process as Much as Possible - And Keep it as Simple as Possible</span><br />My final lesson learned is around making releases. You want to be able to make releases as quickly as possible, with as little manual intervention as you can get away with. I'm including the packaging, documentation, and deployment of these releases in this. <br /><br />The aim is to make it easy to release <span style="font-style: italic;">super-</span>frequently. Hudson isn't your last line of quality feedback. There are the testers too remember. The more you can give releases to them, and the quicker you can give them an update with all the fixes the more time they'll be able to sit about testing and increasing the quality of your product even more. It is all about feedback and quality after all...Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-24525684.post-60825038316350238452010-02-07T11:09:00.003+00:002010-02-07T11:14:37.158+00:00Cowley - A Hudson plugin for RTC (v.1.0.0) - Part 2 - IBM, meet Maven<span style="font-size:130%;">Introduction</span><br />In my <a href="http://the-music-of-time.blogspot.com/2009/12/cowley-hudson-plugin-for-rational-team.html">previous post</a>, I introduced version 1.0.0 of Cowley, a Hudson plugin for IBM's <a href="http://jazz.net">Rational Team Concert</a> (RTC) SCM system. I'd love for the plugin to be a simple one-click install like many others in the ecosystem, but unfortunately it currently relies on the RTC Build System Toolkit which is freely available, but isn't in any public Maven repositories. This means, in order to simply use the plugin, or to build it from source, you need to do a little Maven / Ant / Jar magic. This post in the series will tell you how.<br /><br />Note: This post is specifically geared towards getting the required pieces of the Build Toolkit into a Maven-usable state. However, there is nothing here which couldn't be taken and reused in many other circumstances.<br /><br /><span style="font-size:130%;">Pre-Requisites</span><br />I'm assuming for the rest of the instructions that you have Java 1.6 and Maven 2.x installed. If not, why not? Get to it!<br /><br /><span style="font-size:130%;">Obtaining the RTC Build System Toolkit</span><br />Job 1 is to get the Jazz RTC Build System Toolkit. You can download it from jazz.net (<a href="https://jazz.net/downloads/rational-team-concert/releases/2.0.0.2/RTC-BuildSystemToolkit-2.0.0.2-Win.zip">Windows</a>) (<a href="https://jazz.net/downloads/rational-team-concert/releases/2.0.0.2/RTC-BuildSystemToolkit-2.0.0.2-Linux.zip">Linux</a>) (registration required).<br /><br />NOTE: The rest of the instructions are based on the Windows version of the toolkit. I guess, as its all Java based, it's really similar. Post comments on this blog if there is additional info I need to add here.<br /><br />Once you have the Build System Toolkit downloaded, unzip it somewhere temporary.<br /><br /><span style="font-size:130%;">The Maven / Ant / Jar Magic</span><br />Next you need to get all the jars which come with the IBM Toolkit, wrap them up as a single jar, and add it to Maven for quick access and reuse. To do this, you'll need the following maven <a href="http://kenai.com/projects/cowley/sources/source-code-repository/content/jazz-proxy-common/pom.xml?rev=5">pom.xml</a>. Cut and paste it into a file for use.<br /><br />Now if you create a directory, put this new pom.xml file into it, edit the property "rtc.build.toolkit.plugins.dir" property and run the "mvn install" command. This will get the maven plugins and dependencies required, create your uber-jar, and "install" (i.e. copy) it into your local maven repository.<br /><br /><span style="font-size:130%;">Congratulations!</span><br />You now have the required elements of the RTC Build Toolkit installed in maven, ready to either be added direct to your Hudson install to enable your Cowley plugin, or so you can compile my RTC Proxy API from source.<br /><br />Either way, look out for the later posts in this series to find out how to obtain and use the Cowley Plugin without looking at any more code, as well as the gory details of the plugin development (if you're feeling sadistic).Unknownnoreply@blogger.com6tag:blogger.com,1999:blog-24525684.post-24854345182528283552010-01-23T13:34:00.005+00:002010-01-23T14:06:25.435+00:00OpenOffice 3.1.1 in a Java 6 AppletThere is <a href="http://api.openoffice.org/docs/DevelopersGuide/OfficeBean/OfficeBean.xhtml">a tantalising set of documents on the OpenOffice.org wiki</a> about how you can use the officebean.jar which comes with all OpenOffice installations to display documents in an applet. The problem is, its out of date, and the link to the source is dead. But don't let that stop you...<br /><br /><span style="font-size:130%;">Note</span><br />These are instructions for Windows XP / Java 6 / OpenOffice 3.1.1. I'm sure they can be adapted for other operating systems / platforms.<br /><br /><span style="font-size:130%;">Pre-Requisites</span><br /><ul><li>Java SDK (I used 1.6.0_15 - <a href="http://www.java.com/en/download/manual.jsp">get it here</a>)<br /></li><li>OpenOffice (I used 3.1.1 - <a href="http://www.openoffice.org/">get it here</a>)</li><li>Open Office SDK (I used 3.0.0 - <a href="http://download.openoffice.org/3.0.0/sdk.html">get it here</a>)</li><li>Netbeans (I used 6.8 - <a href="http://netbeans.org/downloads/start.html?platform=windows&lang=en&option=java&version=6.8">get it here</a>. You could use another IDE if you like)<br /></li></ul><span style="font-size:130%;">The Code</span><br />Firstly I created a new Java Class Library project in Netbeans called OOoApplet. To this I added a single class which I called "OOoBeanViewer.java". I then (lazily) went looking for the example code. I found it on Koders.com <a href="http://www.koders.com/java/fid7F29FB71410D35446E58B9BC06707FED5B929597.aspx">here</a>. I cut and pasted this into my OOoBeanViewer.java stub in Netbeans.<br /><br /><span style="font-size:130%;">The Dependencies</span><br />In order for this to compile and run I had to add the following dependencies:<br /><ul><li>C:\Program Files\OpenOffice.org 3\Basis\program\classes\officebean.jar</li><li>C:\Program Files\OpenOffice.org 3\Basis\program\classes\unoil.jar</li><li>C:\Program Files\OpenOffice.org 3\URE\java\ridl.jar</li><li>C:\Program Files\OpenOffice.org 3\URE\java\jurt.jar</li><li>C:\Program Files\OpenOffice.org 3\URE\java\juh.jar<br /></li></ul><span style="font-size:130%;">The Environment</span><br />Because Open Office doesn't really run <span style="font-style: italic;">in</span> the applet (rather we start it, and then redirect its display to the applet) we need so set things up so that the OOoBean knows where to look. This wa the hardest part as the assumption in the docs I could find was that this demo should <span style="font-style: italic;">just work</span>. It didn't for me.<br /><br />To get it to work I needed to add a Windows environment variable called UNO_PATH and set its value to be the path to the program directory of your OpenOffice install. I set mine to: "<span style="font-family:courier new;">C:\Program Files\OpenOffice.org 3\program</span>"<br /><br />To get this to stick I then had to reboot. A check "echo %UNO_PATH%" at the command line showed that this had worked.<br /><br /><span style="font-size:130%;">Running It</span><br />All that was left was to compile and run. This was done simply using Netbeans. The result is a mostly empty Applet window with some buttons down the side. Fear not! You need to create a new document to see what you desire. This is what you get if you select "New Document ... > Text Document":<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXA-QyuIvLlf5mkeYlBuRwZ33dlrVyNmHwntLp_rUeznWkMwtsmaEMRDqs9wGJFifIl6ey0Y6GNtYQZnDX7UjlNpFxAEukC0Gres03T0QKtoHyqQMEV8NZ8wzuva4DWUXHwMZhFw/s1600-h/ooo_in_applet.PNG"><img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 192px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXA-QyuIvLlf5mkeYlBuRwZ33dlrVyNmHwntLp_rUeznWkMwtsmaEMRDqs9wGJFifIl6ey0Y6GNtYQZnDX7UjlNpFxAEukC0Gres03T0QKtoHyqQMEV8NZ8wzuva4DWUXHwMZhFw/s320/ooo_in_applet.PNG" alt="" id="BLOGGER_PHOTO_ID_5429936031588068802" border="0" /></a>Unknownnoreply@blogger.com6tag:blogger.com,1999:blog-24525684.post-51128735073246903252009-12-23T16:18:00.014+00:002010-02-07T11:15:13.747+00:00Cowley - A Hudson plugin for Rational Team Concert (v.1.0.0) - Part 1 - It's Alive!<span style="font-size:180%;">Version 1.0.0...</span><br />Over the past 9 months I've been working on my first Hudson plugin - a plugin to allow me to build my code stored in my Rational Team Concert (RTC) Source Code Management (SCM) system, all the while keeping the RTC server up to date with the builds which were running. Because RTC likes to keep up to date with CI builds, this latter piece is where the complications lie, especially because once a build is "done" I wanted some nice integration such as pushing the results back (artefacts, logs, links to the Hudson build result etc.)<br /><br />Well, finally I've reached version 1.0.0. I've only put it through testing in my dev and project's CI environment but this has been enough to get it stable for us. I therefore thought this would be a good stage to let others see what I'd produced, and perhaps even get some free testing and input to boot.<br /><br /><span style="font-size:180%;">Unfortunately, It's Not That Simple</span>...<br />Ideally I want to be able to have the plugin available with the Hudson distro, and I've been having discussions on the Hudson newsgroups concerning this.<br /><br />However, due to the fact that Cowley depends entirely on libraries in the RTC Build System Toolkit provided by IBM, the contents of which are not currently not available in any public Maven 2.0 repository, building and packaging are not so simple, and because they're not available under an open source licence. (They are however free to download from the <a href="http://jazz.net/">jazz.net</a> site.)<br /><br />Bundling them as a binary plug is also currently not an option (though I'm pursuing this with IBM at the moment) as to obtain the libraries a prospective user needs to accept the IBM RTC EULA before downloading them.<br /><br />So where does this leave us? Sadly, you need to get all the Cowley plugin itself and the IBM Build System Toolkit bits and package them up yourself. The hope is that this will change (especially as the REST API for RTC begins to come online from version RTC v.3.0 onwards) but until then, please accept my apologies.<br /><br />So how do you do this? Well, jump to "<a href="http://the-music-of-time.blogspot.com/2010/02/cowley-hudson-plugin-for-rtc-v100-part_07.html">part 2</a>" of this series to find out.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-24525684.post-26216170897249706452009-11-24T16:25:00.001+00:002009-11-24T16:25:55.153+00:00Hacking Oracle SOA Suite (11.1.1) builds to work with Ivy and Artifactory<p>As discussed in a few previous posts, I’m on a mission to get my project’s SOA Suite builds to work without having to rely on a local installation of JDeveloper 11g with the added SOA Extension.</p> <p>I’ve continued to make progress (with the help of Mayur – thanks) and we’ve now got compilation, packaging, deployment, and Unit Testing to work. We’ve still to tidy up our scripts so that they’re ready for publishing for public consumption, but in the meantime, I thought I’d put out some snippets which will help the enthusiastic to get to where we have.</p> <h4>Getting your Jar dependencies into Artifactory</h4> <p>My aim was to depend on Maven (and <a href="http://www.jfrog.org/products.php">JFrog Artifactory</a>) for our dependencies as much as possible. Where we could use publicly available Jars from the standard repositories we did. Sadly this turned out to be very infrequent. It did mean however that there was another reason to <a href="http://www.jfrog.org/download.php">download</a> and <a href="http://wiki.jfrog.org/confluence/display/RTF/Installing+Artifactory">install</a> Artifactory. This was very simple. We downloaded the Standalone version and ran it using the embedded Jetty. The only thing I needed to change from the default settings was to <a href="http://wiki.jfrog.org/confluence/display/RTF/Going+Through+Proxies">set a proxy</a> (we’re behind a firewall.)</p> <p>I then had to manually add all the Oracle dependencies which I had identified to ext-releases-local (Artifactory’s default Local repository for third party libraries). I had logged in as an Admin, and using the “Deploy” tab added them one at a time.</p> <p>When I’d finished, it looked like this (apologies for the crappy screen grabs):</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjr9imUrfV9aDw3kEzutnAAKbbrWRdtY8DXWfTsIOidld7EJfIU7cVgRwfUkpnuPgw8lfCScuT4zHY2S7klvVyfxbG5g7O2baMYhe5jUyxX-fBvfmL3LTuBDTIcnbmAFChj0H84NA/s1600-h/artifactory-structure-1%5B4%5D.jpg"><img title="artifactory-structure-1" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="161" alt="artifactory-structure-1" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeVtRadq0H4hr0bPoXnvekMMqCwOFp_TOx8Pd-HBJ0kucwF8i3loFtK2MqmvPDA92r5gK2AbxRgzeSrmiJjdPmbyeyidLo1dYU9XL9kHJQU-osruBzEY2cAlIWBfpPub6gyadMHg/?imgmax=800" width="248" border="0" /></a> </p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4Il6btM1sveP7GgRlemGd6LgHiQzKGe5zuAkFP3X_jXIpHS2KSfRubfS20h6LwoTb6iuTtdpNo2MuScHsJkLkPEoyPkXlDQWzacw2kcbTSdYVlq2KzDDk7GoAa0aBhwCicZKYxg/s1600-h/artifactory-structure-2%5B4%5D.jpg"><img title="artifactory-structure-2" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="248" alt="artifactory-structure-2" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhbMpml1cEA0HWJwSy7v4ijJ-SxvlyYchzbi89EC_rT0dv8l_HXWe9GaRv3pZRJQtwlr0U5kYvFH2MRMSSombYsmKqMFp__eJKEnsu0W7Lu2pyCWXGCfDyNm7h64M3kbv7b-jASA/?imgmax=800" width="199" border="0" /></a> </p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFYmyJuGZFUlt4yIi0aN3ZU1UFP3wvihDSHUh_BTs8FozvklN5k6h5DEnSwzyAaq-TWoz8bL4WKMAYHLb1DkTC2ClA0Hhcaidoo1koIQ4Sf4zTxIMO7n5wwcWj7WgObnXrYHKxfQ/s1600-h/artifactory-structure-6%5B3%5D.jpg"><img title="artifactory-structure-6" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="231" alt="artifactory-structure-6" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiN4GD89sylu3rqKt-I5gL6DwU31cEJj86F1MjZwTa5e9ZcQCk2c_b0Zitv9ARBspqQcHkyBo-yUKQ2I4QZz87du4bL_WDqBIyjjwSxE7SEvFUPH_cfEN9NxGfCkZrUt1yN1hRM0w/?imgmax=800" width="240" border="0" /></a> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEhT1wCz8XXWh4Gl3qIznqcWJgk0YdaaMettmycn_N6-N_xiZui9D1BVLpKxuVrmpMB-HLaEDZoZeZxf6Nc4BqLtW63QPJkvCNbx7P4uEIeql_I2GbqLObU7x-FzNj5ZhmIAP1eQ/s1600-h/artifactory-structure-3%5B4%5D.jpg"><img title="artifactory-structure-3" style="display: inline" height="240" alt="artifactory-structure-3" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBv0MMn-LdcGGY5hBXSRl9J1kuzjERe8BGDVGi5hpVHq9rGctSd55gUDSqZm3536H5-NzsMk-VaydzxCS_b4RC-fcuhZ4UCIWRuegV25c4Wxl2C2_JsYnP46QgBqMWb198ioSEew/?imgmax=800" width="156" /></a> </p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMbnW29FZELhuwM42zdBPCFMQ8WcVykfYd5QBmJTS902eopmxf5MHA56AoJUAwCga4j6eX4RvzWd4svk1hWARe4X9_u0N_ELnHUFV0yeyKXdU7pUr5h8-mQ55G4pGLhqMCDMLSkw/s1600-h/artifactory-structure-4%5B3%5D.jpg"><img title="artifactory-structure-4" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="240" alt="artifactory-structure-4" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeqpTFIV7ukrB1FA82daZMqDKrDjNTprkbs7qtg0UBM4sNuT1tFVPKJdk6_fiHJ36kZn6Bd7dGbkAOGC0glBy_5CThZydIJVjrW6EmO-2akJjm6LCXAmHO5yqNYbZlwBC_KHe-3A/?imgmax=800" width="166" border="0" /></a></p> <p> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlcqHy5RyYkZnfwqHGscmVCMtte720309cW2isjLZmjyG0mqdEBJYr9YXGli_-frc9490KxIYU1cImu24ZO0JBPVBhyphenhyphenxIYr5jJD65dD-OCmQwrQKXeWqPqS2j6Ogu_-R66r7YvBA/s1600-h/artifactory-structure-5%5B3%5D.jpg"><img title="artifactory-structure-5" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="240" alt="artifactory-structure-5" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4Qi1-vaU9TScfOTnqWlf0yUY5MiXIHRaz5qU35fiGRSQ8KzxExh9NPG_NccWN1tdKzmBh2Xte7TXHy4NzrSoQEsb1YFqspGoM8rnybZ_B8szCgxBPXDDHlb4FmOpBWkjkU8qYJw/?imgmax=800" width="181" border="0" /></a> </p> <p>NOTE: It might be nice to bundle all these up as an artifacts bundle. I’ve not had the time to do this yet.</p> <p></p> <p></p> <p></p> <p></p> <p></p> <p>This meant we were now ready to link Ivy up to all of this.</p> <h4>Connecting Ivy and Artifactory</h4> <p>Next we had to tell Ivy to use either its local cache, or Artifactory, for all its dependency lookups. To do this, I created a new ivysettings.xml file with the following content:</p> <p><font face="Courier New"><ivysettings> <br />    <settings defaultResolver="chain" /> <br />    <resolvers> <br />        <chain name="chain" returnFirst="true"> <br />            <filesystem name="local"> <br />                <ivy pattern="C:/Documents and Settings/aharmel/.m2/repository/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" /> <br />            </filesystem> <br />            <url name="shared"> <br />                <artifact pattern="</font><a href="http://build-xp-10:8081/artifactory/repo/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]""><font face="Courier New">http://build-xp-10:8081/artifactory/repo/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"</font></a><font face="Courier New"> /> <br />            </url> <br />            <url name="public"> <br />                <artifact pattern="</font><a href="http://build-xp-10:8081/artifactory/repo/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]""><font face="Courier New">http://build-xp-10:8081/artifactory/repo/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"</font></a><font face="Courier New"> /> <br />            </url> <br />        </chain> <br />    </resolvers> <br /></ivysettings></font></p> <p>This meant that when an ivy:resolve target was called, the local Ivy cache would be looked up first, and if that was not successful, then artifactory would be checked for both shared and public lookups. This meant that we would cache those dependencies which were available publicly in Maven, speeding up the second, and all subsequent lookups.</p> <h4>Using Ivy to get the dependencies in the Ant files</h4> <p>Penultimately (is that a word? I doubt it), we created an ivy.xml file containing all our dependencies and different configurations:</p> <p><font face="Courier New"><ivy-module version="2.0"> <br />    <info organisation="example" module="example-dummy" /> </font></p> <p><font face="Courier New">    <configurations> <br />        <conf name="base" description="Jars required at both compile and runtime" /> <br />        <conf name="taskdefs" description="Jars required for Ant Taskdefs" /> <br />        <conf name="compile" description="Jars required at compile / package time" /> <br />        <conf name="deploy" description="Jars required at deploy time" /> <br />        <conf name="test" description="Jars required at test time" /> <br />    </configurations> </font></p> <p><font face="Courier New">    <dependencies> <br />        <dependency org="oracle/soa/bpel" name="orabpel" rev="11.1.1" conf="compile->default" /> <br />        <dependency org="oracle/soa/bpel" name="orabpel-validator" rev="11.1.1" conf="compile->default" /> <br />        <dependency org="oracle/soa/bpel" name="orabpel-common" rev="11.1.1" conf="compile->default" /> <br />        <dependency org="oracle/soa/bpel" name="orabpel-thirdparty" rev="11.1.1" conf="compile->default" /> <br />        <dependency org="oracle/soa/fabric" name="fabric-runtime" rev="11.1.1" conf="compile,taskdefs->default" /> <br />        <dependency org="oracle/soa/mgmt" name="soa-infra-mgmt" rev="11.1.1" conf="compile,taskdefs->default" /> <br />        <dependency org="oracle/soa/fabric" name="soa-infra-tools" rev="11.1.1" conf="compile,taskdefs->default" /> <br />        <dependency org="oracle/soa/fabric" name="testfwk-xbeans" rev="11.1.1" conf="compile->default" /> <br />        <dependency org="oracle/fabriccommon" name="fabric-common" rev="11.1.1" conf="compile->default" /> <br />        <dependency org="oracle/xdk" name="xmlparserv2" rev="11.1.0" conf="compile->default" /> <br />        <dependency org="commons-logging" name="commons-logging" rev="1.0.4" conf="compile->default" /> <br />        <dependency org="commons-digester" name="commons-digester" rev="1.7" conf="compile->default" /> <br />        <dependency org="commons-beanutils" name="commons-beanutils" rev="1.6" conf="compile->default" /> <br />        <dependency org="commons-collections" name="commons-collections" rev="3.2.1" conf="compile->default" /> <br />        <!--dependency org="commons-cli" name="commons-cli" rev="1.1" conf="compile,deploy->default" /--> <br />        <dependency org="oracle/commonj-sdo" name="commonj-sdo" rev="2.1.0" conf="compile->default" /> <!-- This is a hack as the Oracle JDeveloper one is different from the one in M2 repositories --> <br />        <dependency org="oracle/logging-utils" name="oracle.logging-utils" rev="11.1.1" conf="compile->default" /> <br />        <dependency org="oracle/dms" name="dms" rev="11.1.1" conf="compile->default" /> <br />        <dependency org="oracle/webservices" name="orawsdl" rev="11.1.1" conf="compile->default" /> <br />        <dependency org="oracle/mds" name="mdsrt" rev="11.1.1" conf="compile->default" /> <br />        <dependency org="oracle/jmx" name="jmxframework" rev="11.1.1" conf="compile->default" /> <br />        <dependency org="oracle/adf/share" name="adf-share-base" rev="11.1.1" conf="compile->default" /> <br />        <dependency org="oracle/adf/share" name="adf-logging-handler" rev="11.1.1" conf="compile->default" /> <br />        <dependency org="oracle/odl" name="ojdl" rev="11.1.1" conf="compile->default" /> <br />        <dependency org="oracle/http-client" name="oracle-httpclient" rev="11.1.1" conf="compile,deploy->default" /> <br />        <dependency org="oracle/wsm/common" name="wsm-policy-core" rev="11.1.1" conf="compile->default" /> <br />        <dependency org="oracle/classloader" name="oracle-classloader" rev="11.1.1" conf="compile->default" /> <br />        <dependency org="com/bea/core" name="com-bea-core-apache-commons-lang" rev="2.1.0" conf="compile->default" /> <br />        <dependency org="com/bea/core" name="com-bea-core-xml-xmlbeans" rev="2.2.0.0" conf="compile->default" /> <br />    </dependencies> <br /></ivy-module></font></p> <p>NOTE: I haven’t managed to get Ivy to load configurations for the taskdefs yet (see below). I’ll update this post when I get it to work</p> <p>NOTE: Only the configurations for compile/package and deploy are included in this. It’s pretty easy to add the declarations for the other paths you need to set. I’ll repost this once it’s complete.</p> <p>The final step was to add Ivy support to the out-of-the-box ant files.  To do this we;</p> <ol> <li>Added the ivy.jar to our ant/lib directory</li> <li>Added the Ivy namespace to the ant file:  </li> <p><font face="Courier New"><project xmlns:ivy="antlib:org.apache.ivy.ant" <br />         name="ant-scac" <br />         default="scac"></font></p> <li>Removed the elements setting all classpaths (e.g. scac.tasks.class.path in ant-scac-compile.xml)</li> <li>Added a new path declaration just for the taskdefs. E.g.:  </li> <p><font face="Courier New"><!-- Set the Path we need for the Ant Taskdefs --> <br />    <property name="oracle.ant.taskdef.path" refid="oracle.ant.taskdef.path"/> <br />    <path id="oracle.ant.taskdef.path"> <br />        <fileset dir="${applications.home}/lib"> <br />            <include name="fabric-runtime.jar"/> <br />            <include name="soa-infra-mgmt.jar"/> <br />            <include name="soa-infra-tools.jar"/> <br />        </fileset> <br />    </path></font></p> <li>Updated the taskdef declaration elements to use this new path. E.g:  <font face="Courier New"><taskdef name="scac" classname="oracle.soa.scac.scac" classpath="${oracle.ant.taskdef.path}" /></font></li> <li>Added a new “init” task which sets the path we removed earlier (e.g. scac.tasks.class.path in ant-scac-compile.xml): </li> <p><font face="Courier New"><target name="init" description="Sets up the compilation classpath"> <br />        <ivy:resolve /> <br />        <ivy:cachepath conf="compile" pathid="scac.tasks.class.path" /> <br />        <property name="scac.tasks.class.path" refid="scac.tasks.class.path"/> <br />    </target></font></p> <li>Updated the targets to have a dependency on “init”. E.g.: </li> <p><font face="Courier New"><target name="scac" description="Compile and validate a composite" depends="init"> <br />        <scac input="${scac.input}" <br />              outXml="${scac.output}" <br />              error="${scac.error}" <br />              appHome="${compositeDir}" <br />              failonerror="true" <br />              displayLevel="${scac.displayLevel}"> <br />        </scac> <br />    </target></font></p> </ol> <p>And that’s it. Unfortunately there’s not a zip file you can download with a few bat/sh files to run, but maybe I’ll get there one day. In the meantime, this should help you to get where we have.</p> Unknownnoreply@blogger.com3tag:blogger.com,1999:blog-24525684.post-32901134211909156722009-11-18T16:34:00.001+00:002009-11-18T16:34:04.313+00:00The Goods Delivered – SOA Suite “ant-sca-compile.xml” File Simplified (Plus Ivy Dependency Management)<p>As <a href="http://the-music-of-time.blogspot.com/2009/11/monkey-patching-oracle-soa-suite-11g.html">promised in my last post</a>, I’ve been continuing to work on getting Oracle SOA Suite (11g) projects to build outside the JDeveloper IDE.  I’ve spent some time getting the ant-sca-compile.xml file to work first and thought I’d share the results.</p> <p>I’ve rushed a little to publish this so there are still a few things you’ll have to do manually if you want this to work for you, but it does work. Trust me.  If I get a chance, I’ll keep blogging things as I progress and hopefully you’ll have to do less and less work if you want to do the same as us.</p> <p>What I have now comes in three parts:</p> <h4>1. A simplified ant-sca-compile.xml file</h4> <blockquote> <p><font face="Courier New"><?xml version="1.0" encoding="iso-8859-1"?> <br /><project xmlns:ivy="antlib:org.apache.ivy.ant" <br />         name="ant-scac" <br />         default="scac"> </font></p> <p><font face="Courier New">    <!-- Set all the Properties we need --> <br />    <property file="build.properties"/> <br />    <!--propertycopy name="proj.revision" from="${project}.revision"/--> <br />    <property name="oracle.home" value="${applications.home}/lib"/> <!-- Monkey patch to remove need for full JDeveloper install --> <br />    <property name="config.dir" value="C:/oracle/Middleware/jdeveloper/integration/seed/soa/configuration/" />   <br />    <property name="compositeDir" value="${applications.home}/${compositeName}" /> <br />    <property name="scac.input" value="${compositeDir}/composite.xml"/> <br />    <condition property="scac.displayLevel" value="3"> <br />        <not> <br />            <isset property="scac.displayLevel"/> <br />        </not> <br />    </condition> <br />    <condition property="scac.overwrite" value="true"> <br />        <not> <br />            <isset property="scac.overwrite"/> <br />        </not> <br />    </condition> <br />    <condition property="scac.error" value="${tmp.output.dir}/${compositeName}.error"> <br />        <not> <br />            <isset property="scac.error"/> <br />        </not> <br />    </condition> <br />    <condition property="scac.output" value="${tmp.output.dir}/${compositeName}.xml" > <br />        <not> <br />            <isset property="scac.output"/> <br />        </not> <br />    </condition> <br />    <condition property="scac.sar" value="${tmp.output.dir}/${compositeName}.sar" >  <br />        <not> <br />            <isset property="scac.sar"/> <br />        </not> <br />    </condition> <br />    <condition property="scac.plan" value="${tmp.output.dir}/${compositeName}.plan" > <br />        <not> <br />            <isset property="scac.plan"/> <br />        </not> <br />    </condition> </font></p> <p><font face="Courier New">    <!-- Set the Path we need for the Ant Taskdefs --> <br />    <property name="oracle.ant.taskdef.path" refid="oracle.ant.taskdef.path"/> <br />    <path id="oracle.ant.taskdef.path"> <br />        <fileset dir="${applications.home}/lib"> <br />            <include name="fabric-runtime.jar"/> <br />            <include name="soa-infra-mgmt.jar"/> <br />            <include name="soa-infra-tools.jar"/> <br />        </fileset> <br />    </path> </font></p> <p><font face="Courier New">    <!-- Oracle SOA Suite Project Compilation Targets --> <br />    <target name="generateplanfromsar" description="Generate soa config plan from a soa archive"> <br />        <ivy:resolve /> <br />        <generateplan sar="${scac.sar}" <br />                      planfile="${scac.plan}" <br />                      verbose="true" <br />                      overwrite="${scac.overwrite}"/> <br />    </target> </font></p> <p><font face="Courier New">    <target name="generateplan" description="Generate soa config plan from a composite"> <br />        <ivy:resolve /> <br />        <generateplan composite="${scac.input}" <br />                      planfile="${scac.plan}" <br />                      verbose="true" <br />                      overwrite="${scac.overwrite}"/> <br />    </target> <br />    <target name="attachplan" description="Attach a soa config plan to a soa archive"> <br />        <ivy:resolve /> <br />        <attachplan planfile="${scac.plan}" <br />                    sar="${scac.sar}" <br />                    verbose="true" <br />                    overwrite="${scac.overwrite}"/> <br />    </target> </font></p> <p><font face="Courier New">    <target name="extractplan" description="Extract a soa config plan from a soa archive"> <br />        <ivy:resolve /> <br />        <extractplan planfile="${scac.plan}" <br />                     sar="${scac.sar}" <br />                     verbose="true" <br />                     overwrite="${scac.overwrite}"/> <br />    </target> </font></p> <p><font face="Courier New">    <target name="validateplanfromsar" description="Validate a soa config plan for a soa archive"> <br />        <ivy:resolve /> <br />        <validateplan sar="${scac.sar}" <br />                      planfile="${scac.plan}" <br />                      reportfile="${scac.output}" <br />                      verbose="true" <br />                      overwrite="${scac.overwrite}"/> <br />    </target> </font></p> <p><font face="Courier New">    <target name="validateplan" description="Validate a soa config plan for a composite"> <br />        <ivy:resolve /> <br />        <validateplan composite="${scac.input}" <br />                      planfile="${scac.plan}" <br />                      reportfile="${scac.output}" <br />                      verbose="true" <br />                      overwrite="${scac.overwrite}"/> <br />    </target> <br />    <target name="scac" description="Compile and validate a composite" depends="init"> <br />        <property name="scac.tasks.class.path" refid="scac.tasks.class.path"/> <br />        <scac input="${scac.input}" <br />              outXml="${scac.output}" <br />              error="${scac.error}" <br />              appHome="${compositeDir}" <br />              failonerror="true" <br />              displayLevel="${scac.displayLevel}"> <br />        </scac> <br />    </target> </font></p> <p><font face="Courier New">    <target name="init" description="Sets up the compilation classpath"> <br />        <property name="ivy.local.default.root" value="C:/Documents and Settings/aharmel/.m2/repository" /> <br />        <property name="ivy.local.default.artifact.pattern" value="[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" /> <br />        <ivy:resolve /> <br />        <ivy:cachepath conf="compile" pathid="scac.tasks.class.path" /> <br />    </target> </font></p> <p><font face="Courier New">    <!-- taskdefs mapping script Ant targets to Oracle Ant implementataion classes --> <br />    <taskdef name="scac" classname="oracle.soa.scac.scac" classpath="${oracle.ant.taskdef.path}" /> <br />    <taskdef name="attachplan" classname="oracle.soa.deployplan.task.attachPlan" classpath="${oracle.ant.taskdef.path}" /> <br />    <taskdef name="extractplan" classname="oracle.soa.deployplan.task.extractPlan" classpath="${oracle.ant.taskdef.path}" /> <br />    <taskdef name="generateplan" classname="oracle.soa.deployplan.task.generatePlan" classpath="${oracle.ant.taskdef.path}" /> <br />    <taskdef name="validateplan" classname="oracle.soa.deployplan.task.reportPlan" classpath="${oracle.ant.taskdef.path}" /> <br /></project></font></p> </blockquote> <p>NOTE: I haven’t yet figured out how to get Ivy to manage the three dependencies for the  Oracle Ant Tasks themselves. I’ll update later once I have time to fix this.  Until then you also need to copy the three required jars into a new “lib” directory in your Composite Project </p> <p>NOTE: The Monkey patch requires that you create a new “lib” directory in your Composite Project and add “./soa/modules/oracle.soa.bpel_11.1.1/orabpel.jar” to it. You’ll find this in your JDeveloper install</p> <h4>2. Dependencies managed in a new ivy.xml file</h4> <blockquote> <p><font face="Courier New"><ivy-module version="2.0"> <br />    <info organisation="copfs" module="cmrs-dummy" /> </font></p> <p><font face="Courier New">    <configurations> <br />        <conf name="base" description="JARs required at both compile and runtime" /> <br />        <conf name="taskdefs" description="JARs required for Ant Taskdefs" /> <br />        <conf name="compile" description="JARs required at compile time" /> <br />        <conf name="runtime" description="JARs required at runtime" /> <br />    </configurations> </font></p> <p><font face="Courier New">    <dependencies> <br />        <dependency org="oracle.soa.bpel" name="orabpel" rev="11.1.1" conf="compile->default" /> <br />        <dependency org="oracle.soa.bpel" name="orabpel-validator" rev="11.1.1" conf="compile->default" /> <br />        <dependency org="oracle.soa.bpel" name="orabpel-common" rev="11.1.1" conf="compile->default" /> <br />        <dependency org="oracle.soa.bpel" name="orabpel-thirdparty" rev="11.1.1" conf="compile->default" /> <br />        <dependency org="oracle.soa.fabric" name="fabric-runtime" rev="11.1.1" conf="compile,taskdefs->default" /> <br />        <dependency org="oracle.soa.mgmt" name="soa-infra-mgmt" rev="11.1.1" conf="compile,taskdefs->default" /> <br />        <dependency org="oracle.soa.fabric" name="soa-infra-tools" rev="11.1.1" conf="compile,taskdefs->default" /> <br />        <dependency org="oracle.soa.fabric" name="testfwk-xbeans" rev="11.1.1" conf="compile->default" /> <br />        <dependency org="oracle.fabriccommon" name="fabric-common" rev="11.1.1" conf="compile->default" /> <br />        <dependency org="oracle.fabriccommon" name="fabric-common" rev="11.1.1" conf="compile->default" /> <br />        <dependency org="oracle.xdk" name="xmlparserv2" rev="11.1.0" conf="compile->default" /> <br />        <dependency org="commons-logging" name="commons-logging" rev="1.0.4" conf="compile->default" /> <br />        <dependency org="commons-digester" name="commons-digester" rev="1.7" conf="compile->default" /> <br />        <dependency org="oracle.commonj-sdo" name="commonj-sdo" rev="2.1.0" conf="compile->default" /> <!-- This is a hack as the Oracle JDeveloper one is different from the one in M2 repositories --> <br />        <dependency org="oracle.logging-utils" name="oracle.logging-utils" rev="11.1.1" conf="compile->default" /> <br />        <dependency org="oracle.dms" name="dms" rev="11.1.1" conf="compile->default" /> <br />        <dependency org="oracle.webservices" name="orawsdl" rev="11.1.1" conf="compile->default" /> <br />        <dependency org="oracle.mds" name="mdsrt" rev="11.1.1" conf="compile->default" /> <br />        <dependency org="oracle.jmx" name="jmxframework" rev="11.1.1" conf="compile->default" /> <br />        <dependency org="oracle.adf.share" name="adf-share-base" rev="11.1.1" conf="compile->default" /> <br />        <dependency org="oracle.adf.share" name="adf-logging-handler" rev="11.1.1" conf="compile->default" /> <br />        <dependency org="oracle.odl" name="ojdl" rev="11.1.1" conf="compile->default" /> <br />        <dependency org="oracle.http-client" name="oracle-httpclient" rev="11.1.1" conf="compile->default" /> <br />        <dependency org="oracle.wsm.common" name="wsm-policy-core" rev="11.1.1" conf="compile->default" /> <br />        <dependency org="oracle.classloader" name="oracle-classloader" rev="11.1.1" conf="compile->default" /> <br />        <dependency org="com.bea.core" name="com-bea-core-apache-commons-lang" rev="2.1.0" conf="compile->default" /> <br />        <dependency org="com.bea.core" name="com-bea-core-xml-xmlbeans" rev="2.2.0.0" conf="compile->default" /> <br />    </dependencies> <br /></ivy-module></font></p> </blockquote> <p>NOTE: These are only the dependencies for the “scac” target. More may be required for the other targets.</p> <p>NOTE: I used a local maven 2 repository as my Ivy repository. I had to import the JARs which came with JDeveloper into this in the structure indicated by the “dependency” entries.  The aim was to keep things structured nicely, add version info to JARs which lacked this.</p> <p>NOTE: I tried to reuse standard external JARs from the various M2 repositories where possible. In the case of the com-bea-core libraries and oracle.commonj-sdo library this was not possible.  It seems for example that the latter has an additional package added to it (“helper”) even though the version number and name of this JAR is the same as you find on the web.</p> <h4>3. A Pared-down build-properties file</h4> <blockquote> <p><font face="Courier New"># temp <br />tmp.output.dir=c:/ </font></p> <p><font face="Courier New"># Project <br />applications.home=C:/Jazz/MyWorkspace-16-09-2009/WpfAutoDeployTestApp/TestApplication/ <br />compositeName=GetEmployeeName <br />revision=1.0</font></p> <p><font face="Courier New">deployment.plan.environment=dev </font></p> <p><font face="Courier New"># dev deployment server weblogic <br />bea.home=C:/oracle/Middleware <br />dev.serverURL=</font><a href="http://10.23.7.66:8001"><font face="Courier New">http://10.23.7.66:8001</font></a> <br /><font face="Courier New">dev.overwrite=true <br />dev.user=weblogic <br />dev.password=welcome1 <br />dev.forceDefault=true </font></p> <p><font face="Courier New"># acceptance deployment server weblogic <br /># acc.serverURL=</font><a href="http://10.23.7.66:8001"><font face="Courier New">http://10.23.7.66:8001</font></a> <br /><font face="Courier New"># acc.overwrite=true <br /># acc.user=weblogic <br /># acc.password=welcome1 <br /># acc.forceDefault=true </font></p> </blockquote> <p>NOTE: See, the #global properties are gone. Nice eh?</p> <p>NOTE: You’ll need to set the applications.home yourself as applicable. Not the nicest I know, but I’m moving fast here…</p> <p>NOTE: I’ve hacked things so I need to provide the compositeName. This is not how it worked out of the box, and you could fix it to get this from your [App Name].properties file</p> Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-24525684.post-12802065819909262752009-11-17T11:19:00.001+00:002009-11-17T11:19:22.151+00:00Monkey-Patching Oracle SOA Suite 11g Ant Files to Build Without JDeveloper<p>I hate having to have more than the bare minimum installed on my build boxes. We’re using SOA Suite 11g and JDeveloper on our current project and much to my annoyance it seemed as if I’d have to install the Oracle IDE on all my build boxes in order to run the Ant scripts which it can generate. I didn’t like the idea of that, so I did some hacking and monkey patched them.</p> <h4>The Problem</h4> <p>I started at the beginning - with ant-sca-compile.xml and build.xml from JDeveloper.  Using these I could run Ant targets such as “scac” which meant my composite was compiled and verified.  The problem was, I needed to tell Ant where JDeveloper was installed. This in turn hid a mass of dependencies.  </p> <p>I don’t like unmanaged dependencies. I like to know what goes into the various steps of my build.</p> <h4>The Solution</h4> <p>The first task was to move all the dependencies out of the JDeveloper install and into a project-local location. I created a “lib” directory in my Composite project for this purpose.  I then worked my way down through all the dependencies listed in “FileSet” elements in path “scac.tasks.class.path” in ant-sca-compile.xml  and copied them to ./lib.</p> <p>Now I had to surgically extract all the references from ant-sca-compile.xml to the JDeveloper install.  I tackled all references to “oracle.home” first as I found this particularly galling. I created a new property called “applications.home” and set it to be the directory where ant-sca-compile.xml lived. I then worked down the definition of “scac.tasks.class.path” and changed all references from “${oracle.home}/…” to “${applications.home}/lib”, removing the additional directories as I went. (i.e. I ended up with “include name=”orabpel.jar””, etc.)</p> <p>Every time I moved a large chunk of references I ran my built with Ant to check I’d not broken anything.  (Slowly, slowly, catchee monkee…)</p> <p>Once I’d done this, I did the same for all the other elements in this path declaration. With this done, I then simplified things by removing all the checking of properties from the top of the file. </p> <p>Now I was able to focus on the actual taskdef I was interested in: “scac”.  Firstly, I again simplified by removing the property checking. this left me with a single line; a call to the Oracle Ant task “scac”.</p> <p>One by one, I took each of the parameters, and set them manually to extricate them from the mass of JDeveloper Ant complexity.  This involved:</p> <ul> <li>creating my own version of scac.input – myscac.input which I set to point at the location of my composite.xml file</li> <li>setting compositeName to the name of my SOA Suite Composite project (“GetEmployeeName” in my case)</li> <li>setting compositeDir to the path to my SOA Suite Composite project</li> <li>replacing scac.output with tmp.output.dir (pointing at “./”) combined with ${compositeName}.xml </li> <li> replacing scac.error with tmp.output.dir combined with ${compositeName}.error </li> <li>replacing scac.application.home with ${compositeDir}</li> <li>setting displayLevel manually to be “3” (the maximum)</li> </ul> <p>I was almost there. It all worked. All I needed to do was remove the now redundant properties.</p> <h4>The <em>Real</em> Problem</h4> <p>This is where the monkey patching came in. I realised as I removed the now redundant properties that something, somewhere still needed to be told what oracle.home was.  I guess this is buried deep in the Oracle Ant tasks themselves. I tried to take a look but a decompiler was no help. (I guess they’re obfuscated.)</p> <h4>The <em>Real</em> Solution</h4> <p>But I didn’t want to give up (and here comes the monkey patch.)  To find out what actually was in oracle.home (effectively the JDeveloper install which was needed for a successful build and validation I took a copy of all the files, pointed oracle.home at this copy, and then piece by piece removed bits until I had the barest minimum needed for the target to run. The end result?  All you needed was orabpel.jar. The thing was, it needed to be in a directory like this: ${oracle.home}/soa/modules/oracle.soa.bpel_11.1.1</p> <p>Problem solved! All then had to do was create this directory structure in my project’s ./lib directory, copy orabpel.jar into it, and then set ${oracle.home} to point to ${applications.home}/lib and we were up and running.</p> <h4>Where Now?</h4> <p>Next step is to get all the other SOA Suite Ant scripts (ant-scac-package.xml, ant-scac-upgrade.xml, ant-scac-dploy.xml and ant-scac-test.xml) to work without being umbillically attached to a JDeveloper install.</p> <p>After that I’m going to use some Ivy and put all these dependencies (with some meaningful jar names including version numbers) into a Maven repository.</p> <p>Finally I hope to wrap up the Ant targets themselves as Maven 2.x plugins.  It’d be really nice if Oracle put all these dependencies in the Maven repositories already, but knowing how long it’s taken/taking Sun, and how non-open to the idea IBM are I’m not holding my breath.  I guess this means there will need to be a little setup script which you’ll need to run against JDeveloper to get all the bits you need in a Local Maven repo.</p> <p>Expect more blog posts as I progress.  There will also (hopefully) be some Ant source once I tidy things up.</p> Unknownnoreply@blogger.com4tag:blogger.com,1999:blog-24525684.post-26694264735014481722009-11-11T12:20:00.001+00:002009-11-11T12:20:49.018+00:00RSA 7.5.4 and RTC 2.0.0.1 – Getting them to play nice too<p>Following on from my <a href="http://the-music-of-time.blogspot.com/2009/11/sts-and-rtc-getting-them-to-play-nice.html">last post</a>, we’re unfortunately unable to have everyone on a single tools. Our architects and BA’s, who are going to use Rational Software Architect for UML modelling also need access to Rational Team Concert. I had a genius plan that I could install RSA on top of SpringSource Tool Suite or vice versa. No joy I’m afraid. I did however manage to install RTC 2.0.0.1 on top of RSA 7.5.4.  I managed it as follows:</p> <p>Firstly I obtained RSA 7.5.4 (all 100 gigs of it…).  Then I copied all the zips to my desktop and unzipped them all. NOTE: if you have them unzipped but running from a CD they won’t work. (That’s a free tip for you).</p> <p>Then I started the IBM Installer. The first thing it did was want to update itself from 1.3.1 to 1.3.2 (i.e. the IBM Installer, not RSA.) I let it go off and do its thing. (You might need to go to the “Help” menu item and set your proxy info if you’re behind a firewall at this point).</p> <p>Once the Installer had updated it let me install RSA 7.5.4 itself. I made sure the RTC 1.0 client was installed. (I don’t know if this made a difference to the later upgrade to 2.0.0.1, but it’s worth having if you want to follow these steps exactly.)</p> <p>After the RSA install was finished I was ready to lay my RTC 2.0.0.1 install over it. For this I needed to download the RTC Client Installer (NOT the zip). E.g.:</p> <p><a title="https://jazz.net/downloads/rational-team-concert/releases/2.0.0.1/RTC-Eclipse-Client-2.0.0.1-Win32-Local.zip" href="https://jazz.net/downloads/rational-team-concert/releases/2.0.0.1/RTC-Eclipse-Client-2.0.0.1-Win32-Local.zip">https://jazz.net/downloads/rational-team-concert/releases/2.0.0.1/RTC-Eclipse-Client-2.0.0.1-Win32-Local.zip</a></p> <p>Once this was downloaded, I unzipped it and started the Installation Manager it contained. I ran through the installation steps, accepting all the defaults until it gave me the chance to either install a new Eclipse Platform (default but wrong) or on top of an existing one (non-default but right). We selected this option and added the path to the RSA eclipse.exe as requested (C:\Program Files\IBM\SDP\eclipse.exe is the default).</p> <p>I then let the rest of the install proceed as normal.</p> <p>Once it was completed I started up RSA and switched to the newly added “Work Items” perspective and connected to our RTC 2.0.0.1 server. </p> <p>It worked!</p> Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-24525684.post-42926695465499586732009-11-11T11:02:00.001+00:002009-11-11T11:44:00.210+00:00STS and RTC – Getting them to Play Nice<p>We’re developing our new app using Spring 3.0 RC1 and we want the best tools available. We’ve picked the following:</p> <ul> <li>SpringSource Tools Suite 2.2.1 (includes Maven 2.x)</li> <li>IBM Rational Team Concert Client 2.0.0.1</li> <li>Oracle Enterprise Pack for Eclipse 1.3.0</li> <li>Emma Plugin 1.4.3</li> <li>Findbugs Plugin 1.3.9</li> <li>PMD Plugin 3.2.6</li> <li>Checkstyle Plugin 5.0.3</li> <li>JDepend Plugin 1.2.1</li> </ul> <p>We want everything to work as seamlessly as possible. This involved getting everything to run on STS. </p> <p>First we downloaded STS from <a href="http://www.springsource.com/products/sts">SpringSource</a>.  Once this was installed (all the defaults selected) we ran the updater to get it up to version 2.2.1 (Help > Check for Updates). We installed all the bits on offer.</p> <p>Next we installed our code quality tools. In each case we added the Eclipse Update Site for the plugins in question:</p> <p>Help > Install New Software > Add…</p> <ul> <li>Emma – <a href="http://update.eclemma.org">http://update.eclemma.org</a></li> <li>Findbugs – <a href="http://findbugs.cs.umd.edu/eclipse">http://findbugs.cs.umd.edu/eclipse</a></li> <li>PMD – <a href="http://pmd.sourceforge.net/eclipse">http://pmd.sourceforge.net/eclipse</a></li> <li>Checkstyle – <a href="http://eclipse-cs.sf.net/update">http://eclipse-cs.sf.net/update</a></li> <li>JDepend – <a href="http://andrei.gmxhome.de/eclipse">http://andrei.gmxhome.de/eclipse</a></li> </ul> <p>And in each case, we added the plugins (versions at the top of this post.)  I restarted after each plugin install, just to be on the safe side.</p> <p>Next we added the Oracle Enterprise Pack so we’d have support for Weblogic which is our deployment platform.  Just as before we added the Eclipse Update Site:</p> <p>Help > Install New Software > Add…</p> <ul> <li>Oracle Enterprise Pack – <a href="http://download.oracle.com/otn_software/oepe/galileo">http://download.oracle.com/otn_software/oepe/galileo</a></li> </ul> <p>Now for the fiddly bit.  We needed to frig things a little to get the RTC 2.0.0.1 elements working on an Eclipse 3.5 (galileo) platform.  Please note, this is utterly and shamefully based on the fine set of info on Jazz.net:</p> <p><a title="https://jazz.net/wiki/bin/view/Main/InstallRTC20IntoEclipse35" href="https://jazz.net/wiki/bin/view/Main/InstallRTC20IntoEclipse35">https://jazz.net/wiki/bin/view/Main/InstallRTC20IntoEclipse35</a></p> <p>Firstly we needed to download the RTC 2.0.0.1 Client zip (NOT the Installer) from Jazz.net:</p> <p><a title="https://jazz.net/downloads/rational-team-concert/releases/2.0.0.1/RTC-Client-2.0.0.1-Win.zip" href="https://jazz.net/downloads/rational-team-concert/releases/2.0.0.1/RTC-Client-2.0.0.1-Win.zip">https://jazz.net/downloads/rational-team-concert/releases/2.0.0.1/RTC-Client-2.0.0.1-Win.zip</a></p> <p>Once this was downloaded, we unzipped it to a location of our choice. (Desktop is good.)</p> <p>Next we installed the necessary pre-reqs into STS so the RTC plugins would work.  We again went to Help > Install New Software …</p> <p>First we installed EMF and DTP. We selected the Galileo site in the  “work with:” drop down</p> <ul> <li>To install EMF, we expanded the <em>Modeling</em> category and selected <em>EMF - Eclipse Modeling Framework SDK</em> and the _ XSD - XML Schema Definition SDK_ entries </li> <li>To install DTP, we selected the <em>Database Development</em> category </li> <li>We then followed the wizard through to install these features and then restart</li> </ul> <p>Next up was GEF. We selected the Galileo site again:</p> <ul> <li>This time we unchecked the “<em>Group items by category”</em> option at the bottom of the wizard </li> <li>And then typed “<em>GEF”</em> in the filter text area. </li> <li>Then we selected the <em>Graphical Editing Framework GEF SDK</em> entry </li> <li>And finally followed the wizard through to install GEF and then restart</li> </ul> <p>Now we were finally ready to install RTC. </p> <ul> <li>Firstly we closed STS</li> <li>Then we simply copied the folders contained in our  downloaded and unzipped <em>jazz/client/eclipse/jazz</em> folder (e.g. <em>build</em>, <em>scm</em>, <em>reports</em>, etc.) to the our <em>eclipse/dropins</em> folder of our STS installation</li> <li>Then we restarted STS. The “Wotrk Items” perspective was now available, and we could connect to our Jazz Project areas.</li> </ul> <p>Easy.</p> Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-24525684.post-83054562524422423552009-03-07T14:11:00.001+00:002009-03-07T14:13:23.624+00:00Hitler's Broken BuildI fear this may have been me in the past...<br /><br /><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/Azl4nqLn4-Y&hl=en&fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/Azl4nqLn4-Y&hl=en&fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object>Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-24525684.post-64624533399641775082009-03-03T14:34:00.002+00:002009-03-03T14:57:54.255+00:00Java Posse Roundup '09 - The Conference is Personal AgainI've just attended day 0 of the Java Posse Roundup '09. I'd been told Open Spaces conferences felt like no other, but you need to experience it to really understand why. Here's a taster:<br /><ul><li>We all (or at least a lot of us) met up at Camp 4 Coffee. We filled the place to overflowing. The town know's something's up with all the geeks milling around<br /></li><li>We got taken through a variety of Scala by Dick (Wall), Bill (Venners), Joel (Neely) and Diane (Marsh). When you got lost you could ask (this happened quite a lot with me). Then we worked on reverse engineering LINQ with Scala. We <span style="font-style: italic;">all</span> contributed</li><li>We hacked on JavaFX to build a cool lightning talk app led by Joe (Nuxoll) as the designer and Tor as the lead developer<br /></li><li>We had an introduction to Fan from Fred (Simon) who is a contributor</li><li>We had supper round at Bruce (Eckel)'s. He's laid up with a broken leg, so we cooked for him, grilling beside a massive snow bank, and chatting about cultural differences between the US and Europe. Then I chatted to James (Ward) and we have a mutual aquaintance (Steve Webster, the architect and originator of the Cairngorm framework for FLEX)<br /></li><li>We finished up with a series of summary lightning talks from all the groups on what we'd done during the day<br /></li><li>We adjourned to our house, and met another attendee on the way, chatted, and listened to the Coyotes out in the woods</li></ul>All in all, it just <span style="font-style: italic;">feels</span> different. I still had the tired, brain-full feeling you get from Java ONE, but that was combined with the feeling that you're <span style="font-style: italic;">participating</span> and building relationships which will help you get even more out of events to come (and beyond). I still haven't got involved in any projects yet, but I aim to change that today. Bill (Venners) is looking for input on the tests for ScalaTest and it looks as good a time as any to try and get to grips with that. Fred (Simon) is also making noises about a Netbeans plugin for Fan. That might be interesting too. We'll see how much I manage to pack in...<br /><br />Anyway, off to Camp 4 and day 1...Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-24525684.post-33025611984815592242009-02-27T14:49:00.005+00:002009-02-27T15:41:37.998+00:00Managing Parallel Development Streams With Shared Codebases in Jazz SCM<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQmnXxMb4w5S3jTpU37yyJcfCn3NCSOFf3GGadwCNW8v3cY5KjlggvZ3aOjZ8AGKmnMIL6nuZ3b4CICY4uAGBAVId5R-0nnYOLIFHLKSHQGwh94TYxTvjt7uvcJ61q4rjf8Aq_0A/s1600-h/Jazz_Streams_Diag_1.PNG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 199px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQmnXxMb4w5S3jTpU37yyJcfCn3NCSOFf3GGadwCNW8v3cY5KjlggvZ3aOjZ8AGKmnMIL6nuZ3b4CICY4uAGBAVId5R-0nnYOLIFHLKSHQGwh94TYxTvjt7uvcJ61q4rjf8Aq_0A/s320/Jazz_Streams_Diag_1.PNG" alt="" id="BLOGGER_PHOTO_ID_5307502717627230274" border="0" /></a><br />We're in the situation where we have a common codebase (i.e. a shared set of Jazz components) which is being worked on by more than one development team, each of whom have different release dates. It is possible to set up Jazz to work for this situation, but it confused me at first. Here's how we managed it.<br /><br /><br /><br /><span style="font-weight: bold;">Create a "Next Release" Stream (for Integration and Releasing)</span><br />Firstly you need to create a "Next Release" Stream. No development happens on this stream, but it does contain all the components which all the other developments will be working on. It is purely for other streams to deliver into, and acceot changes from, and where releases are made. When a release is made, a new stream is created, named after the release, and any bug fixes made in that stream are flowed back into "Next Release".<br /><br /><span style="font-weight: bold;">Create the "Project Xxxxx" Streams as Required</span><br />For each development team (tasked with a certain package of work - called "Change Requests" in out project) create a new Stream containing the Components from the "Next Release" Stream as required. Name them after the Project and make the flow target the "Next Release" stream. Add build engines for each new Stream, each with their own workspace. We have two - one which compiles the code and runs just the unit tests and another which also deploys and runs the integration tests. The former is automatic on each check in. The other is scheduled to run at intervals.<br /><br /><span style="font-weight: bold;">Usage</span><br />Set up Jazz with seperate teams for each project. These in turn should have seperate dev lines and Iterations and Iteration Plans. Developers then create workspaces as required.<br /><br />Development proceeds as normal, with developers delivering changes to their project's stream no a regular basis (twice a day is good) and accepting changes which are incoming. In addition, the team which is scheduled to release first periodically deliver their changes into the "Next Release" Stream (once a week? the volatility of the codebase and amount of shared components with other projects will dictate the frequency). The other teams then flow these changes into their workspaces, merging as required. They do not yet flow their changes into the "Next Release" Stream.<br /><br />When the time comes, the release is made from the "Next Release" Stream. As mentioned before, a new Stream is created and populated with the new release's Components. Bugs subsequently found in this release are fixed in this Stream and flowed back into the "Next Release" Stream also.<br /><br /><span style="font-weight: bold;">What if Both Projects Release Simultaneously?</span><br />If both projects deliver simultaneously, then both teams should merge into the "Next Release" Stream as the periodic merge intervals, and accept the resulting changes which come from other projects. This should be done one project at a time to ensure that there is always a working set of functionality for the Next Release.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-24525684.post-22632026197921143482008-12-02T15:25:00.004+00:002008-12-02T15:44:48.990+00:00Moving and Renaming in Jazz SCMMy current project has begun by us inheriting an old code base which we need to support. We want to take this, re-structure it (literally move the contained code projects around and rename the directories which contain them), add build scripts and other meta information. We don't want to change the inherited source or config data at all.<div><br /></div><div>Ideally we want all this to be tracked, so that if, in the future, we want to know if we have changed something from what we inherited, we can do a simple "compare" between two snapshots and see what had happened in the interim.</div><div><br /></div><div>It turns out Jazz SCM provides some really nice move and rename support to give us just what we need. Rather than just doing deletes and adds (like Subversion) it actually knows what you've done. It also seems to work moving things across components.</div><div><br /></div><div>This has meant we can create a new workspace (called, for example, "inherited codebase") and within it create a component to house the codebase, and then additional ones which break down your code as desired (e.g. one per ecplise project). We then added the code to the "inherited codebase" comopnent, checked in, snapshotted, and then started our reorganisation.</div><div><br /></div><div>Jazz SCM - ideal for our purposes! (Thanks to Andy McGoldrick for the tip off)</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-24525684.post-18640563682291523132008-11-26T10:59:00.011+00:002008-12-12T10:20:36.633+00:00Adding a Bespoke Work Item in Jazz Team ServerUPDATE: I've had a chat with IBM about some of the areas in this post. I've cleaned this up as a result.<br /><br />I've been using IBM's Jazz Team Server 1.0.1 recently. Most of my time has been setting it up for a new project where the client wants to use the Work Item Functionality to log incidents. We're using the Scrum process configuration and the default Work Items which come with this did not meet their requirements - not that is without us ending up removing functionality from the "Task" and "Bug" Work Items which we wanted to also use internally for development.<div><br /></div><div>Consequently, it was necessary to create a new Work Item: "Incident". This would allow us to specify the fields, presetation and workflow for the three sub-types of incident we needed, without altering anything else which came out of the box which we would need elsewhere.</div><div><br /></div><div>Now, there is already some <a href="https://jazz.net/learn/LearnItem.jsp?href=content/docs/work-items-cust/index.html">existing documentation on how to create a new Work Item</a>,with associated presentation and workflow but after following this, I have realised some subtleties which I will highlight.</div><div><br /></div><div><span class="Apple-style-span" style="font-size:large;">The Work Item and Enumerations</span></div><div>Firstly, you should create your enumerations. To aviod namespace clashes, try and use the same conventions as IBM (prefixing ID's with "<span class="Apple-style-span" style="font-family:'courier new';">com.</span><span class="Apple-style-span" style="font-family:'courier new';">mycompany</span><span class="Apple-style-span" style="font-family:'courier new';">.team.workitem.</span>" is generally how this is done, but not universally). In my case I created four new enumerations: </div><div><br /></div><div><span class="Apple-tab-span" style="white-space: pre;"> </span><span class="Apple-style-span" style="font-family:'courier new';">com.mycompany.team.workitem.enumeration.incidentPriority </span><br /></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-family:Georgia;"><span class="Apple-tab-span" style="white-space: pre;"> </span><span class="Apple-style-span" style="font-family:'courier new';">com.</span></span></span><span class="Apple-style-span" style="font-family:'courier new';">mycompany</span><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-family:Georgia;"><span class="Apple-style-span" style="font-family:'courier new';">.team.workitem.enumeration.incidentImpact </span></span><br /></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-family:Georgia;"><span class="Apple-tab-span" style="white-space: pre;"> </span><span class="Apple-style-span" style="font-family:'courier new';">com.</span></span></span><span class="Apple-style-span" style="font-family:'courier new';">mycompany</span><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-family:Georgia;"><span class="Apple-style-span" style="font-family:'courier new';">.team.workitem.enumeration.incidentEnvironment</span></span><br /></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-family:Georgia;"><span class="Apple-tab-span" style="white-space: pre;"> </span><span class="Apple-style-span" style="font-family:'courier new';">com.</span></span></span><span class="Apple-style-span" style="font-family:'courier new';">mycompany</span><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-family:Georgia;"><span class="Apple-style-span" style="font-family:'courier new';">.team.workitem.enumeration.incidentSource</span></span><br /></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><br /></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-family:Georgia;">Then I created the new Work Item Type Category:</span></span></div><div><br /></div><div><span class="Apple-tab-span" style="white-space: pre;"> </span><span class="Apple-style-span" style="font-family:'courier new';">com.</span><span class="Apple-style-span" style="font-family:'courier new';">mycompany</span><span class="Apple-style-span" style="font-family:'courier new';">.team.workitem.workItemType.incident </span><br /></div><div><br /></div><div>Next I added the types of incident which could occur:</div><div><br /></div><div><span class="Apple-tab-span" style="white-space: pre;"> </span><span class="Apple-style-span" style="font-family:'courier new';">ID: incident-failure-defect, Name: Failure - Defect</span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-family:Georgia;"><span class="Apple-tab-span" style="white-space: pre;"> </span><span class="Apple-style-span" style="font-family:'courier new';">ID: incident-failure-bug</span></span>, Name: Failure - Bug<br /></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-family:Georgia;"><span class="Apple-tab-span" style="white-space: pre;"> </span><span class="Apple-style-span" style="font-family:'courier new';">ID: incident-service-request , Name: Service Request</span></span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><br /></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-family:Georgia;">Then, <span class="Apple-style-span" style="font-style: italic;"><span class="Apple-style-span" style="font-weight: bold;">making sure the editor was showing my new type</span><span class="Apple-style-span" style="font-style: normal;">, I added the four enumerations as Custom Attributes. </span></span></span></span></div><div><br /></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-tab-span" style="white-space: pre;"> </span>ID: incidentPriority-n, Name: Priority-n<br /></span></div><div><span class="Apple-tab-span" style="white-space: pre;"><span class="Apple-style-span" style="font-family:'courier new';"> <span class="Apple-style-span" style="white-space: normal;">ID: <span class="Apple-style-span" style="font-family:Georgia;"><span class="Apple-tab-span" style="white-space: pre;"><span class="Apple-style-span" style="font-family:'courier new';">incident</span></span><span class="Apple-style-span" style="font-family:'courier new';">Impact-n, Name: Impact-n</span></span></span></span></span></div><div><span class="Apple-tab-span" style="white-space: pre;"><span class="Apple-style-span" style="font-family:'courier new';"> <span class="Apple-style-span" style="white-space: normal;">ID: <span class="Apple-style-span" style="font-family:Georgia;"><span class="Apple-tab-span" style="white-space: pre;"><span class="Apple-style-span" style="font-family:'courier new';">incident</span></span><span class="Apple-style-span" style="font-family:'courier new';">Environment-n, Name: Environment-n</span></span></span></span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-family:Georgia;"><span class="Apple-tab-span" style="white-space: pre;"><span class="Apple-style-span" style="font-family:'courier new';"> <span class="Apple-style-span" style="white-space: normal;">ID: <span class="Apple-style-span" style="font-family:Georgia;"><span class="Apple-tab-span" style="white-space: pre;"><span class="Apple-style-span" style="font-family:'courier new';">indicent</span></span><span class="Apple-style-span" style="font-family:'courier new';">Source</span><span class="Apple-style-span" style="font-family:'courier new';">-n, Name: Source-n</span></span></span></span></span></span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><br /></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><div><span class="Apple-style-span" style="font-size:large;"><span class="Apple-style-span" style="font-family:georgia;">Why the Italics? Why the Funny Names?</span></span></div><div><span class="Apple-style-span" style="font-family:georgia;">RTC does not allow you to remove attributes once you've created them, even if you got it wrong. This is because you might have created the custom attribute, then created work items using it, and then <span style="font-style: italic;">subsequently</span> made a change. To preserve these old work items, you cannot create another custom attribute with the same ID. This means you need to make sure you get things right.<br /><br /></span></div><div><span class="Apple-style-span" style="font-family:georgia;">If you do make a mistake, just bite the bullet, all is not lost. Remove the incorrectly added custom attribute and then add it again in the right place. Make sure that you use a distinct ID (I got into the habit of appending a "-#" on the end) and do the same to it's Name. This will allow you to distinguish between the multiple choices when adding it to a presentation. Once you have added it, you will see the slightly offputting Name with "-#" appended. To remove this, go back to the custom attribute, and edit it to remove this. All will then be well.<br /><br />NOTE: IBM are aware of this pecadillo and in release 2.0 they will display the Name <span style="font-style: italic;">and the ID<span style="font-style: italic;"> </span></span>in the drop downs. Cool.<br /><br /></span></div></span></div><div><div><span class="Apple-style-span" style="font-size:large;">Creating the Presentation Elements and Binding to the Work Items</span></div><div>Now you are ready to add the presentation. I tended to take a "Test A Lot" approach to this, just to make sure I wasn't getting myself messed up. In my case I followed the default editor very closely, with the same tabs end presentations, save for a different "Details" section in the Overview Tab.</div><div><br /></div><div>Firstly I created the presentation:</div><div><br /></div><div><span class="Apple-tab-span" style="white-space: pre;"><span class="Apple-style-span" style="font-family:'courier new';"> </span></span><span class="Apple-style-span" style="font-family:'courier new';">com.</span><span class="Apple-style-span" style="font-family:'courier new';">mycompany</span><span class="Apple-style-span" style="font-family:'courier new';">.team.workitem.editor.incident</span></div><div><span class="Apple-tab-span" style="white-space: pre;"> </span></div><div>Then I created an Overview Tab:</div><div><br /></div><div><span class="Apple-tab-span" style="white-space: pre;"><span class="Apple-style-span" style="font-family:'courier new';"> </span></span><span class="Apple-style-span" style="font-family:'courier new';">com.</span><span class="Apple-style-span" style="font-family:'courier new';">mycompany</span><span class="Apple-style-span" style="font-family:'courier new';">.team.workitem.tab.incidentOverview</span></div><div><span class="Apple-tab-span" style="white-space: pre;"> </span></div><div>And a new Section for the Incident Details:</div><div><br /></div><div><span class="Apple-tab-span" style="white-space: pre;"><span class="Apple-style-span" style="font-family:'courier new';"> </span></span><span class="Apple-style-span" style="font-family:'courier new';">com.</span><span class="Apple-style-span" style="font-family:'courier new';">mycompany</span><span class="Apple-style-span" style="font-family:'courier new';">.team.workitem.section.incidentDetails</span></div><div><br /></div><div>Then I added the first presentation:</div><div><br /></div><div><span class="Apple-tab-span" style="white-space: pre;"><span class="Apple-style-span" style="font-family:'courier new';"> </span></span><span class="Apple-style-span" style="font-family:'courier new';">com.</span><span class="Apple-style-span" style="font-family:'courier new';">mycompany</span><span class="Apple-style-span" style="font-family:'courier new';">.team.workitem.presentation.incidentType</span></div><div><span class="Apple-tab-span" style="white-space: pre;"> </span></div><div>Once this was done I swapped out to the bindings page and bound my three new work items to this new presentation, saved, and pressed CTRL-Shift-N. This allowed me to check that when I created a new Service Request, that the screen was building up as I expected. I did this after each new Presentation.</div><div><br /></div><div>I carried on adding Presentation elements as required. I populated the rest of the editor by copying the structure of the default editor and reusing the existing elements.</div><div><br /></div><div><span class="Apple-style-span" style="font-size:large;">Associating a Workflow</span></div><div>Finally I associated my new Work Item type with a Workflow. I reused the Bugzilla one which comes out of the box as it was more than sufficient for my needs. If you need to create your own, the aforementioned tutorial on the Jazz site provides an introduction on how to do this.</div></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-24525684.post-23773623724397649672008-11-26T10:29:00.004+00:002008-11-26T10:58:44.369+00:00Tips for Setting up a New Project in IBM's Jazz Team ServerI've just set up my first few projects on <a href="http://jazz.net">IBM's Jazz platform</a>. It's dead simple, but there are a few things I've learned which are worth knowing. I've listed them so others can benefit from my experiences. <div><br /></div><div>NOTE: this is all done with the Web UI. Once you've completed these steps, its best to move to the Eclipse-based client for the rest of your configuration as the errors are less cryptic / actually exist.<div><ol><li>Think about what you need before you do anything. You need to know what you will name your project (we named ours after the client), which process you will use (we are going for Scrum), what your development lines are (we have the default mainline and also an existing release (we have inherited a codebase) and what teams ("Team Areas") you will need (we have one for our client who will access the web UI as well as multiple for ourselves). There are other descicions to make, but these are the ones you will need at the beginning.</li><li>Create an admin user for your project area. Give them JazzAdmin priviledges and also (temporarily) a Developer licence.</li><li>Logged in as your project admin user deploy the bundled process configurations</li><li>Still logged in as your project admin user, create the users you need, allocating them licences as appropriate. As well as the "real" users, you will likely need a Build user.</li><li>Before you create your Project area, deploy the bundled process configurations</li><li>Create your project, making sure you select the process you want to use. Add the users you have created as applicable. Allocate the users to process roles (i.e. Team Member, ScrumMaster etc.)</li><li>Create any additional Development Lines. We kept the default "Main Development Line" but also added a "Support Development Line"</li><li>Create team areas as required. We had several - one for the client, one for our onsite support, another for the existing app maintenance, and a fourth for new development. Team Members can belong to more than one team so don't worry about allocation when designing this layout. Make sure when you create a Team Area that you select the required Development Line</li><li>Allocate team members to the team areas as appropriate. I choose to send the invite emails as this makes getting new members onboard easier</li><li>Remove the default admin user (archive the account)<br /></li><li><a href="https://jazz.net/learn/LearnItem.jsp?href=content/tech-notes/jazz-team-server-0_6-deployment-guide/index.html">Set up backups</a> </li></ol><div>Additional Notes:<br /></div><div><ul><li>I've tried this on Jazz 1.0 and 1.0.1</li><li>It might seem as if you can't rename or archive some things after you've created them if you're using the Web UI. Swap to the Eclipse client and you will probably be in luck.</li><li>I've not covered adding additional "Setup Work Items" which are automatically generated for each user upon creation. This should be done before team members are added. I'll cover this in a later blog post</li></ul></div></div></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-24525684.post-50762337194907051652008-11-17T13:20:00.005+00:002008-11-24T08:56:15.203+00:00Adding a Non-Eclipse Project to Jazz SCMIBM's new Jazz platform works most intuitively when you're in an all-IBM world. We're not in that world on my current project and were having to find our way a little (with excellent support from IBM). Here's how to share a non-Eclipse project with Jazz SCM.<div><br /></div><div>Pre requisites: I'm assuming you have some stuff in a filesystem you want to share.<br /><div><ol><li><a href="https://jazz.net/downloads/rational-team-concert/releases/1.0.1?p=allDownloads">Download</a> and unzip the RTC Client for your operating system - its any of the "Zip > Client" files under "Express-C", "Express" or "Standard". They're all the same.<br /></li><li>Startup the RTC eclipse client - e.g ./RTC-Client-1.0.1-Win/jazz/client/eclipse/TeamConcert</li><li>Switch to / open the Java Perspective (Window > Open Perspective > Other... > Java)</li><li>Switch to the Package Explorer View (if you can't see it open it by navigating to Window > Show View > Other... > Package Explorer)</li><li>In the Package Explorer View (it should have opened in the left hand pane. If not, open it by going to Window > Show View > Package Explorer) ...</li><li>... and right click in it and select New > Other</li><li>In the dialog which appears type "Project" and select General > Project which should be visible</li><li>Click "Next"</li><li>Enter a project name (the name of the folder containing the files which you want to share is good)</li><li>Leave the "Use default selection" ticked. This will mean the project is created in your RTC workspace. If you want it to be elsewhere, untick this and Browse to where you want it to be. NOTE: we will be copying your project into this Eclipse project so don't point straight at the project you are going to share</li><li>Click "Finish"</li><li>You should see your newly created project in the Package Explorer View</li><li>Right click on the new project in the Project Explorer and select "Import..."</li><li>Type "file" in the text box and select General > File System which should be visible</li><li>Click "Next"</li><li>Click on "Browse" and select the folder containing the content you wish to share</li><li>In the right hand pane, tick all of the contents of the folder you with to share. Make sure the folder itself is not ticked. You already have a folder with the same name you are importing into</li><li>Click "Finish"</li><li>Once the import has finished, expand your project in the Package Explorer and check that what you have imported is there. You may have to press "F5" with your project selected to refresh if things are not visible</li><li>Now you can share your project. Right click on the project in the Package Explorer and select "Team > Share Project ..."</li><li>Select "Jazz Source Control" and click "Next"</li><li>Select a component to associate this project with. (NOTE: See the Jazz docs for more detail on what a component is. If you need to you can create a Component at this point in the process. We'll assume that the components available include one which you want to use.) Click "Next" when you're done</li><li>Tick the "Show all resources" checkbox and check that all the files you want to share are shown. If you want to exclude files, you can select them and click the "Ignore" button. Alternatively you can set a new pattern.</li><li>Click "Finish"</li><li>Switch to the "Pending Changes" view. (If you can't see it go to "Window > Show View > Other..." and select "Jazz Source Control > Pending Changes")</li><li>Expand the workspace that you shared your project into. You should see a folder called "Outgoing"</li><li>Right click on "Outgoing" and select "Deliver"</li><li>Congratulations! You've shared your project.</li></ol></div></div>Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-24525684.post-26242506004236020752008-05-22T11:49:00.004+00:002008-05-22T12:25:16.972+00:00JavaOne 2008 - Java RecrystalisedThis year after JavaOne, my wife and I took a holiday. We hired a car and drove round California and visited some of the <a href="http://www.flickr.com/photos/andrewbrucelaw/2504571221/">amazing National Parks</a> the USA has to offer. I was under orders not to speak about or mention the conference - I was supposed to be switching off and relaxing. Well, at Sequoia, we took a tour round the amazing (and badly named) Crystal Caves. While I was down there it seemed to me that the events of the hectic week just passed came together somewhat. Crystalised you might say.<br /><br />It had seemed to me that on the surface, there wasn't a lot new out there. Most of the sessions I'd been had told me a lot, but its wasn't exciting and new. But then I realised that there was a more subtle trend - lots of things had instead been re-imagined: <a href="http://www.google.co.uk/url?sa=t&ct=res&cd=3&url=http%3A%2F%2Fdevelopers.sun.com%2Flearning%2Fjavaoneonline%2F2007%2Fpdf%2FTS-6503.pdf&ei=6WI1SNTIDISG8gSLmKG8DQ&usg=AFQjCNGRbH9rLFl61JilInKZ51Nu1dbqGA&sig2=3aSHWm2-aUhqWhQT1bKXVg">Glassfish 3</a> was now OSGi based and modular. Then there was a better <a href="http://www.springsource.com/web/guest/home">Spring</a> (which now claimed to be a better EJB 3.0 container) and also a <a href="http://the-music-of-time.blogspot.com/2008/05/future-of-guice-bof-6400.html">new</a> <a href="http://code.google.com/p/google-guice/">Guice</a> (which claimed to be a better Spring). In other areas, there were calls to re centre the human and re look at our mental models behind things we take for granted - <a href="http://headrush.typepad.com/">Kathy Sierra</a> was a surprise guest at "How to Write the Next Great Java Book" and implored us to consider the audience's psychology when addressing them. In other areas <a href="https://hudson.dev.java.net/">Hudson</a> was <a href="http://the-music-of-time.blogspot.com/2008/05/imporoving-engineering-process-through.html">Continuous Inegration with a human face</a> and <a href="http://www.eclipse.org/mylyn/">Mylyn</a> tried to challenge IDE information overload and allow you to <a href="http://the-music-of-time.blogspot.com/2008/05/mylyn-code-at-speed-of-thought-ts-6421.html">code "at the speed of thought"</a>. Even the Aussies at <a href="http://www.atlassian.com/">Atlassian</a> implored us to <a href="http://the-music-of-time.blogspot.com/2008/05/pimp-my-build-ts-5596.html">put the fun back into our builds</a>.<br /><br />The Re-imagining continued. <a href="http://the-music-of-time.blogspot.com/2008/05/applets-reloaded-ts-6290.html">Applets were back with a vengance</a> breaking the browser / desktop boundary and gaining a spontaneous standing ovation for the team when they came on stage and new JVM languages were now accepted as first class citizens: we <a href="http://the-music-of-time.blogspot.com/2008/05/groovy-red-pill-or-metaprogramming-way.html">took the Red Pill</a> with <a href="http://groovy.codehaus.org/">Groovy</a>, heard <a href="http://the-music-of-time.blogspot.com/2008/05/jruby-at-thoughtworks-bof-4807.html">how JRuby is being accepted in the enterprise</a> from <a href="http://ola-bini.blogspot.com/">Ola Bini</a>, and <a href="http://www.scala-lang.org/">Scala</a> came out of the academic shadows with a large crowd in attendance for Martin Odersky's latest update. Finally <a href="http://www.sun.com/software/javafx/index.jsp">JavaFX Script</a> continued to gain momentum, <a href="http://the-music-of-time.blogspot.com/2008/05/overview-of-javafx-script-ts-5152.html">being discussed from a language design perspective</a> by its creator, Chris Oliver.<br /><br />And there it was. Just as my thoughts had crystallised, so it seems has the Java Ecosystem. Re crystallised in fact, from the same basic substrate - the JVM - but under changing conditions - dynamic languages, harder problems, new communities. It's still an interesting time to be invoved in the Java world. Just don't expect to be writing just <span style="font-size:85%;"><span style="font-family: courier new;">public static void main(String[] args)</span></span> for ever!Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-24525684.post-10354161751094466462008-05-19T19:32:00.008+00:002008-05-19T19:43:27.189+00:00CommunityOne 2008 - Open Social For Your WebsiteDave Johnson and James Wood.<br /><br />History: blogs, wikis, feeds and friends. All were websites.<br /> - Enterprise vendors and portals are adding support for this kind of web site.<br /> - Web 1.0 was hard. FTP.<br /> - Then came wikis and blogs. All had feeds and RESTful Apis.<br /> - Then the web became social. Friends and shareing.<br /> - 2002-3 friendster. Myspace. Facebook. The demographic expands.<br /> - Facebook launch their API. Become a platfom and social graph. Plugins to my web site an beyond<br /> - Then google "answered" with Open Social.<br /><br />What is a social? Share profile and activities and control the audience for this. Find friends, get a date , share a common endeavor.<br /><br />As a platform. You don't build the apps. You let others do it on you.<br />Then rich profile info went to work. For better personalisation , sharing and group collaboration. Big vendors build this in. The social graph will converge with ID management<br /><br />What is Google's Open social? Its a Javascript API built on top of google gadgets and a REST API in top of an extended atom publishing protocol ( but JSON will be added)<br /><br />Open social api: It models people but you can't write to it. They can't change your data.<br />It also has activities: title, date, media file. Apps can create activities.<br />Persistence: you can store name value pairs.<br /><br />The REST API mirrors JS API above.<br /><br />There is an open social namespace to get details of supported functions.<br /><br />Currently .v.0.7<br />Grouping is not done yet<br />Apache Shindig is the reference implementation<br />Plus the open social foundation is there but that's it<br /><br />But there is still the silo problem. Open Social doesn't solve it. But there are some reasons to have done silos.<br />Linking/federation is possible (with FOAF or XHTML friends API) but there is no privacy ( though there is work to integrate FOAF with OpenID)<br /><br />Is it open? Spec now out in December. Yes it is now.<br /><br />Apache shindig: Javascript<br />Its a Java based Google gaget server.<br /><br />What's missing?: It has no implementation of a social graph. You must use your one existing. You need to provide your own UI elements to edit profiles.<br /><br />How do I use It?: write a facebook app? Whitelabel? Use apache shindig?<br />But my site didn't have an existing social graph!<br /><br />Project social site:<br /> - Build wigets and web services.<br /> - Web services with full rest supper<br /> - Socialsite adds a profile widget.<br /> - Addresses UI piece with widgets. Profile, friends, groups,...<br /> - Addresses editing, joining, accepting and managing<br /> - It extends open social.<br /> <br />Value add: it has a comprehensive social graph.<br /> - Easy to use widgets for java and ruby apps.<br /> - Gadget management features<br /> - ID management features with tie in to your ID management solution.<br /><br />JMaki is the widget wrapper ( Netbeans and Nclipse support)<br /> - Drag and drop to create an application<br /> - Extended mediawiki example<br /> - Wrote a mediawiki extension so that as a user you add a single tag to add the widgets to my profile page.<br /> - Also done for the roller blog server as new templates.<br /><br />Links:<br /><a href="http://socialsite.dev.java.net/" target="_blank">http://socialsite.dev.java.net</a><br /><a href="http://code.google.com/Apis/opensocial" target="_blank">http://code.google.com/apis/opensocial</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-24525684.post-91094062097485428332008-05-19T19:16:00.007+00:002008-05-19T19:31:35.715+00:00CommunityOne 2008 - The Road to Babel: Bringing the JVM Language Implementers TogetherCharles Nutter, SunMicrosystems<br /><br />Language survey: 200+ lands<br />Nolanf is inpossible fix are most diff, dynamic are hard to optimise. No Lang is too weird<br /><br />Functional Languages:<br />clojure:<br />Lisp dialect but easier to read and write.<br />- Released every 3-6 weeks. Getting exposure now.<br /><br />Kawa: Implementation of scheme. One of oldest compilers.<br />- Currently v1.9.1. Multiple projects using it. Open secret.<br /><br />Ocaml-java: Very expressive. Functional, imperative and OO styles, need to set up external files to bind to java calsses<br />- 1.0 out in beta now. 2.x branch comping to focus on speed.<br /><br />Scala: OO, ( classes, traits and mixins)<br />Statically typed. Nice looking DSLs. Fully interoperable with Java<br />- 2.7.0 is final. 5000 downloads / month. The Lift web framework is gaining traction.<br /><br />Groovy: many features from Python and Ruby. Always JVM Lang. Has closures, mutable classes with a very java-like syntax. Has many libraries built in.<br />- 1.5.6 is current. 1.6 is out in beta. (Perf improvements - 500> in some cases and tidied bytecode)<br /><br />JRuby: Ruby on the JVM. Rails and most other frameworks run. It's a Ruby for the java world and integrates well with java.<br />- 1.1 out a month ago. (Perf improvements.) The most compatible with Ruby 1.8. Future: more speed and comparability (groovy-level comparability). Share some low level advances with Groovy etc.<br /><br />Jython: well structured, (honest). Wide range of libraries and applications. Can call into java.<br />- 2.2 is in prod. Behind phython. Large userbase. Trunk is 2.3 compatibility and aiming at 2.5. New compiler and parade being worked on. Already sharing a posix layer a. Jruby.<br /><br />Rhino: dynamically typed and functional-like. Very flexible. Pervasive on the client, more on server coming up.<br /> - 1.6r2 in Java 6. Interpreted by default but can be compiled. 1.7 will be java script 1.7 compatible. Ecmascript 2 is being tracked.<br /><br />Case study:<br />JRuby. Dynamic typing is hard. Ruby has its own type system, continuations, etc. It also has Real world dependencies on c extensions.<br /><br />But pushing boundaries on the jvm. This brings Java new blood, new ideas. Thus the JVM may be a better ruby runtime.<br /><br />Complex: JRuvy does mixed mode- interpretataion, then compile later. Profiling is to be added. It has a custom string, array ( list), hash(map), regexp. It generates code to avoid reflection overhead. Multiple can run on a single JVM. Therefore you can have lots of Ruby apps on one JVM.<br /><br />What would make it easier?:<br /> - Lightweight code generation and loading.<br /> - A faster-than-reflection method object.<br /> - A tool chain for parsing interpretation and compiling.<br /> - A more flexible JVM type system.<br /><br />Collaboration: much is common across these languages. There are many similar problems. All are growing the platform. Consequently the platform is being pushed forward and extended.<br /><br />Jvmlanguages group ( google group )<br /><br />Jvm language runtime ( inspired by MSFT) should be general. We can gather the best libraries together and provide a fast track for implementation.<br /><br />Possible new bits:<br /> - Toolchain for parsing, interpretation and compiling: Antlr++?<br /> - Language agnostic type inference: repurpose Scala or Haskell?<br /> - Metaobject protocol? Flexible class definition. Learn from Groovy's MOP.<br /> - Reflection-free method handles.<br /> - Specialised types: c.f Ola's YAML parser<br /> - The NLT is out there already<br /><br />DaVinci VM: This is an open jdk based multi language vm.<br />It has anonymous classloading, lightweight method handles, optimised dynamic invocation, continuations, tail call optimisations, and tuples.<br /><br />Your future: you are the community. You are not as dumb ss you think. You'll be a better person as a result. OSS is good for your career. You don't need to know about how to write a compiler. Be a polyglot - consider many languages for each problem.<br /><br />Get involved: easy (core type systems) run rests and fix bugs. Interpreters are harder but basically the tree walker or walks the bytecode. Compilers are difficult but fun. Tree walk (easy) generate bytecode (hard and obscure)<br /><br />What about IDE support?: generally driven by usage. Netbeans support is generic.Unknownnoreply@blogger.com0