On 19-Aug-08, at 12:07 AM, Milos Kleint wrote:

On Mon, Aug 18, 2008 at 6:01 PM, Dan Fabulich <[EMAIL PROTECTED]> wrote:
At the suggestion of others I've renamed the "makeMyChanges" goal to
"makeScmChanges".  This clarifies the purpose of the goal a bit more.

What I'd like to do now, if folks are interested, is pursue this problem
along two tracks.

1) release maven-reactor-plugin: begin the process of getting it graduated out of sandbox and officially released so Maven 2.0.x users can begin using
it immediately

2) begin incorporating some of its functionality into the 2.1.x branch: I've
added my own proposal to Brian's proposal here (pasted below):
http://docs.codehaus.org/display/MAVEN/Make+Like+Reactor+Mode

What do people think of this? Can we release maven-reactor-plugin asap even if we intend to incorporate its functionality in the future into the core?

Yes, the 2.1 (or 3.0?) that will get these changes in the core is not
around the corner yet, so I think having the fuctionality now is
beneficial for maven users in general.

+1

I wouldn't try folding it into 3.x until the project builder refactoring is done.



Milos


Proposal:

-----

We'd like to port at least reactor:resume, reactor:make,
reactor:makeDependents into core. I'm thinking it would go something like
this:

New options:

  * -rf --resume-from: Resume reactor from specified project
* -pl --project-list: Build the specified reactor projects instead of all
projects
* -am --also-make: If a project list is specified, also make projects
that the list depends on
* -amd --also-make-dependents: If a project list is specified, also make
projects that depend on projects on the list

Examples:

  * resume: mvn -rf packages/a-package
  * make: mvn -am -pl ui/a-ui,ui/b-ui
* makeDependents: mvn -amd -pl packages/a-package,packages/b- package

At least at first, core would not include the new reactor:makeScmChanges
because that would require maven-core to depend on maven-scm.

-----

-Dan

Dan Fabulich wrote:

FYI maven-reactor-plugin 1.0-SNAPSHOT has a site now:

http://maven.apache.org/plugins/maven-reactor-plugin/

I certainly approve of the idea of rolling at least the "make"
"makeDependents" and "resume" parts of this into core, though there's two
caveats here:

1) I think I'd like to release this plugin sometime earlier than that, perhaps as a mojo.codehaus.org plugin if not as an official Apache Maven plugin. (Though I did already add the Apache license text to all of the
source files...)

There's a lot of people on 2.0.x who will take a while to upgrade to
2.1.x, who can benefit from this plugin today.

I presume the reason nobody's done this until now is that we've thought
that it couldn't/shouldn't be done as a plugin...?

2) It would be a bit weird to roll in "makeMyChanges" into the core.
makeMyChanges queries SCM to find changed files; rolling it into core would require core to depend on maven-scm (which, I think, it doesn't right
now...?) to determine what has changed.

Despite that, I think it's arguably the most useful command in the plugin.
Where would *that* go?

-Dan

Brian E. Fox wrote:

I think this looks pretty sweet and similar to the proposal I wrote last
year (but didn't implement yet):
http://docs.codehaus.org/display/MAVEN/Make+Like+Reactor+Mode

I think that this really belongs in core. Now that trunk has moved to 3.0 and we will have a new 2.1 branch (when we decide to cut it from 2.0.10 or 2.0.9...not sure where the current one came from), this would be perfect to fit in as a new feature. I don't want the new 2.1.0 to grow into a monster so for example we could implement this and release
it, then we could add the parallel download and release as 2.2 etc.



-----Original Message-----
From: Dan Fabulich [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 14, 2008 8:38 PM
To: Maven Users List; Maven Developers List
Subject: New sandbox plugin: maven-reactor-plugin


I've checked in a new plugin to the sandbox called the "Maven Reactor Plugin". You can use it to build a subset of interdependent projects in
a
reactor.  It should be useful in large reactor builds that include
irrelevant stuff you're not working on.

It includes the following goals:

reactor:resume - resume a reactor at a certain point (e.g. when it fails
in the middle)
Example: mvn reactor:resume -Dfrom=bar

reactor:make - build a project X and all of the reactor projects on
which
X depends
Example: mvn reactor:make -Dmake.folders=foo,bar

reactor:makeDependents - build a project X and all of the reactor
projects
that depend on X
Example: mvn reactor:make -Dmake.folders=foo,bar

(e.g. if foo depends on baz and quz depends on bar, :make will build
foo,bar,baz whereas :makeDependents will build foo,bar,quz)

reactor:makeMyChanges - build all reactor projects that you personally have changed (according to SCM) and all reactor projects that depend
on your changes
Example: mvn reactor:makeMyChanges

All of these take an argument -Dmake.printOnly which you can use to see what the plugin would have done without actually doing it. (This is
handy
for debugging and exploration.)

This plugin was easy to write, so I fear that it may duplicate other
work,
or that there may already be some clever command line tool to do this
stuff.

Feedback is appreciated. It seems to kinda-sorta work on my machine.

The sources are here:

https://svn.apache.org/repos/asf/maven/sandbox/trunk/plugins/maven-react
or-plugin

there are some TODOs:

http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-reactor-p
lugin/TODO.txt?view=markup

I've deployed a snapshot:

http://people.apache.org/repo/m2-snapshot-repository/org/apache/maven/pl
ugins/maven-reactor-plugin/

If you want to try it on your machine, copy and paste this POM into a
file (e.g. myfile.xml):

<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>example</groupId>
<artifactId>example</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>example</name>
<dependencies>
  <dependency>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-reactor-plugin</artifactId>
    <version>1.0-SNAPSHOT</version>
    <type>maven-plugin</type>
  </dependency>
</dependencies>
<repositories>
  <repository>
    <id>apache-snapshots</id>
<url>http://people.apache.org/repo/m2-snapshot-repository/</ url>
  </repository>
</repositories>
</project>

Then run "mvn -U -cpu -f myfile.xml dependency:resolve". That should
download the deployed snapshot into your local repository.

Since it's a snapshot, you'll have to run it like this:

mvn org.apache.maven.plugins:maven-reactor-plugin:1.0-SNAPSHOT:make
-Dmake.printOnly -Dmake.folders=foo

Please do that and e-mail me to let me know what breaks, or tell me that

I'm an idiot.  :-)

-Dan


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


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




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




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



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


Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder,  Apache Maven
jason at sonatype dot com
----------------------------------------------------------

Selfish deeds are the shortest path to self destruction.

 -- The Seven Samuari, Akira Kirosawa


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

Reply via email to