maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Scholte" <rfscho...@apache.org>
Subject Re: Anyone care to advise?
Date Sat, 05 Mar 2016 14:30:36 GMT
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  
<stephen.alan.connolly@gmail.com> 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-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Mime
View raw message