Re: Anyone care to advise?

2016-03-05 Thread Robert Scholte

Hi,

I think this can be solved without dirty hacks, but it requires some  
fixing in Maven Core.

When calling -rf you are missing the modules you get from -am.
Maven should add these modules *without* executing them. Now every  
MavenProject needs to have an artifact with a file, either pointing to the  
outputDirectory or to the packaged artifact. Based on this File other  
modules construct their classpath, which is all you need.
I haven't validated this, but I think that a couple of plugins allow you  
to override ${project.build.outputDirectory} or  
${project.build.finalName}. As long as we can use these values (and I  
think we should), we could have MavenProjects as if they were executed  
available in the reactor.


Robert

On Thu, 03 Mar 2016 13:12:05 +0100, Stephen Connolly  
 wrote:



I had an evil idea...

https://github.com/stephenc/reactor-snapshot-maven-plugin

So the idea is to let you do things and resume quicker while doing things
that need the reactor artifacts when you don't want to invoke the full
lifecycle

e.g.

mvn package
com.github.stephenc.maven:reactor-snapshot-maven-plugin:1.0-SNAPSHOT:take

mvn
com.github.stephenc.maven:reactor-snapshot-maven-plugin:1.0-SNAPSHOT:restore
javadoc:jar
com.github.stephenc.maven:reactor-snapshot-maven-plugin:1.0-SNAPSHOT:take

mvn
com.github.stephenc.maven:reactor-snapshot-maven-plugin:1.0-SNAPSHOT:restore
source:jar
com.github.stephenc.maven:reactor-snapshot-maven-plugin:1.0-SNAPSHOT:take

mvn
com.github.stephenc.maven:reactor-snapshot-maven-plugin:1.0-SNAPSHOT:restore
install:install deploy:deploy

mvn
com.github.stephenc.maven:reactor-snapshot-maven-plugin:1.0-SNAPSHOT:restore
site

Now this might ultimately need an extension helper so that things like  
-rf

will work better... but I wanted to try it out first.


The issue I have is persisting and looking up the artifact handlers...  
the

current way is hacky in the extreme and relies on the sisu injection
picking the same order (which may not always be valid due to the  
lifecycle

goals you might specify)


So, anyone care to tell me the "right" way to hack this!


-Stephen



--
Using Opera's mail client: http://www.opera.com/mail/

-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



RE: Anyone care to advise?

2016-03-05 Thread Martin Gainty

MG>quick inline comment prefixed with MG
> Date: Sat, 5 Mar 2016 09:30:36 +0100
> Subject: Re: Anyone care to advise?
> From: mfriedenha...@gmail.com
> To: dev@maven.apache.org
> 
> Hello Stephen,
> 
> sounds a bit like Jenkins' Maven2 job type ;-)
> 
> Regards
> Mirko
> -- 
> Sent from my mobile
> Am 03.03.2016 13:12 schrieb "Stephen Connolly" <
> stephen.alan.conno...@gmail.com>:
> 
> > I had an evil idea...
> >
> > https://github.com/stephenc/reactor-snapshot-maven-plugin
> >
> > So the idea is to let you do things and resume quicker while doing things
> > that need the reactor artifacts when you don't want to invoke the full
> > lifecycle
> >
> > e.g.
> >
> > mvn package
> > com.github.stephenc.maven:reactor-snapshot-maven-plugin:1.0-SNAPSHOT:take
> >
> > mvn
> >
> > com.github.stephenc.maven:reactor-snapshot-maven-plugin:1.0-SNAPSHOT:restore
> > javadoc:jar
> > com.github.stephenc.maven:reactor-snapshot-maven-plugin:1.0-SNAPSHOT:take
> >
> > mvn
> >
> > com.github.stephenc.maven:reactor-snapshot-maven-plugin:1.0-SNAPSHOT:restore
> > source:jar
> > com.github.stephenc.maven:reactor-snapshot-maven-plugin:1.0-SNAPSHOT:take
> >
> > mvn
> >
> > com.github.stephenc.maven:reactor-snapshot-maven-plugin:1.0-SNAPSHOT:restore
> > install:install deploy:deploy
> >
> > mvn
> >
> > com.github.stephenc.maven:reactor-snapshot-maven-plugin:1.0-SNAPSHOT:restore
> > site
> >
> > Now this might ultimately need an extension helper so that things like -rf
> > will work better... but I wanted to try it out first.
MG>thinking custom-lifecycle might work but i dont know your full scope design
MG>if you could provide an example where custom-lifecycle wont work but this 
will
MG>with a working example i am all for it
> >
> >
> > The issue I have is persisting and looking up the artifact handlers... the
> > current way is hacky in the extreme and relies on the sisu injection
> > picking the same order (which may not always be valid due to the lifecycle
> > goals you might specify)
MG>playing the "which classloader is current phase implementing" has bitten me 
a few times
> >
> >
> > So, anyone care to tell me the "right" way to hack this!
> >
> >
> > -Stephen
> >
  

Re: Anyone care to advise?

2016-03-05 Thread Mirko Friedenhagen
Hello Stephen,

sounds a bit like Jenkins' Maven2 job type ;-)

Regards
Mirko
-- 
Sent from my mobile
Am 03.03.2016 13:12 schrieb "Stephen Connolly" <
stephen.alan.conno...@gmail.com>:

> I had an evil idea...
>
> https://github.com/stephenc/reactor-snapshot-maven-plugin
>
> So the idea is to let you do things and resume quicker while doing things
> that need the reactor artifacts when you don't want to invoke the full
> lifecycle
>
> e.g.
>
> mvn package
> com.github.stephenc.maven:reactor-snapshot-maven-plugin:1.0-SNAPSHOT:take
>
> mvn
>
> com.github.stephenc.maven:reactor-snapshot-maven-plugin:1.0-SNAPSHOT:restore
> javadoc:jar
> com.github.stephenc.maven:reactor-snapshot-maven-plugin:1.0-SNAPSHOT:take
>
> mvn
>
> com.github.stephenc.maven:reactor-snapshot-maven-plugin:1.0-SNAPSHOT:restore
> source:jar
> com.github.stephenc.maven:reactor-snapshot-maven-plugin:1.0-SNAPSHOT:take
>
> mvn
>
> com.github.stephenc.maven:reactor-snapshot-maven-plugin:1.0-SNAPSHOT:restore
> install:install deploy:deploy
>
> mvn
>
> com.github.stephenc.maven:reactor-snapshot-maven-plugin:1.0-SNAPSHOT:restore
> site
>
> Now this might ultimately need an extension helper so that things like -rf
> will work better... but I wanted to try it out first.
>
>
> The issue I have is persisting and looking up the artifact handlers... the
> current way is hacky in the extreme and relies on the sisu injection
> picking the same order (which may not always be valid due to the lifecycle
> goals you might specify)
>
>
> So, anyone care to tell me the "right" way to hack this!
>
>
> -Stephen
>