You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Niall Pemberton (JIRA)" <ji...@codehaus.org> on 2009/10/22 18:07:26 UTC

[jira] Created: (MNG-4399) Rendering the site produces a Fatal error message if the parent pom isn't in the parent directory

Rendering the site produces a Fatal error message if the parent pom isn't in the parent directory
-------------------------------------------------------------------------------------------------

                 Key: MNG-4399
                 URL: http://jira.codehaus.org/browse/MNG-4399
             Project: Maven 2
          Issue Type: Bug
          Components: Artifacts and Repositories
    Affects Versions: 3.0-alpha-3
            Reporter: Niall Pemberton
            Priority: Minor
         Attachments: test-project.zip, warn-if-parent-pom-notfound.patch

Apache Commons's parent pom[1] used by the 30+ commons components[2] is not in the parent directory. With maven 2.2.1 this just produces an [INFO] message saying "Unable to load parent project from a relative path". With maven 3 (built today from subversion) there is now also a [FATAL] message in the output (the build doesn't fail - but seeing [FATAL] in the output doesn't look good):

    * [INFO] --- maven-site-plugin:2.0.1:site (default-site) @ module-a ---
    * [INFO] Unable to load parent project from a relative path: 1 problem was encountered while building the effective model
    * [FATAL] Non-readable POM C:\svn\maven-test-proj\pom.xml: C:\svn\maven-test-proj\pom.xml (The system cannot find the file specified) @ C:\svn\maven-test-proj\pom.xml for project  at C:\svn\maven-test-proj\pom.xml

I'm attaching a test project which demostrates this - need to first run "mvn install" on the parent-pom project and then "mvn site" on the module-a project to see the above output

Also attaching a patch which catches FileNotFoundException and outputs a [WARNING] message instead of [FATAL] - not sure if this is the best solution, but in this circumstance its much better than seeing [FATAL} - even if the build doesn't fail.


[1] http://svn.apache.org/repos/asf/commons/proper/commons-parent/
[2] http://svn.apache.org/repos/asf/commons/proper/

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MSITE-431) Rendering the site produces a Fatal error message if the parent pom isn't in the parent directory

Posted by "Niall Pemberton (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSITE-431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=195733#action_195733 ] 

Niall Pemberton commented on MSITE-431:
---------------------------------------

I understood that, but misleading logs saying that something is [FATAL] because the parent pom doesn't live in the parent directory isn't good IMO. As you can see from my patch I was just hoping the log level could be taken down - my perference was [WARN] but even [ERROR] would be better.

The other thing is this doesn't happen in maven 2.x - you just get the nice [INFO] message and I thought the idea waa 3.x should improve on 2.x - not go the other way - better error reporting rather than worse.

I'm sure theres a better solution that changing the log level, but I don't know my way around maven well enough.

> Rendering the site produces a Fatal error message if the parent pom isn't in the parent directory
> -------------------------------------------------------------------------------------------------
>
>                 Key: MSITE-431
>                 URL: http://jira.codehaus.org/browse/MSITE-431
>             Project: Maven 2.x Site Plugin
>          Issue Type: Improvement
>    Affects Versions: 2.0.1
>            Reporter: Niall Pemberton
>            Priority: Minor
>         Attachments: test-project.zip, warn-if-parent-pom-notfound.patch
>
>
> Apache Commons's parent pom[1] used by the 30+ commons components[2] is not in the parent directory. With maven 2.2.1 this just produces an [INFO] message saying "Unable to load parent project from a relative path". With maven 3 (built today from subversion) there is now also a [FATAL] message in the output (the build doesn't fail - but seeing [FATAL] in the output doesn't look good):
>     * [INFO] --- maven-site-plugin:2.0.1:site (default-site) @ module-a ---
>     * [INFO] Unable to load parent project from a relative path: 1 problem was encountered while building the effective model
>     * [FATAL] Non-readable POM C:\svn\maven-test-proj\pom.xml: C:\svn\maven-test-proj\pom.xml (The system cannot find the file specified) @ C:\svn\maven-test-proj\pom.xml for project  at C:\svn\maven-test-proj\pom.xml
> I'm attaching a test project which demostrates this - need to first run "mvn install" on the parent-pom project and then "mvn site" on the module-a project to see the above output
> Also attaching a patch which catches FileNotFoundException and outputs a [WARNING] message instead of [FATAL] - not sure if this is the best solution, but in this circumstance its much better than seeing [FATAL} - even if the build doesn't fail.
> [1] http://svn.apache.org/repos/asf/commons/proper/commons-parent/
> [2] http://svn.apache.org/repos/asf/commons/proper/

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MSITE-431) Rendering the site produces a Fatal error message if the parent pom isn't in the parent directory

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSITE-431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=195916#action_195916 ] 

