Troubleshooting: When It Just Won't Work

October 22, 2008 By Tim O'Brien 0

Last week there was a question on the Neo4J dev list about troubleshooting a Maven build. I responded with a quick list of things to check. (more…)

Categories: Sonatype

Matt Raible on Comprehensive Project Intelligence

October 21, 2008 By Tim O'Brien 0

In this blog entry, Matt Raible talks about Jason van Zyl’s presentation at the Colorado Software Summit. Matt’s post is a good overview of combining Nexus, m2eclipse, and Hudson to create a smoothly operating system to manage all the moving parts that make up a modern software engineering effort.  (more…)

Categories: Sonatype Tags: , , , , ,

A Late Report on a Late Event

It’s been more than a year that I’m working for Sonatype (mainly on Nexus), the successor of Proximity. It was a great year, spent with cool people, and with great events like (in order as they happened):

  • my daughter was born,
  • we released Nexus 1.0 to general public.

The events were originally planned to be in the opposite order, but Brian was delaying Nexus with his nitty-gritty wishes — you know him ;) –, and my daughter decided to take over. All this happened before almost 8 months. So, sorry for this late report.

But since then, my daughter was contributing a lot to quality, design and implementation of Nexus MRM. Almost at the start, she jumped in the role of “lead gaffer” (it resembles the “superman” pose slightly):

Also, she insisted on using the “thinking hat” very much, when solving almost impossible tasks requested by Brian:

Examined all the tools she had at disposal to solve problems:

She had a lot of “developer to developer”-like consultations with some open-source gurus:

And attended the “How to write server applications to suite all Brian’s needs, 2008″ conference held in Prague (no, she was not having beer, rather just “light refreshing discussion”):


Oh, and why was it a “late event”? Since we have a huge shift in timezones (I am GMT+2, Brian is GMT-4 and mr. Cupertino is usually GMT-7, if not at home), and I am the “minority” — at least in head-count. So, the common sense dictated that I should live the “vampire life” and follow their work hours, as I did.

And my daughter Petra was patient, she waited for me to finish, and came at the end of my work day, hence, in late hours in local time.

Categories: Nexus

Mercury – externalized dependencies

By oleg 0

Inspiration

In Mercury we made an attempt to bring some contemporary ideas into Maven, make Maven not a monolithic build system, but rather a lego-like construction set that allows users to create systems they need. One set of building blocks in particular – implementation of the idea that dependencies is a universal commodity, that exists outside of Maven world. And operation of resolving conflicts on those dependencies can apply to a broader range of dependencies, not just <dependencies/> tag in the POM file.

For example – it should be relatively easy to plug in an implementation to read OSGi bundle dependencies. Or read a .properties file with dependencies.

Or – my favorite – keep dependencies in a Drools-backed DSL file. I will try to create this implementation after we integrate Maven POM dependency reader into Mercury.

How is it done:

  • Dependency trees and manipulated by DependencyTreeBuilder object
  • DependencyTreeBuilder instance is created out of a collection of Repositories (to find Artifacts) and and instance of DependencyProcessor.
  • DependencyProcessor abstraction is that externalization component for reading/processing depedencies, making the builder independent of actual dependency information storage

Example code

1
2
3
4
5
6
    DependencyTreeBuilder dtb
        = new DependencyTreeBuilder( null, null, null, reps, processor );
    MetadataTreeNode root
        = dtb.buildTree( new ArtifactBasicMetadata( "org.apache.maven:maven-core:2.0.9" ) );
    List cp
        = dtb.resolveConflicts( ArtifactScopeEnum.compile );

This example demonstrates full dependency resolution cycle:

  • full tree is created in root variable
  • compile classpath is stored in variable cp.

The two initialization steps required:

  • create a collection of repositories in reps
  • get an instance of DependencyProcessor into processor

Also interesting – resulting classpath is a list of artifact metadata objects, not artifact binaries. So in order to actually bring the binaries to local machine, we’ll need one more call – to VirtualRepositoryReader, which I will describe it in a separate posting.

What’s important here is the fact that operation of fetching binaries from remote repositories is separated from building dependency tree as well as from resolving conflicts. Which means that you can call all of those operations independently to construct a workflow you need for a particular application. All the metadata that was fetched in the process of creating dependency tree is cached by a RepositoryMetadataCache component, that complies with repository update policy.

Categories: Maven, Mercury Tags: , ,

Blogging in markdown with embedded code syntax-highlighting

October 19, 2008 By Jason van Zyl Comments Off

I’ve been using Markdown for a while now, but to date embedding code was a bit of a pain with Pebble and Marsedit. Sonatype has switched over to using WordPress and I’ve installed a couple plugins to make working with Markdown and syntax-highlighted code very easy.

The first plugin is Michael Fortin’s very cool PHP Markdown Extra which does the standard Markdown goodness but allows for many additions including allowing you to embed HTML in the Markdown.

This dovetails perfectly with the second plugin which is Ryan McGeary’s

And you’ll end up with something spiffy like: This is my markdown muck with a link to Sonatype and my code below:

public class Hello {
  public static void main(String[] args) {
    System.out.println("Hello World!");
  }
}

With WordPress and these two plugins loaded it makes blogging with example code a lot easier to deal with. Incidentally I tried the plugin for the Google Syntax Highlighter but it doesn’t appear to work with WordPressMu (the multi-user version of WordPress that Sonatype is using). The only thing I would like in the syntax-hightlighted code block is an easy way for the user to copy the sample code.

Categories: Sonatype