maven

Using maven-exec-plugin to store the current git sha in a build

The current version of the maven buildnumber plugin does not yet support the git scm backend. This makes it harder to get the git sha for the current build (often a snapshot build) into the MANIFEST.MF file.

Let's look at using the exec plugin as a workaround.

Importing Groovy/GMaven/maven projects to Intellij IDEA

When importing a maven pom that uses the gmaven plugins - remember to go into project structure settings and set src/main/groovy as sources and src/test/groovy as test sources.

I'd also like to know why on import of a project that has had mvn install run on it causes Idea to have issues about generated source mismatch etc - mvn clean then a rebuild in Idea will fix this but I can't pin down what is not right.

Technorati Tags:Technorati Tags:

Using continuum to build maven 2 projects that are in mercurial

Given that the pom has a correctly configured scm tag section then it's just a case of finding the browsable file.

Normally mercurial repo's are exposed using hgweb.cgi or hgwebdir.cgi.

Not sure about hgweb - use hgwebdir myself - but - the trick is to grab the raw file version of the tip revision. Once continuum can grab this then it will use the scm tags to get the project.

https://server/hgwebdircontext/project/raw-file/tip/pom.xml

NOTE

When you run hg clone to grab the repository it will always check out the entire repository.

Technorati Tags:Technorati Tags:

Using maven2 scm and release plugins with mercurial/hg

Mercurial - like some other distributed version control systems works such that each developer has a full value repository - there is no real master other than by convention in a team.

To set up your maven project so that the scm configuration points to a developers local repo:

    <scm>
        <connection>scm:hg:file://${basedir}</connection>
        <developerConnection>scm:hg:file://${basedir}</developerConnection>
    </scm>

Spring, Aspects, @Configurable and Compile Time Weaving using maven

Why do most people use Load Time Weaving (LTW)? It requires replacing the javaagent/classloader of your JVM which can lead to all sorts of issues.

Let's take a look at getting Compile Time Weaving (CTW) instead.

This post is using spring 2.5.2, aspectj 1.5.4, java 1.5. (Spring 2.5.4 uses a later version of weaver (3.0 vs. 5.0) - I assume AspectJ 1.6.0 but the aspectj-maven-plugin is also based around 1.5.4 - so for now we'll stick with this combination.)


Deploying jars to third party maven repository via WebDAV

Normally you deploy to a third party repository with a command similar to:

mvn deploy:deploy-file -Dfile=/path/to/file -DrepositoryId=repositoryId
-Durl=wagon:protocol://path/to/repo -DgroupId=groupId -DartifactId=artifactId
-Dversion=version -Dpackaging=packageType

But - to deploy via webdav needs a snapshot wagon.

Technorati Tags:Technorati Tags:

Adding self-signed https certificates to java keystore

There are several reasons you may need to add a self-signed https ssl certificate to your local java keystore.

For me - its so that maven can access DAV shares for repository deployment.

Technorati Tags:Technorati Tags:

spring-ldap and NoClassDefFoundError com.sun.jndi.ldap.ctl.ResponseControlFactory

When using spring-ldap - if you get a NoClassDefFoundError for com.sun.jndi.ldap.ctl.ResponseControlFactory then you need the ldap booster pack (currently 1.0).

Technorati Tags:Technorati Tags:

Spring AOP and maven dependencies (<aop:spring-configured/>)

Or - why does it say my spring context xml is invalid on <aop:spring-configured/>

Syndicate content