Benjamin Bentmann commented on MSITE-431:
-----------------------------------------

Correct Dennis.

> Rendering the site produces a Fatal error message if the parent pom isn't in the parent directory
> -------------------------------------------------------------------------------------------------
>
>                 Key: MSITE-431
>                 URL: http://jira.codehaus.org/browse/MSITE-431
>             Project: Maven 2.x Site Plugin
>          Issue Type: Improvement
>    Affects Versions: 2.0.1
>            Reporter: Niall Pemberton
>            Priority: Minor
>         Attachments: test-project.zip, warn-if-parent-pom-notfound.patch
>
>
> Apache Commons's parent pom[1] used by the 30+ commons components[2] is not in the parent directory. With maven 2.2.1 this just produces an [INFO] message saying "Unable to load parent project from a relative path". With maven 3 (built today from subversion) there is now also a [FATAL] message in the output (the build doesn't fail - but seeing [FATAL] in the output doesn't look good):
>     * [INFO] --- maven-site-plugin:2.0.1:site (default-site) @ module-a ---
>     * [INFO] Unable to load parent project from a relative path: 1 problem was encountered while building the effective model
>     * [FATAL] Non-readable POM C:\svn\maven-test-proj\pom.xml: C:\svn\maven-test-proj\pom.xml (The system cannot find the file specified) @ C:\svn\maven-test-proj\pom.xml for project  at C:\svn\maven-test-proj\pom.xml
> I'm attaching a test project which demostrates this - need to first run "mvn install" on the parent-pom project and then "mvn site" on the module-a project to see the above output
> Also attaching a patch which catches FileNotFoundException and outputs a [WARNING] message instead of [FATAL] - not sure if this is the best solution, but in this circumstance its much better than seeing [FATAL} - even if the build doesn't fail.
> [1] http://svn.apache.org/repos/asf/commons/proper/commons-parent/
> [2] http://svn.apache.org/repos/asf/commons/proper/

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MSITE-431) Rendering the site produces a Fatal error message if the parent pom isn't in the parent directory

Posted by "Robert Scholte (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MSITE-431?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Scholte closed MSITE-431.
--------------------------------

    Resolution: Fixed

I can't trace in which version this is solved, but it should be fixed by now.
                
