You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Florian Kirchmeir (JIRA)" <ji...@codehaus.org> on 2011/07/01 11:18:43 UTC

[jira] Issue Comment Edited: (MNG-4195) mvn clean install site doesn't work on multi-modules projects

    [ https://jira.codehaus.org/browse/MNG-4195?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=272012#comment-272012 ] 

Florian Kirchmeir edited comment on MNG-4195 at 7/1/11 4:18 AM:
----------------------------------------------------------------

I'm having the same issue with Maven 3.0.3.
In our case, the build fails because some of the sub-modules don't compile properly without doing a clean before.
In my opinion, the execution order suggested above is not the (only) correct way, and is not entriely in line with the way maven usually works. 
I would expect the following execution order:

Clean ParentModule
Install ParentModule
Site ParentModule
Clean Module1
Install Module1
Site Module1
Clean Module2
Install Module2
Site Module2

The actual problem is that maven tries to run "site" (and implicitly "compile") on modules 1 and 2 without having done a "clean" before, which is clearly not what it was instructed to do.

      was (Author: kflorian):
    I'm having the same issue with Maven 3.0.3.
In our case, the build fails because some of the sub-modules don't compile properly without doing a clean before.
In my opinion, the execution order suggested above is not the (only) correct way, and is not entriely in line with the way maven usually work. I would expect the following execution order:
Clean ParentModule
Install ParentModule
Site ParentModule
Clean Module1
Install Module1
Site Module1
Clean Module2
Install Module2
Site Module2

The actual problem is that maven tries to run "site" (and implicitly "compile") on modules 1 and 2 without having done a "clean" before, which is clearly not what it was instructed to do.
  
> mvn clean install site doesn't work on multi-modules projects
> -------------------------------------------------------------
>
>                 Key: MNG-4195
>                 URL: https://jira.codehaus.org/browse/MNG-4195
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Artifacts and Repositories
>    Affects Versions: 2.2.0
>            Reporter: Tiago Bruno Pires Gomes
>             Fix For: Issues to be reviewed for 3.x
>
>         Attachments: maven.diff, mng-2979-testcase.tar.gz
>
>
> I open a new issue because the MNG-2979 is "closed and fixed" but the issue remains with the 2.2.0 (http://jira.codehaus.org/browse/MNG-2979). I reattached the same testcase archive.
> For the recall, the issue is quite simple : on the multi-modules projects, the execution of mvn clean install site fails.
> Our project has this components : a ParentModule, a Module1 and a Module2 which depends on Module1 jar file. 
> According to the backtrace, the execution of maven follows this steps :
> Clean the ParentProject
> Install the ParentProject
> "Site" the ParentProject
> and site want to compile the entire project so it compiles the Module and the Module2. The Module2 needs the jar of Module1 to compile so the build fails.
> In my opinion, the maven core should run successively clean, install and site on the entire project like :
> Clean ParentModule
> Clean Module1
> Clean Module2
> Install ParentModule
> Install Module1
> Install Module2
> Site ParentModule
> Site Module1
> Site Module2
> So, I attached a maven.diff file too, which makes this succession.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira