the corner office : tech blog

a tech blog, by Colin Pretorius

Maven. Git. Pain.

Man. Untold pain with Maven 3.0.4 and the maven release plugin with git. I haven't touched this stuff in over a year, using 2.something, and perhaps it didn't work properly then, either.

The biggest headache is that I want clean release versions, but I don't want to hard-code servers and paths into my poms. If I ever push the code to a public repo it's just noise, and my home set-up changes often enough, besides.

So, to get mvn release:prepare working with the local git repo, I did the following:

In the pom, I added:

<scm>
    <connection>scm:git:file://.</connection>
</scm>

and in the plugins section:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-release-plugin</artifactId>
    <version>2.3.2</version>
    <configuration>
        <pushChanges>false</pushChanges>
        <localCheckout>true</localCheckout>
    </configuration>
</plugin>

Then because I don't have a distributionManagement element, mvn release:perform falls over. I could fiddle with the deploy goals, but I do have a 'private' (not local) repo where I keep my release builds. The trick is getting the altDeploymentRepository argument passed to the forked maven process:

mvn -B release:perform -Darguments="-DaltDeploymentRepository=id::default::file:///path/to/my/repo/"

(the -B hides the progress output when downloading)

File under: java : {2012.07.28 - 23:35} : Comments (0)

Links 2012.07.28

Git relative pathing broken with release plugin (mvn release:perform borked with git and cygwin)

File under: java : {2012.07.28 - 18:04} : Comments (0)

Connection pools

Tinkering on a few been-on-the-TODO-list-for-years things on the blog app, led me to the Tomcat JDBC Connection Pool and BoneCP. I don't need crazy performance, I just want to move away from JNDI and find something easier to set up in code than DBCP. So I'm going to try the Tomcat pool, and see how it goes.

File under: java : {2012.07.26 - 22:00} : Comments (0)

Links 2012.07.25

  • TechCrunch: So, That’s It For Thunderbird (official). Not really, since they're still maintaining and doing security patches. Pity but makes sense. Usual outcry: how dare you stop spending effort on a product I use but have never paid for or contributed code to. Pfeh.

{2012.07.25 - 10:30} : Comments (0)

meta

about
main blog

Categories

eclipse
java
linux
programming

RSS Feeds

rssfeed all posts
rssfeed all comments

Archives

2013.05
2013.04
2013.03
2013.02
2013.01
2012.12
2012.11
2012.10
2012.08
2012.07
2012.06
2012.05
2012.04
2012.03
2012.02
2012.01
2011.12
2011.11
2011.10
2011.09
2011.08
2011.07
2011.06
2011.05
2011.04
2011.03
2011.02
2011.01
2010.12
2010.11
2010.10
2010.09
2010.08
2010.07
2010.06
2010.05
2010.04
2010.03
2010.02
2010.01
2009.12
2009.11
2009.10
2009.09
2009.08
2009.07
2009.06
2009.05
2009.02
2009.01
2008.12
2008.11
2008.08
2008.07
2008.06
2008.05
2008.04
2008.03
2008.02
2008.01
2007.12
2007.11
2007.10
2007.09
2007.08
2007.07

© Colin Pretorius