> Rendering the site produces a Fatal error message if the parent pom isn't in the parent directory
> -------------------------------------------------------------------------------------------------
>
>                 Key: MSITE-431
>                 URL: https://jira.codehaus.org/browse/MSITE-431
>             Project: Maven 2.x and 3.x Site Plugin
>          Issue Type: Improvement
>          Components: inheritance
>    Affects Versions: 2.0.1
>            Reporter: Niall Pemberton
>            Priority: Minor
>         Attachments: test-project.zip, warn-if-parent-pom-notfound.patch
>
>
> Apache Commons's parent pom[1] used by the 30+ commons components[2] is not in the parent directory. With maven 2.2.1 this just produces an [INFO] message saying "Unable to load parent project from a relative path". With maven 3 (built today from subversion) there is now also a [FATAL] message in the output (the build doesn't fail - but seeing [FATAL] in the output doesn't look good):
>     * [INFO] --- maven-site-plugin:2.0.1:site (default-site) @ module-a ---
>     * [INFO] Unable to load parent project from a relative path: 1 problem was encountered while building the effective model
>     * [FATAL] Non-readable POM C:\svn\maven-test-proj\pom.xml: C:\svn\maven-test-proj\pom.xml (The system cannot find the file specified) @ C:\svn\maven-test-proj\pom.xml for project  at C:\svn\maven-test-proj\pom.xml
> I'm attaching a test project which demostrates this - need to first run "mvn install" on the parent-pom project and then "mvn site" on the module-a project to see the above output
> Also attaching a patch which catches FileNotFoundException and outputs a [WARNING] message instead of [FATAL] - not sure if this is the best solution, but in this circumstance its much better than seeing [FATAL} - even if the build doesn't fail.
> [1] http://svn.apache.org/repos/asf/commons/proper/commons-parent/
> [2] http://svn.apache.org/repos/asf/commons/proper/

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MSITE-431) Rendering the site produces a Fatal error message if the parent pom isn't in the parent directory

Posted by "Dennis Lundberg (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSITE-431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=195914#action_195914 ] 

Dennis Lundberg commented on MSITE-431:
---------------------------------------

Let me see if I understand this correctly.

"[FATAL] ..." is the message of the ProjectBuildingException that is thrown by DefaultModelBuilder

SiteTool simply outputs this message as part of its exception handling, that looks like this
{code}
catch ( ProjectBuildingException e )
{
     getLogger().info( "Unable to load parent project from a relative path: " + e.getMessage() );
 }
{code}
making it look like there are two logging statements, when there is in fact only one.

SiteTool is not handling errors correctly, which is the reason why the catch block above is being executed.

Benjamin's commit in r829037 fixes this bad behavior in SiteTool, making sure that the logging message "Unable to load parent project from a relative path" isn't shown any more for this case.

> Rendering the site produces a Fatal error message if the parent pom isn't in the parent directory
> -------------------------------------------------------------------------------------------------
>
>                 Key: MSITE-431
>                 URL: http://jira.codehaus.org/browse/MSITE-431
>             Project: Maven 2.x Site Plugin
>          Issue Type: Improvement
>    Affects Versions: 2.0.1
>            Reporter: Niall Pemberton
>            Priority: Minor
>         Attachments: test-project.zip, warn-if-parent-pom-notfound.patch
>
>
> Apache Commons's parent pom[1] used by the 30+ commons components[2] is not in the parent directory. With maven 2.2.1 this just produces an [INFO] message saying "Unable to load parent project from a relative path". With maven 3 (built today from subversion) there is now also a [FATAL] message in the output (the build doesn't fail - but seeing [FATAL] in the output doesn't look good):
>     * [INFO] --- maven-site-plugin:2.0.1:site (default-site) @ module-a ---
>     * [INFO] Unable to load parent project from a relative path: 1 problem was encountered while building the effective model
>     * [FATAL] Non-readable POM C:\svn\maven-test-proj\pom.xml: C:\svn\maven-test-proj\pom.xml (The system cannot find the file specified) @ C:\svn\maven-test-proj\pom.xml for project  at C:\svn\maven-test-proj\pom.xml
> I'm attaching a test project which demostrates this - need to first run "mvn install" on the parent-pom project and then "mvn site" on the module-a project to see the above output
> Also attaching a patch which catches FileNotFoundException and outputs a [WARNING] message instead of [FATAL] - not sure if this is the best solution, but in this circumstance its much better than seeing [FATAL} - even if the build doesn't fail.
> [1] http://svn.apache.org/repos/asf/commons/proper/commons-parent/
> [2] http://svn.apache.org/repos/asf/commons/proper/

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MSITE-431) Rendering the site produces a Fatal error message if the parent pom isn't in the parent directory

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSITE-431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=195734#action_195734 ] 

