58 Calendar
All | General | Java | ONess | Maven
20060130 Monday January 30, 2006

maven-proxy 0.2 released

After a long time without a release of maven-proxy, I decided to take care of making this one.

It includes improvements to the maven 2 support and now it comes also with a war file to deploy in your appserver.

You can get it from http://maven-proxy.codehaus.org/Downloads. Be sure to read the installation and configuration instructions because it's not trivial.

This will be probably the last release of maven-proxy as its functionality will be included in the next Maven Repository Manager.

Jan 30 2006, 02:00:00 PM CET Permalink

20060106 Friday January 06, 2006

Maven 2 vs. Ant + Ivy

This is an updated entry about using maven vs. using ant+ivy.

All my previous comments are still valid, maven is not just the automatic dependency download or the transitive dependencies, but let's focus in these two aspects.

Some facts:

The main problems we have at maven is missing or incorrect metadata, so if there's any Ivy user reading this I'd like to know what's the point of using it when only a few projects have metadata. And while in maven is a collective open effort, seems that it's not like that with Ivy.

If I'd like to use ant for my build (never again if I can avoid it, specially since we have the antrun plugin), I'd choose the m2 ant tasks, that as a side effect allows you to also run maven, providing a good migration path.

Jan 06 2006, 04:07:47 PM CET Permalink

1 Comment
20060105 Thursday January 05, 2006

Using mirrors of maven2 repositories

I've added to the docs the list of available maven2 mirrors, just use one of the following mirror entries in your settings.xml

<settings>

<mirrors>
<mirror>
<id>dotsrc.org</id>
<url>http://mirrors.dotsrc.org/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror>
<mirror>
<id>ggi-project.org</id>
<url>http://ftp.ggi-project.org/pub/packages/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror>
<mirror>
<id>sunsite.dk</id>
<url>http://mirrors.sunsite.dk/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror>
<mirror>
<id>planetmirror.com</id>
<url>http://public.planetmirror.com/pub/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror>
<mirror>
<id>lsu.edu</id>
<url>http://ibiblio.lsu.edu/main/pub/packages/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror>
<mirror>
<id>ibiblio.net</id>
<url>http://www.ibiblio.net/pub/packages/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>

</settings>

More information in the guide to mirror settings.

Jan 05 2006, 06:58:02 PM CET Permalink

Add a Comment
20051229 Thursday December 29, 2005

Equinox 1.5 released with Maven 2 support

Matt Raible has released Equinox 1.5, where he includes Maven 2 support and also ant support using Maven 2 Ant Tasks. Matt was very active in the mailing lists and jira helping to improve the metadata in the repository.

Dec 29 2005, 01:48:48 PM CET Permalink

4 Comments
20051228 Wednesday December 28, 2005

Ruby support on Maven 2

Eric Redmond has developed the Ruby support for developing Maven 2 mojos.

It's great to see how in few weeks since 2.0 was released a lot of contributions have been made for all kind of tools. For instance there's already support for C, C++ and C#. Do you want to contribute some COBOL support? ;)

Dec 28 2005, 02:15:09 PM CET Permalink

2 Comments

Spring 2.0 M1 released

Spring 2.0 M1 was released last week. As a maven related news, it will make life easier with transitive dependencies because the orm support was splitted in different jars spring-jdo, spring-hibernate2, spring-hibernate3, spring-toplink, spring-ojb.

Jars and poms are already available at ibiblio, so you can start using it right now in your maven 1 / maven 2 projects

Announcement by Juergen Hoeller:

Dear Spring community,

I am pleased to announce that Spring 2.0 M1 has just been released. 2.0 M1
is the first milestone of the next generation of Spring: introducing XML
schema based bean definitions, sophisticated AspectJ support, task executor
abstraction, asynchronous JMS facilities, portlet support, etc.

The main sample application in this release is JPetStore, which already
illustrates some basic usage of schema-based bean definitions and aspects
expressed using AspectJ pointcut language. 2.0 M2 will include further
sample usages and improved documentation of the new configuration style.

