From: Matthias S. <mat...@gm...> - 2006-10-27 12:42:34
|
David, yes I have used Maven. Maven can do what we would like to do with JUnit with just a few lines of XML: - compile the sources - build a junit.jar with the JUnit core - build a src.jar - build a test.jar for the tests - create javadoc - run unit tests (I know there is a plugin for 3.8.1 but I am not sure about 4.x) But the downside is: To use maven, we would have to move the files. So it would be good to move to Suversion before. The outline would have to look like this: junit |-- pom.xml `-- src |-- main | `-- java | `-- org | `-- junit | `-- Assert.java `-- test `-- java `-- org `-- junit `-- AssertionTest.java The pom.xml (Maven's equivalent to build.xml) is IMHO not as readable as a clean build.xml. Here is a short example from the Maven site: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.mycompany.app</groupId> <artifactId>my-app</artifactId> <packaging>jar</packaging> <version>1.0-SNAPSHOT</version> <name>Maven Quick Start Archetype</name> <url>http://maven.apache.org</url> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> <scope>test</scope> </dependency> </dependencies> </project> Another disadvantage is that Maven does not come bundled with every IDE. And he last time I looked at the Maven Eclipse plugin, it was not nearly as good as the Ant support. I agree that in the end we only get the same junit.jar that we got from Ant before. I tend to only use Maven in new projects, but not migrate from Ant to Maven. Any thoughts from anybody else? Matt -------- Original-Nachricht -------- Datum: Tue, 24 Oct 2006 16:33:39 -0400 Von: David Saff <sa...@mi...> An: Matthias Schmidt <mat...@gm...> Betreff: Re: [Junit-devel] Refactoring of ANT build (see patch 1581944) > Matthias, > > Have you used Maven? I've been intrigued in the past, but concerned > that the incremental improvement in build structure wouldn't be worth > the extra dependency. What's your take? > > David Saff > > Matthias Schmidt wrote: > > Thomas, > > > > Then we could move to Maven. Maven does all you suggest automatically > > (more or less ;-)). > > > > But you are right: Files would have to be moved for that. > > > > Regards, > > Matt > > > > worodin schrieb: > > > >> Hey ho list! > >> > >> Is there any opinion regarding the ideas I mentioned in > >> > https://sourceforge.net/tracker/?func=detail&atid=315278&aid=1581944&group_id=15278? > >> > >> What I'm suggesting there is, moving into the direction of a layout, > >> that has been prouven in many open source projects. > >> > >> A.) > >> Arguments for separating sources from generated output (e. g. classes) > >> - much easier to do a clean > >> - no need to to maintain .cvsignore, IDE view filters etc just to have > a > >> nice and clean screen. > >> - fewer messy exclusion filters in ant > >> > >> B.) > >> Arguments for separating test from application sources: > >> - fewer messy exclusion filters in ant > >> - easier separation of sources, even if they are not in a *.test.* > >> package and do not contain the infix *Test* e. g. for javadoc, jar. > >> > >> - Only drawback here: you need to navigate two trees (actually, I don't > >> see this as a drawback, but rather as a visual aid) > >> > >> A.) is easy to achieve with the current CVS layout, but B.) would > >> require moving some things around. In CVS this would result in loosing > >> the change history. Now I'm remembering remotely somebody else > >> suggesting to move to SVN. Doing so, would offer the following: > >> > >> - First, migrate to SVN first. SVN documentation states, that CVS > >> history can be ported too. > >> - Then start B.) SVN versions directories, keeping the history, when > >> moving files. > >> > >> Let me know, what you think of it. > >> > >> > >> Thomas -- Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer |