Re: Maven 2 (was Re: Maven 1.1)

2005-11-16 Thread Leo Simons
I wrote an answer then deleted it. I got lost a little. Seperating concerns:

  -- support for maven2 in gump2
  -- I'm not going to work on it

  -- support for maven2 in gump3
  -- pretty much like we did for maven1 + bootstrap
  -- doing it quickly
  -- not me
  -- doing it properly
  -- been thinking about that too

So...

  -- how to properly support maven2 in gump3

Basically in the gump descriptors all we want to do is

  project name=pluto type=mvn href=http://svn.a.o/r/a/p/x/pom.xml/

and then gump fetches that xml file and merges it into the rest of
the XML. We end up with lots of xml. Now we need

  -- a python function or two to work with that xml (while in DOM form)
  and help transform it into the python object model gump uses

Then the gump engine at some point figures out it needs to boostrap
mvn. The goal here is to use the actual bootstrap process used for
mvn, I believe that involves an svn checkout followed by running a
shell script followed by running a minimal mvn on itself.

project name=mvn-bootstrap
  module name=mvn/
  script name=bootstrap/ !-- .sh or .bat --
  jar name=build/maven2-bootstrap.jar runtime=true/
/project

project name=mvn
  module name=mvn/
  depend name=maven2-bootstrap inherit=all/
  mvn/
  jar name=target/mvn.jar runtime=true/
/project

eg, pretty much as we do for Ant. Next bit is

  -- a python plugin which can call Maven2

Ideally we can run mvn without using its shell scripts and just digest
a command which starts with java, since that makes it easier to get
things like the CLASSPATH right. In this case we don't have a local
installation but one running straight from trunk (just like ant). Now,
if we need some special bits like some java code to replace the repository
management, we would have something like

project name=mvn-gump-java-helper
  module name=gump3/
  depend name=ant inherit=all/
  depend name=mvn-bootstrap inherit=all/
  ant/
  jar name=target/mvn-gump-java-helper.jar/
/project

project name=mvn
 !-- ... --
 depend project=mvn-gump-java-helper runtime=true/
/project

Now, as far as repository management, downloading, dependency resolution,
any of that is concerned, what we want to do in this mvn-gump-java-helper
is simply disable as much of those bits of maven2 as possible. Basically
what we want to end up with is a gump-generated CLASSPATH (in some form)
which maven just accepts as containing all the required dependencies. All
those pom.xml files are still available and we can write bits of glue (in
python) to expose info from them or for them up as much as needed. Eg Gump3
ends up doing something like

  for element in parsed.pom.xml.DOM:
for (origname, replacement) in artifactmap:
  element.replaceall(origname, replacement)
  (...)
  
CLASSPATH=$JAVA_HOME/tools.jar:$MVN_HOME/target/mvn.jar:$GUMP_HOME/target/mvn-gump-java-helper.jar:
  cd pluton/
  java -cp $CLASSPATH org.apache.maven.Maven2.Main jar

I hope all that made sense. Now, moving on to the first implementation
details

  -- how to bootstrap maven2

On Wed, Nov 16, 2005 at 04:45:56PM +1100, Brett Porter wrote:
 Next, to build Maven. We have a bootstrap that runs without any
 dependencies except Java that would produce the installation above -
 but it downloads the Maven dependencies on the way. We could have it
 resolve packaged versions of those by reusing the gump resolver.
 
 Alternatively, something we are doing so it can be packaged on unix is
 checking out the sources rather than relying on packaging, then
 building them, then building m2 (and those packages would later be
 rebuilt again using the new m2). Is that a better alternative to the
 above?

Downloading things from elsewhere is not a problem. The key bit is getting
to a classpath when using maven to build stuff that contains only fresh
built sources and none of the prepackaged bits (just like when you're
bootstrapping GCC -- you download a binary GCC to build GCC, then you throw
the binary away). If there is a procedure to get absolutely everything from
source including all of mavens dependencies and build all of it properly (I
really hope there is one now for maven 2) and dependably, lets use it.

Key bit here is that what gump does for bootstrapping is the same as what
the maven 2 people do for bootstrapping. It sounds like the one you use
yourselves is the first option so lets roll with that.

- LSD


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Maven 1.1

2005-11-16 Thread Martin van den Bemt



Brett Porter wrote:

I don't know of them all, but I believe the following projects are on
the way or considering it:

Cocoon, Pluto, JetSpeed 2, Struts, Excalibur, Geronimo, Directory, Felix


Add MyFaces (they are considering it) to the list (tobago is already maven2). Struts has an attempt 
somewhere in svn (just read that on the myfaces list).


Mvgr,
Martin


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Maven 2

2005-11-16 Thread Stefan Bodewig
On Wed, 16 Nov 2005, Leo Simons [EMAIL PROTECTED] wrote:

   -- support for maven2 in gump2
   -- I'm not going to work on it

I'd offer to do a monkey-see-monkey-do support if it is not too
different from maven 1 support.  In general I agree that gump3 is the
way to go and that we should do it properly.

It depends on how quickly we are going to need it.  As soon as
projects in our tree switch to Maven2 exclusively, we will at least
need that quick-hack version.

Stefan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Maven 2

2005-11-16 Thread Stefan Bodewig
On Wed, 16 Nov 2005, Brett Porter [EMAIL PROTECTED] wrote:

 Because it has an even more online nature (plugins are not
 preinstalled), to use an installed version we'd again need to create
 a minimal local repository including those plugins, then use offline
 mode (-o), and ensure it can't get any internet access just to make
 sure.

One thing that bothers me with Maven 1 from a Gump point of view is
that I don't have any way to override jars that come bundled with
Maven unless projects declare a dependency on them.

A few projects run tests without declaring a dependency on junit at
all, and even if they did, I'm not sure where our jar would be used -
just to compile the tests or also when the test plugin executes them?

From what I read above this is going to become worse with an installed
version of Maven 2.  So yes, any plan that allows us to really use the
HEAD/trunk versions of Maven and all stuff Maven uses is very much
appreciated.

Stefan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]