Spring 2.0 remains fully backwards-compatible with Spring 1.2. Both the DTD
style and the schema style are supported for XML bean definitions. No
incompatible API changes have been introduced (other than removing
deprecated methods). Furthermore, Spring 2.0 still runs on JDK 1.3+ and J2EE
1.2+.

Note that Spring has been repackaged: spring.jar contains the entire core
plus some small extensions; larger extensions such as support for specific
ORMs have been factored out into separate jar files (spring-hibernate2.jar,
spring-hibernate3.jar, spring-toplink.jar, etc). See the readme for details.

Cheers - and Merry Christmas to everybody celebrating Christmas :-)

Juergen

Dec 28 2005, 01:55:23 PM CET Permalink

2 Comments
20051205 Monday December 05, 2005

ApacheCON San Diego

Next weekend I'll be in San Diego for ApacheCON hackathon and conference. If you are there don't miss the two tutorials and one session about Maven! And say hello if you see me ;)

Dec 05 2005, 09:19:17 AM CET Permalink

1 Comment
20051201 Thursday December 01, 2005

Maven repository, adding sources

Now as part of the upload of your jar to the maven repository at ibiblio you can include the sources, making them available to all your users, helping you to find and solve bugs, hopefully ;).

For instance, to generate the eclipse project for a maven 2 project with the sources attached, you can run

mvn eclipse:eclipse -Declipse.downloadSources=true

Read the instructions to make an upload bundle, now with sources!

Dec 01 2005, 01:12:57 AM CET Permalink

2 Comments
20051129 Tuesday November 29, 2005

Using transitive dependecies the right way

So we have this cool feature called transitive dependencies in maven 2. For those that don't know yet that allows me to say:

But then something happens with some of the jars:

To sum up this is my advice: the days of downloading jars and adding them to a folder ended time ago, don't be worried about creating more smaller jars that explicitly define their dependencies with no doubt, meaning that you'll always know the requirements of a piece of software. Avoid big jars that depend on everything.