Benjamin Bentmann commented on MSITE-431:
-----------------------------------------

As I tried to explain, the logs have to be fixed in the code that produces them, and that is the Site Plugin.

> Rendering the site produces a Fatal error message if the parent pom isn't in the parent directory
> -------------------------------------------------------------------------------------------------
>
>                 Key: MSITE-431
>                 URL: http://jira.codehaus.org/browse/MSITE-431
>             Project: Maven 2.x Site Plugin
>          Issue Type: Improvement
>    Affects Versions: 2.0.1
>            Reporter: Niall Pemberton
>            Priority: Minor
>         Attachments: test-project.zip, warn-if-parent-pom-notfound.patch
>
>
> Apache Commons's parent pom[1] used by the 30+ commons components[2] is not in the parent directory. With maven 2.2.1 this just produces an [INFO] message saying "Unable to load parent project from a relative path". With maven 3 (built today from subversion) there is now also a [FATAL] message in the output (the build doesn't fail - but seeing [FATAL] in the output doesn't look good):
>     * [INFO] --- maven-site-plugin:2.0.1:site (default-site) @ module-a ---
>     * [INFO] Unable to load parent project from a relative path: 1 problem was encountered while building the effective model
>     * [FATAL] Non-readable POM C:\svn\maven-test-proj\pom.xml: C:\svn\maven-test-proj\pom.xml (The system cannot find the file specified) @ C:\svn\maven-test-proj\pom.xml for project  at C:\svn\maven-test-proj\pom.xml
> I'm attaching a test project which demostrates this - need to first run "mvn install" on the parent-pom project and then "mvn site" on the module-a project to see the above output
> Also attaching a patch which catches FileNotFoundException and outputs a [WARNING] message instead of [FATAL] - not sure if this is the best solution, but in this circumstance its much better than seeing [FATAL} - even if the build doesn't fail.
> [1] http://svn.apache.org/repos/asf/commons/proper/commons-parent/
> [2] http://svn.apache.org/repos/asf/commons/proper/

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MSITE-431) Rendering the site produces a Fatal error message if the parent pom isn't in the parent directory

Posted by "Niall Pemberton (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSITE-431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=195749#action_195749 ] 

Niall Pemberton commented on MSITE-431:
---------------------------------------

OK well I'm not understanding your explanation then - even re-reading it I'm not really sure what your point is. I see
  * The site plugin producing logging an [INFO] message
  * The DefaultModelBuilder adding a [FATAL] error to the problems object

I tested my patch and and changing the level of the error added to the problems object in DefaultModelBuilder had the desired results. As I said before - I accept I don't know maven and probably theres a better solution. I would have expected though that the site plugin would continue to work just as well in 3.x as it did in 2.x and the implication is that if you fix it in the site plugin then users will have to upgrade the site plugin when moving the maven 3.x to resolve this.

Anyway I guess I'm just rehashing and going nowhere. Sorry for the noise its probably my lack of knowledge

