Friday 31 August 2007

Why does Artifactory detect your Maven settings.xml

I've been given the job of setting up a build environment at work, and
one of the things I'm setting up is a local Maven repository, and to
have an easy way of maintaining it. I'm testing out Artifactory
(http://www.jfrog.org/sites/artifactory/latest/), and I've come across
what seems to be a bug. In the Config instructions, it only mentions
artifactory.config.xml. There is no mention of any config files
outside the Artifactory install directory.

It seems that if you install Artifactory on a machine that already has
Maven installed on it, it will use the settings.xml for that Maven
installation. This however means that if there are any errors in that
local settings.xml - ie, invalid XML, etc - then Artifactory will not
run.

A few of the things I tried that didn't work:

- delete [ARTIFACTORY_HOME]/data directory
- renamed old Artifactory directory and reinstalled from zip file
- cleaned out C:/Temp

In the console output I noticed this error:

Caused by: org.codehaus.plexus.util.xml.pull.XmlPullParserException: in comment
after two dashes (--) next character must be > not - (position: START_TAG seen .
..</nonProxyHosts>\r\n---... @15:4)
at org.codehaus.plexus.util.xml.pull.MXParser.parseComment(MXParser.java
:2334)
at org.codehaus.plexus.util.xml.pull.MXParser.nextImpl(MXParser.java:117
4)
at org.codehaus.plexus.util.xml.pull.MXParser.next(MXParser.java:1090)
at org.apache.maven.settings.io.xpp3.SettingsXpp3Reader.parseSettings(Se
ttingsXpp3Reader.java:1325)
at org.apache.maven.settings.io.xpp3.SettingsXpp3Reader.read(SettingsXpp
3Reader.java:1637)
at org.apache.maven.settings.io.xpp3.SettingsXpp3Reader.read(SettingsXpp
3Reader.java:1648)

Which would indicate something wrong with an XML config file. I had
settings.xml open and I remembered I'd had this problem before with
XML files.

I removed the dashes in the XML comment, restarted Artifactory, and
w000t, it was working again.

Wednesday 29 August 2007

Is it too much to expect examples to work as described?

Tried creating and running a sample app in AppFuse:

http://appfuse.org/display/APF/AppFuse+QuickStart


Yes, set up MySQL 5 on my PC, have Maven and the JDK installed.

Then created two examples:

mvn archetype:create -DarchetypeGroupId=org.appfuse
-DarchetypeArtifactId=appfuse-modular-struts
-DremoteRepositories=http://static.appfuse.org/repository
-DarchetypeVersion=2.0-m5 -DgroupId=com.mycompany.app
-DartifactId=simplecrud


mvn archetype:create -DarchetypeGroupId=org.appfuse
-DarchetypeArtifactId=appfuse-modular-tapestry
-DremoteRepositories=http://static.appfuse.org/repository
-DarchetypeVersion=2.0-m5 -DgroupId=com.mycompany.app
-DartifactId=tapestry-mod-crud

Then tried to run "mvn integration-test" on each of them.

Both are failing at this point:

[INFO] [antrun:run {execution: default}]
[INFO] Executing tasks
[delete] Deleting: C:\work\tapestry-mod-crud\web\target\webtest-data\web-test
s-result.xml
[echo] Testing 'tapestry-mod-crud-webapp-1.0-SNAPSHOT' with locale 'en'

Login:
log4j:WARN No appenders could be found for logger (com.canoo.webtest.ant.TestSte
pSequence).
log4j:WARN Please initialize the log4j system properly.
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error executing ant tasks

Embedded error: The following error occurred while executing this line:
C:\work\tapestry-mod-crud\web\src\test\resources\web-tests.xml:27: Canoo Webtest
: R_1454.
Test failed.
Test step steps (C:\work\tapestry-mod-crud\web\src\test\resources\web-tests.xml:
29: ) null failed with message "Step[invoke "get Login Page" (1/6)]: HTTP error
502, at: invoke"
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 39 seconds
[INFO] Finished at: Wed Aug 29 18:33:37 EST 2007
[INFO] Final Memory: 22M/44M
[INFO] ------------------------------------------------------------------------


AAARGH.

My co-worker seems to have a sample app set up and running correctly,
but most likely he's not going through the integration tests, or
didn't create the modular projects.

Interesting projects to write

Interesting scripts to write, just as an exercise. Write them in Ruby
then Python.

1. A script that goes through a directory of images and

- renames them, based on EXIF data with name format yyyymmdd-hhmmss.jpg
- creates directories for each distinct date

ie,

create

/20070828/
/20070829/

if the images in the directory are from 28 and 29 august

- (optional) if within the day there is a big gap in the batches of
images (ie, next image is 2 hrs later - have this gap specified in the
parameters), create a directory with " - [number]"

ie,

20070828 - 1

(because the next image timestamp is >=2 hrs later, this must be
another event, so better to have a separate directory)

20070828 - 2


2. The user types in a string and the program constructs an image or
web page with the message typed in "ransom note" format (ie, varying
font types per letter), with letter images fetched from Flickr


3. Go through all my entire Flickr photos and change licensing of all photos.

4. Go through all my mp3s and see if there are any podcasts that don't
have the "podcast" flag missing, then 'switch it on'

5. Get my bookmarks from del.icio.us, then upload to Google Bookmarks.

6. Go through all my photos and flag which ones
- are not readable
- have incomplete EXIF date info
- don't have thumbnails

7. Consolidate my del.icio.us tags. Right now I have some links tagged as "blog", and some are "blogs". Some are "book" and others are "books". Go through all the link tags, and based on which ones are in the majority, rename the tag with a smaller count to the one with the higher count.

Tuesday 28 August 2007

Work research - build server, continuous integration, java+ruby+.Net

We're planning to use Ruby and Java and possibly a little .Net in our new project, so just keeping track of some notes and things I've been researching. This will probably look ugly and require formatting from me.

More SVN config TODO:

* set up SVN+SSSH - otherwise, how will automated builds connect to SVN?
* Web interface for Subversion
ViewVC - requires python, GNU diff
WebSVN - http://websvn.tigris.org
Polarion - http://www.polarion.org/index.php?page=overview&project=svnwebclient

Continuous Integration environments

Java:
Continuum
Hudson - https://hudson.dev.java.net/
- handles maven2
- plugins for Jira, Findbugs, Violations (checkstyle, pmd, cpd and findbugs), Clover

http://damagecontrol.codehaus.org/Continuous+Integration+Server+Feature+Matrix

Ruby -- http://cruisecontrolrb.thoughtworks.com/
Continuous Integration Automater. - http://dev.rubyonrails.org/file/tools/cia/trunk/README
Damage Control - http://damagecontrol.codehaus.org/
Cerberus CI tool for Rails - http://cerberus.rubyforge.org/
handles ALL:

Luntbuild
Cruisecontrol - also has .Net

* Code Coverage
Emma - http://emma.sourceforge.net/samples.html - NO MAVEN PLUGIN - DOES NOT WORK IN INTELLIJ ANYMORE - works in cmd-line and Ant
Cobertura - http://cobertura.sourceforge.net/ - open source - originally from same source code as Clover... has Maven and Ant tasks
Clover - http://www.atlassian.com/software/clover/ - should integrate easily with Jira - supported everywhere! $2200 for team of 10.
features: http://www.atlassian.com/software/clover/whats-new.jsp

Utils to install on server:
Unix utils for win32
http://unxutils.sourceforge.net/
Zip - http://www.info-zip.org/

Saturday 18 August 2007

Ah, YouTube has yet again made my day

Nothing illustrates the quality of most user-generated content better
than YouTube comments such as this:

"sk8rat420: its spelled "nazis" and its the comunist group in germany
during world war 2"

LOL! OMG! He mispelt the word comunnist!

:P

Words simply fail me. I can't find it in me to even pick on him. I am
just in despair, at how many of his ilk are out there.

The comment was found on this video:

http://www.youtube.com/watch?v=N1ftKOQaGbU

Tuesday 14 August 2007

File under: "should've used better encryption"

http://www.smh.com.au/news/national/reprisal-raids-man-guilty/2007/08/14/1186857497172.html

Man taped using Pig Latin to organise Cronulla riot reprisal attacks.


A 29-year-old man was taped using the code language Pig Latin to
organise reprisal gangs the day after the Cronulla riots, a Sydney
court heard today.

Jeffrey Ismail, from Greenacre, pleaded guilty in Bankstown court this
morning to two charges of using a mobile phone to menace, harass or
offend on the day after the riots, December 12, 2005.

Social Software is the new vendor lock-in

An intriguing post about how "social software is the new vendor
lock-in." - http://www.25hoursaday.com/weblog/PermaLink.aspx?guid=69141977-7514-443d-800b-1f95c1ff8dbe