(Thanks to all the people that contributed to this entry teaching me the wonders of the english cosswords. You're more than you think ;) )

Nov 29 2005, 09:58:29 PM CET Permalink

6 Comments
20050921 Wednesday September 21, 2005

Building Spring with maven2

Probably you already noticed that maven2 beta-1 is out, and I'm quite sure that you are wondering if it's ready to be used in a real world. Well, you can try to build the Spring Framework with it as a example of a not too simple application, with a lot of dependencies.

What do you need:

Split the sources in the different spring subprojects, because they come in the same directory. You can use this ant target, adding it to the end of spring build.xml file and run "ant splitsources", which will create a "m2" folder with a subfolder for each subproject.
    <target name="splitsources" description="Split the sources in subprojects">

        <copy todir="m2/all/src/main/java">
            <fileset dir="${src.dir}"/>
        </copy>

        <copy todir="m2/all/src/main/java">
            <fileset dir="tiger/src"/>
        </copy>

        <copy todir="m2/all/src/test/java">
            <fileset dir="${test.dir}"/>
        </copy>

        <copy todir="m2/all/src/test/java">
            <fileset dir="tiger/test"/>
        </copy>

        <copy todir="m2/spring-core/src/main/java">
            <fileset dir="m2/all/src/main/java">
                <include name="org/springframework/core/**"/>
                <include name="org/springframework/util/**"/>
            </fileset>
        </copy>

        <copy todir="m2/spring-beans/src/main/java">
            <fileset dir="m2/all/src/main/java">
                <include name="org/springframework/beans/**"/>
            </fileset>
        </copy>

        <copy todir="m2/spring-aop/src/main/java">
            <fileset dir="m2/all/src/main/java">
                <include name="org/springframework/aop/**"/>
                <include name="org/springframework/metadata/**"/>
            </fileset>
        </copy>

        <copy todir="m2/spring-context/src/main/java">
            <fileset dir="m2/all/src/main/java">
                <include name="org/springframework/context/**"/>
                <include name="org/springframework/jndi/**"/>
                <include name="org/springframework/ui/**"/>
                <include name="org/springframework/validation/**"/>
            </fileset>
        </copy>

        <copy todir="m2/spring-dao/src/main/java">
            <fileset dir="m2/all/src/main/java">
                <include name="org/springframework/dao/**"/>
                <include name="org/springframework/transaction/**"/>
            </fileset>
        </copy>

        <copy todir="m2/spring-jdbc/src/main/java">
            <fileset dir="m2/all/src/main/java">
                <include name="org/springframework/jdbc/**"/>
            </fileset>
        </copy>

        <copy todir="m2/spring-support/src/main/java">
            <fileset dir="m2/all/src/main/java">
                <include name="org/springframework/cache/**"/>
                <include name="org/springframework/jca/**"/>
                <include name="org/springframework/jmx/**"/>
                <include name="org/springframework/mail/**"/>
                <include name="org/springframework/scheduling/**"/>
            </fileset>
        </copy>

        <copy todir="m2/spring-web/src/main/java">
            <fileset dir="m2/all/src/main/java">
                <include name="org/springframework/web/**"/>
                <exclude name="org/springframework/web/servlet/**"/>
            </fileset>
        </copy>

        <copy todir="m2/spring-webmvc/src/main/java">
            <fileset dir="m2/all/src/main/java">
                <include name="META-INF/*.tld"/>
                <include name="org/springframework/web/servlet/**"/>
            </fileset>
        </copy>

        <copy todir="m2/spring-remoting/src/main/java">
            <fileset dir="m2/all/src/main/java">
                <include name="org/springframework/ejb/**"/>
                <include name="org/springframework/jms/**"/>
                <include name="org/springframework/remoting/**"/>
            </fileset>
        </copy>

        <copy todir="m2/spring-orm/src/main/java">
            <fileset dir="m2/all/src/main/java">
                <include name="org/springframework/orm/**"/>
                <exclude name="org/springframework/orm/hibernate/**"/>
                <exclude name="org/springframework/orm/hibernate3/**"/>
            </fileset>
        </copy>

        <copy todir="m2/spring-hibernate/src/main/java">
            <fileset dir="m2/all/src/main/java">
                <include name="org/springframework/orm/hibernate/**"/>
                <include name="org/springframework/orm/hibernate3/**"/>
            </fileset>
        </copy>

        <copy todir="m2/spring-mock/src/main/java">
            <fileset dir="${mock.dir}"/>
        </copy>

        <copy todir="m2/spring-test/src/test/java">
            <fileset dir="m2/all/src/test/java"/>
        </copy>

    </target>

Download the poms and uncompress them in the directory you uncompressed spring. Go to the m2 directory and run any m2 goal, like "m2 install", that will copy to your local repo all the spring jars (remember to remove them so the official ones get downloaded from ibiblio next time you use maven2 for any other purpose).

You can take a look at how simple are the poms now, for instance the spring-hibernate project, that needs a lot of jars in the classpath to run is as simple as:

<project>
<parent>
<artifactId>spring-parent</artifactId>
<groupId>springframework</groupId>
<version>1.2.4</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>spring-hibernate</artifactId>
<version>1.2.4</version>
<dependencies>
<dependency>
<groupId>springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>1.2.4</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-annotations</artifactId>
<version>3.0beta2</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>3.0.5</version>
</dependency>
<dependency>
<groupId>net.sf.hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>2.1.8</version>
</dependency>
</dependencies>
</project>

You'll notice that tests are not running, the reason is that spring test sources can't be splitted in subprojects because they don't follow the modular desing and have circular dependencies, eg. a test class in spring-core uses a class in spring-beans whenspring-beans depends in spring-core. I'll post an entry about this soon.

Sep 21 2005, 04:46:38 AM CEST Permalink

2 Comments