> Rendering the site produces a Fatal error message if the parent pom isn't in the parent directory
> -------------------------------------------------------------------------------------------------
>
>                 Key: MSITE-431
>                 URL: http://jira.codehaus.org/browse/MSITE-431
>             Project: Maven 2.x Site Plugin
>          Issue Type: Improvement
>    Affects Versions: 2.0.1
>            Reporter: Niall Pemberton
>            Priority: Minor
>         Attachments: test-project.zip, warn-if-parent-pom-notfound.patch
>
>
> Apache Commons's parent pom[1] used by the 30+ commons components[2] is not in the parent directory. With maven 2.2.1 this just produces an [INFO] message saying "Unable to load parent project from a relative path". With maven 3 (built today from subversion) there is now also a [FATAL] message in the output (the build doesn't fail - but seeing [FATAL] in the output doesn't look good):
>     * [INFO] --- maven-site-plugin:2.0.1:site (default-site) @ module-a ---
>     * [INFO] Unable to load parent project from a relative path: 1 problem was encountered while building the effective model
>     * [FATAL] Non-readable POM C:\svn\maven-test-proj\pom.xml: C:\svn\maven-test-proj\pom.xml (The system cannot find the file specified) @ C:\svn\maven-test-proj\pom.xml for project  at C:\svn\maven-test-proj\pom.xml
> I'm attaching a test project which demostrates this - need to first run "mvn install" on the parent-pom project and then "mvn site" on the module-a project to see the above output
> Also attaching a patch which catches FileNotFoundException and outputs a [WARNING] message instead of [FATAL] - not sure if this is the best solution, but in this circumstance its much better than seeing [FATAL} - even if the build doesn't fail.
> [1] http://svn.apache.org/repos/asf/commons/proper/commons-parent/
> [2] http://svn.apache.org/repos/asf/commons/proper/

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MSITE-431) Rendering the site produces a Fatal error message if the parent pom isn't in the parent directory

Posted by "Dennis Lundberg (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSITE-431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=195907#action_195907 ] 

Dennis Lundberg commented on MSITE-431:
---------------------------------------

Benjamin, I agree with Niall. How can this be an issue with the Site Plugin? It is DefaultModelBuilder that is logging a fatal error - not the Site Plugin.

> Rendering the site produces a Fatal error message if the parent pom isn't in the parent directory
> -------------------------------------------------------------------------------------------------
>
>                 Key: MSITE-431
>                 URL: http://jira.codehaus.org/browse/MSITE-431
>             Project: Maven 2.x Site Plugin
>          Issue Type: Improvement
>    Affects Versions: 2.0.1
>            Reporter: Niall Pemberton
>            Priority: Minor
>         Attachments: test-project.zip, warn-if-parent-pom-notfound.patch
>
>
> Apache Commons's parent pom[1] used by the 30+ commons components[2] is not in the parent directory. With maven 2.2.1 this just produces an [INFO] message saying "Unable to load parent project from a relative path". With maven 3 (built today from subversion) there is now also a [FATAL] message in the output (the build doesn't fail - but seeing [FATAL] in the output doesn't look good):
>     * [INFO] --- maven-site-plugin:2.0.1:site (default-site) @ module-a ---
>     * [INFO] Unable to load parent project from a relative path: 1 problem was encountered while building the effective model
>     * [FATAL] Non-readable POM C:\svn\maven-test-proj\pom.xml: C:\svn\maven-test-proj\pom.xml (The system cannot find the file specified) @ C:\svn\maven-test-proj\pom.xml for project  at C:\svn\maven-test-proj\pom.xml
> I'm attaching a test project which demostrates this - need to first run "mvn install" on the parent-pom project and then "mvn site" on the module-a project to see the above output
> Also attaching a patch which catches FileNotFoundException and outputs a [WARNING] message instead of [FATAL] - not sure if this is the best solution, but in this circumstance its much better than seeing [FATAL} - even if the build doesn't fail.
> [1] http://svn.apache.org/repos/asf/commons/proper/commons-parent/
> [2] http://svn.apache.org/repos/asf/commons/proper/

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MSITE-431) Rendering the site produces a Fatal error message if the parent pom isn't in the parent directory

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSITE-431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=195909#action_195909 ] 

Benjamin Bentmann commented on MSITE-431:
-----------------------------------------

Dennis, I probably should have made it more clean, but the "[FATAL]" that shows up in the log is part of the exception message that describes all the problems in the model that led to the exception, it's *not* produced by any logger call in Maven 3.

BTW, you might want to check r829037.

> Rendering the site produces a Fatal error message if the parent pom isn't in the parent directory
> -------------------------------------------------------------------------------------------------
>
>                 Key: MSITE-431
>                 URL: http://jira.codehaus.org/browse/MSITE-431
>             Project: Maven 2.x Site Plugin
>          Issue Type: Improvement
>    Affects Versions: 2.0.1
>            Reporter: Niall Pemberton
>            Priority: Minor
>         Attachments: test-project.zip, warn-if-parent-pom-notfound.patch
>
>
> Apache Commons's parent pom[1] used by the 30+ commons components[2] is not in the parent directory. With maven 2.2.1 this just produces an [INFO] message saying "Unable to load parent project from a relative path". With maven 3 (built today from subversion) there is now also a [FATAL] message in the output (the build doesn't fail - but seeing [FATAL] in the output doesn't look good):
>     * [INFO] --- maven-site-plugin:2.0.1:site (default-site) @ module-a ---
>     * [INFO] Unable to load parent project from a relative path: 1 problem was encountered while building the effective model
>     * [FATAL] Non-readable POM C:\svn\maven-test-proj\pom.xml: C:\svn\maven-test-proj\pom.xml (The system cannot find the file specified) @ C:\svn\maven-test-proj\pom.xml for project  at C:\svn\maven-test-proj\pom.xml
> I'm attaching a test project which demostrates this - need to first run "mvn install" on the parent-pom project and then "mvn site" on the module-a project to see the above output
> Also attaching a patch which catches FileNotFoundException and outputs a [WARNING] message instead of [FATAL] - not sure if this is the best solution, but in this circumstance its much better than seeing [FATAL} - even if the build doesn't fail.
> [1] http://svn.apache.org/repos/asf/commons/proper/commons-parent/
> [2] http://svn.apache.org/repos/asf/commons/proper/

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Issue Comment Edited: (MSITE-431) Rendering the site produces a Fatal error message if the parent pom isn't in the parent directory

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSITE-431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=195909#action_195909 ] 

Benjamin Bentmann edited comment on MSITE-431 at 10/24/09 4:18 PM:
-------------------------------------------------------------------

Dennis, I probably should have made it more clean, but the "[FATAL]" that shows up in the log is part of the exception message that describes all the problems in the model that led to the exception, it's *not* produced by any logger call in Maven 3, it's thrown to the user's face by {{DefaultSiteTool}}.

BTW, you might want to check r829037.

      was (Author: bentmann):
    Dennis, I probably should have made it more clean, but the "[FATAL]" that shows up in the log is part of the exception message that describes all the problems in the model that led to the exception, it's *not* produced by any logger call in Maven 3.

BTW, you might want to check r829037.
  
> Rendering the site produces a Fatal error message if the parent pom isn't in the parent directory
> -------------------------------------------------------------------------------------------------
>
>                 Key: MSITE-431
>                 URL: http://jira.codehaus.org/browse/MSITE-431
>             Project: Maven 2.x Site Plugin
>          Issue Type: Improvement
>    Affects Versions: 2.0.1
>            Reporter: Niall Pemberton
>            Priority: Minor
>         Attachments: test-project.zip, warn-if-parent-pom-notfound.patch
>
>
> Apache Commons's parent pom[1] used by the 30+ commons components[2] is not in the parent directory. With maven 2.2.1 this just produces an [INFO] message saying "Unable to load parent project from a relative path". With maven 3 (built today from subversion) there is now also a [FATAL] message in the output (the build doesn't fail - but seeing [FATAL] in the output doesn't look good):
>     * [INFO] --- maven-site-plugin:2.0.1:site (default-site) @ module-a ---
>     * [INFO] Unable to load parent project from a relative path: 1 problem was encountered while building the effective model
>     * [FATAL] Non-readable POM C:\svn\maven-test-proj\pom.xml: C:\svn\maven-test-proj\pom.xml (The system cannot find the file specified) @ C:\svn\maven-test-proj\pom.xml for project  at C:\svn\maven-test-proj\pom.xml
> I'm attaching a test project which demostrates this - need to first run "mvn install" on the parent-pom project and then "mvn site" on the module-a project to see the above output
> Also attaching a patch which catches FileNotFoundException and outputs a [WARNING] message instead of [FATAL] - not sure if this is the best solution, but in this circumstance its much better than seeing [FATAL} - even if the build doesn't fail.
> [1] http://svn.apache.org/repos/asf/commons/proper/commons-parent/
> [2] http://svn.apache.org/repos/asf/commons/proper/

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MSITE-431) Rendering the site produces a Fatal error message if the parent pom isn't in the parent directory

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSITE-431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=195751#action_195751 ] 

Benjamin Bentmann commented on MSITE-431:
-----------------------------------------

bq. I would have expected though that the site plugin would continue to work just as well in 3.x as it did in 2.x and the implication is that if you fix it in the site plugin then users will have to upgrade the site plugin when moving the maven 3.x to resolve this.

The Site Plugin has to be updated, see http://cwiki.apache.org/confluence/display/MAVEN/Maven+3.x+and+site+plugin for some more background.

> Rendering the site produces a Fatal error message if the parent pom isn't in the parent directory
> -------------------------------------------------------------------------------------------------
>
>                 Key: MSITE-431
>                 URL: http://jira.codehaus.org/browse/MSITE-431
>             Project: Maven 2.x Site Plugin
>          Issue Type: Improvement
>    Affects Versions: 2.0.1
>            Reporter: Niall Pemberton
>            Priority: Minor
>         Attachments: test-project.zip, warn-if-parent-pom-notfound.patch
>
>
> Apache Commons's parent pom[1] used by the 30+ commons components[2] is not in the parent directory. With maven 2.2.1 this just produces an [INFO] message saying "Unable to load parent project from a relative path". With maven 3 (built today from subversion) there is now also a [FATAL] message in the output (the build doesn't fail - but seeing [FATAL] in the output doesn't look good):
>     * [INFO] --- maven-site-plugin:2.0.1:site (default-site) @ module-a ---
>     * [INFO] Unable to load parent project from a relative path: 1 problem was encountered while building the effective model
>     * [FATAL] Non-readable POM C:\svn\maven-test-proj\pom.xml: C:\svn\maven-test-proj\pom.xml (The system cannot find the file specified) @ C:\svn\maven-test-proj\pom.xml for project  at C:\svn\maven-test-proj\pom.xml
> I'm attaching a test project which demostrates this - need to first run "mvn install" on the parent-pom project and then "mvn site" on the module-a project to see the above output
> Also attaching a patch which catches FileNotFoundException and outputs a [WARNING] message instead of [FATAL] - not sure if this is the best solution, but in this circumstance its much better than seeing [FATAL} - even if the build doesn't fail.
> [1] http://svn.apache.org/repos/asf/commons/proper/commons-parent/
> [2] http://svn.apache.org/repos/asf/commons/proper/

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MSITE-431) Rendering the site produces a Fatal error message if the parent pom isn't in the parent directory

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSITE-431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=195687#action_195687 ] 

Benjamin Bentmann commented on MSITE-431:
-----------------------------------------

That's merely a logging issue. The Site Plugin or more precisely the {{DefaultSiteTool}} does
{code:java}
catch ( ProjectBuildingException e )
{
    getLogger().info( "Unable to load parent project from a relative path: " + e.getMessage() );
}
{code}
i.e. that catches an exception and logs its message at info level. The exception and its message are correct, trying to build a project from a non-existing file is a fatal error.

> Rendering the site produces a Fatal error message if the parent pom isn't in the parent directory
> -------------------------------------------------------------------------------------------------
>
>                 Key: MSITE-431
>                 URL: http://jira.codehaus.org/browse/MSITE-431
>             Project: Maven 2.x Site Plugin
>          Issue Type: Improvement
>    Affects Versions: 2.0.1
>            Reporter: Niall Pemberton
>            Priority: Minor
>         Attachments: test-project.zip, warn-if-parent-pom-notfound.patch
>
>
> Apache Commons's parent pom[1] used by the 30+ commons components[2] is not in the parent directory. With maven 2.2.1 this just produces an [INFO] message saying "Unable to load parent project from a relative path". With maven 3 (built today from subversion) there is now also a [FATAL] message in the output (the build doesn't fail - but seeing [FATAL] in the output doesn't look good):
>     * [INFO] --- maven-site-plugin:2.0.1:site (default-site) @ module-a ---
>     * [INFO] Unable to load parent project from a relative path: 1 problem was encountered while building the effective model
>     * [FATAL] Non-readable POM C:\svn\maven-test-proj\pom.xml: C:\svn\maven-test-proj\pom.xml (The system cannot find the file specified) @ C:\svn\maven-test-proj\pom.xml for project  at C:\svn\maven-test-proj\pom.xml
> I'm attaching a test project which demostrates this - need to first run "mvn install" on the parent-pom project and then "mvn site" on the module-a project to see the above output
> Also attaching a patch which catches FileNotFoundException and outputs a [WARNING] message instead of [FATAL] - not sure if this is the best solution, but in this circumstance its much better than seeing [FATAL} - even if the build doesn't fail.
> [1] http://svn.apache.org/repos/asf/commons/proper/commons-parent/
> [2] http://svn.apache.org/repos/asf/commons/proper/

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Moved: (MSITE-431) Rendering the site produces a Fatal error message if the parent pom isn't in the parent directory

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MSITE-431?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann moved MNG-4399 to MSITE-431:
----------------------------------------------

           Complexity:   (was: Intermediate)
          Component/s:     (was: Artifacts and Repositories)
    Affects Version/s:     (was: 3.0-alpha-3)
                       2.0.1
           Issue Type: Improvement  (was: Bug)
                  Key: MSITE-431  (was: MNG-4399)
              Project: Maven 2.x Site Plugin  (was: Maven 2)

> Rendering the site produces a Fatal error message if the parent pom isn't in the parent directory
> -------------------------------------------------------------------------------------------------
>
>                 Key: MSITE-431
>                 URL: http://jira.codehaus.org/browse/MSITE-431
>             Project: Maven 2.x Site Plugin
>          Issue Type: Improvement
>    Affects Versions: 2.0.1
>            Reporter: Niall Pemberton
>            Priority: Minor
>         Attachments: test-project.zip, warn-if-parent-pom-notfound.patch
>
>
> Apache Commons's parent pom[1] used by the 30+ commons components[2] is not in the parent directory. With maven 2.2.1 this just produces an [INFO] message saying "Unable to load parent project from a relative path". With maven 3 (built today from subversion) there is now also a [FATAL] message in the output (the build doesn't fail - but seeing [FATAL] in the output doesn't look good):
>     * [INFO] --- maven-site-plugin:2.0.1:site (default-site) @ module-a ---
>     * [INFO] Unable to load parent project from a relative path: 1 problem was encountered while building the effective model
>     * [FATAL] Non-readable POM C:\svn\maven-test-proj\pom.xml: C:\svn\maven-test-proj\pom.xml (The system cannot find the file specified) @ C:\svn\maven-test-proj\pom.xml for project  at C:\svn\maven-test-proj\pom.xml
> I'm attaching a test project which demostrates this - need to first run "mvn install" on the parent-pom project and then "mvn site" on the module-a project to see the above output
> Also attaching a patch which catches FileNotFoundException and outputs a [WARNING] message instead of [FATAL] - not sure if this is the best solution, but in this circumstance its much better than seeing [FATAL} - even if the build doesn't fail.
> [1] http://svn.apache.org/repos/asf/commons/proper/commons-parent/
> [2] http://svn.apache.org/repos/asf/commons/proper/

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira