You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Vincent Siveton (JIRA)" <ji...@codehaus.org> on 2005/09/22 01:31:11 UTC

[jira] Created: (MNG-945) Handle project that contains no source

Handle project that contains no source
--------------------------------------

         Key: MNG-945
         URL: http://jira.codehaus.org/browse/MNG-945
     Project: Maven 2
        Type: Bug
  Components: maven-site-plugin  
    Versions: 2.0-beta-1    
 Environment: trunk (290857)
 Reporter: Vincent Siveton
     Fix For: 2.0-beta-2
 Attachments: maven-reporting-impl.diff

In a specific case, site plugin throws IllegalArgumentException if no source was defined.

My project is a *main* parent project with the following structure:
+- test/
   +- pom.xml

In this case, the following exception is thrown when site:site is call.
java.lang.IllegalStateException: basedir C:\temp\test\src\main\java does not exist
        at org.codehaus.plexus.util.DirectoryScanner.scan(DirectoryScanner.java:539)
        at org.codehaus.plexus.util.FileUtils.getFileNames(FileUtils.java:1343)
        at org.codehaus.plexus.util.FileUtils.getFileNames(FileUtils.java:1309)
        at org.codehaus.plexus.util.FileUtils.getFiles(FileUtils.java:1281)
        at org.codehaus.plexus.util.FileUtils.getFiles(FileUtils.java:1275)
        at org.apache.maven.plugin.checkstyle.CheckstyleReport.getFilesToProcess(CheckstyleReport.java:387)
        at org.apache.maven.plugin.checkstyle.CheckstyleReport.executeReport(CheckstyleReport.java:244)
        at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:117)
        at org.apache.maven.doxia.DoxiaMojo.generateReportsPages(DoxiaMojo.java:813)
        at org.apache.maven.doxia.DoxiaMojo.execute(DoxiaMojo.java:332)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:367)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:502)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:465)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:447)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:136)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:186)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:302)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

In my opinion, if no source was defined, I don't need a report. 
The proposed that the patch applies this rule but the generated site has project report link in the nav bar (so checkstyle.html is empty and apidocs\index.html doesnt exist)

Thoughts?

-- 
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


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


[jira] Commented: (MNG-945) Handle project that contains no source

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-945?page=comments#action_46894 ] 

Brett Porter commented on MNG-945:
----------------------------------

does it work as in succeed, or does it work as in generating the project reports? I thought the latter would fail with this patch.

> Handle project that contains no source
> --------------------------------------
>
>          Key: MNG-945
>          URL: http://jira.codehaus.org/browse/MNG-945
>      Project: Maven 2
>         Type: Bug
>   Components: maven-site-plugin
>     Versions: 2.0-beta-1
>  Environment: trunk (290857)
>     Reporter: Vincent Siveton
>      Fix For: 2.0-beta-2
>  Attachments: maven-reporting-impl.diff
>
>
> In a specific case, site plugin throws IllegalArgumentException if no source was defined.
> My project is a *main* parent project with the following structure:
> +- test/
>    +- pom.xml
> In this case, the following exception is thrown when site:site is call.
> java.lang.IllegalStateException: basedir C:\temp\test\src\main\java does not exist
>         at org.codehaus.plexus.util.DirectoryScanner.scan(DirectoryScanner.java:539)
>         at org.codehaus.plexus.util.FileUtils.getFileNames(FileUtils.java:1343)
>         at org.codehaus.plexus.util.FileUtils.getFileNames(FileUtils.java:1309)
>         at org.codehaus.plexus.util.FileUtils.getFiles(FileUtils.java:1281)
>         at org.codehaus.plexus.util.FileUtils.getFiles(FileUtils.java:1275)
>         at org.apache.maven.plugin.checkstyle.CheckstyleReport.getFilesToProcess(CheckstyleReport.java:387)
>         at org.apache.maven.plugin.checkstyle.CheckstyleReport.executeReport(CheckstyleReport.java:244)
>         at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:117)
>         at org.apache.maven.doxia.DoxiaMojo.generateReportsPages(DoxiaMojo.java:813)
>         at org.apache.maven.doxia.DoxiaMojo.execute(DoxiaMojo.java:332)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:367)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:502)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:465)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:447)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:136)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:186)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:302)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:324)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> In my opinion, if no source was defined, I don't need a report. 
> The proposed that the patch applies this rule but the generated site has project report link in the nav bar (so checkstyle.html is empty and apidocs\index.html doesnt exist)
> Thoughts?

-- 
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


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


[jira] Commented: (MNG-945) Handle project that contains no source

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-945?page=comments#action_47937 ] 

Brett Porter commented on MNG-945:
----------------------------------

note that if the report generates nothing, it should not be listed on the site or generate an empty file.

my comments form the dev list:
What should happen is the report have some way to indicate whether it generated something or not. It should always be called, but if there aren't any sources it shouldn't generate and the site plugin should not include it in the menu.

> Handle project that contains no source
> --------------------------------------
>
>          Key: MNG-945
>          URL: http://jira.codehaus.org/browse/MNG-945
>      Project: Maven 2
>         Type: Bug
>   Components: maven-site-plugin
>     Versions: 2.0-beta-1
>  Environment: trunk (290857)
>     Reporter: Vincent Siveton
>      Fix For: 2.0-beta-4

>
>
> In a specific case, site plugin throws IllegalArgumentException if no source was defined.
> My project is a *main* parent project with the following structure:
> +- test/
>    +- pom.xml
> In this case, the following exception is thrown when site:site is call.
> java.lang.IllegalStateException: basedir C:\temp\test\src\main\java does not exist
>         at org.codehaus.plexus.util.DirectoryScanner.scan(DirectoryScanner.java:539)
>         at org.codehaus.plexus.util.FileUtils.getFileNames(FileUtils.java:1343)
>         at org.codehaus.plexus.util.FileUtils.getFileNames(FileUtils.java:1309)
>         at org.codehaus.plexus.util.FileUtils.getFiles(FileUtils.java:1281)
>         at org.codehaus.plexus.util.FileUtils.getFiles(FileUtils.java:1275)
>         at org.apache.maven.plugin.checkstyle.CheckstyleReport.getFilesToProcess(CheckstyleReport.java:387)
>         at org.apache.maven.plugin.checkstyle.CheckstyleReport.executeReport(CheckstyleReport.java:244)
>         at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:117)
>         at org.apache.maven.doxia.DoxiaMojo.generateReportsPages(DoxiaMojo.java:813)
>         at org.apache.maven.doxia.DoxiaMojo.execute(DoxiaMojo.java:332)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:367)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:502)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:465)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:447)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:136)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:186)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:302)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:324)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> In my opinion, if no source was defined, I don't need a report. 
> The proposed that the patch applies this rule but the generated site has project report link in the nav bar (so checkstyle.html is empty and apidocs\index.html doesnt exist)
> Thoughts?

-- 
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


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


[jira] Commented: (MNG-945) Handle project that contains no source

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-945?page=comments#action_46879 ] 

Brett Porter commented on MNG-945:
----------------------------------

I don't think this patch is good - doesn't that mean that some reports that don't use the source directory (eg, project-info-reports) will stop working? Have you tried this on maven-site?

I think these lines need to be added to checkstyle and similar reports individually.

> Handle project that contains no source
> --------------------------------------
>
>          Key: MNG-945
>          URL: http://jira.codehaus.org/browse/MNG-945
>      Project: Maven 2
>         Type: Bug
>   Components: maven-site-plugin
>     Versions: 2.0-beta-1
>  Environment: trunk (290857)
>     Reporter: Vincent Siveton
>      Fix For: 2.0-beta-2
>  Attachments: maven-reporting-impl.diff
>
>
> In a specific case, site plugin throws IllegalArgumentException if no source was defined.
> My project is a *main* parent project with the following structure:
> +- test/
>    +- pom.xml
> In this case, the following exception is thrown when site:site is call.
> java.lang.IllegalStateException: basedir C:\temp\test\src\main\java does not exist
>         at org.codehaus.plexus.util.DirectoryScanner.scan(DirectoryScanner.java:539)
>         at org.codehaus.plexus.util.FileUtils.getFileNames(FileUtils.java:1343)
>         at org.codehaus.plexus.util.FileUtils.getFileNames(FileUtils.java:1309)
>         at org.codehaus.plexus.util.FileUtils.getFiles(FileUtils.java:1281)
>         at org.codehaus.plexus.util.FileUtils.getFiles(FileUtils.java:1275)
>         at org.apache.maven.plugin.checkstyle.CheckstyleReport.getFilesToProcess(CheckstyleReport.java:387)
>         at org.apache.maven.plugin.checkstyle.CheckstyleReport.executeReport(CheckstyleReport.java:244)
>         at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:117)
>         at org.apache.maven.doxia.DoxiaMojo.generateReportsPages(DoxiaMojo.java:813)
>         at org.apache.maven.doxia.DoxiaMojo.execute(DoxiaMojo.java:332)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:367)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:502)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:465)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:447)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:136)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:186)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:302)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:324)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> In my opinion, if no source was defined, I don't need a report. 
> The proposed that the patch applies this rule but the generated site has project report link in the nav bar (so checkstyle.html is empty and apidocs\index.html doesnt exist)
> Thoughts?

-- 
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


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


[jira] Updated: (MNG-945) Handle project that contains no source

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-945?page=all ]

Brett Porter updated MNG-945:
-----------------------------

    Component: maven-core

> Handle project that contains no source
> --------------------------------------
>
>          Key: MNG-945
>          URL: http://jira.codehaus.org/browse/MNG-945
>      Project: Maven 2
>         Type: Bug
>   Components: maven-core, maven-site-plugin
>     Versions: 2.0-beta-1
>  Environment: trunk (290857)
>     Reporter: Vincent Siveton
>      Fix For: 2.0-beta-4

>
>
> In a specific case, site plugin throws IllegalArgumentException if no source was defined.
> My project is a *main* parent project with the following structure:
> +- test/
>    +- pom.xml
> In this case, the following exception is thrown when site:site is call.
> java.lang.IllegalStateException: basedir C:\temp\test\src\main\java does not exist
>         at org.codehaus.plexus.util.DirectoryScanner.scan(DirectoryScanner.java:539)
>         at org.codehaus.plexus.util.FileUtils.getFileNames(FileUtils.java:1343)
>         at org.codehaus.plexus.util.FileUtils.getFileNames(FileUtils.java:1309)
>         at org.codehaus.plexus.util.FileUtils.getFiles(FileUtils.java:1281)
>         at org.codehaus.plexus.util.FileUtils.getFiles(FileUtils.java:1275)
>         at org.apache.maven.plugin.checkstyle.CheckstyleReport.getFilesToProcess(CheckstyleReport.java:387)
>         at org.apache.maven.plugin.checkstyle.CheckstyleReport.executeReport(CheckstyleReport.java:244)
>         at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:117)
>         at org.apache.maven.doxia.DoxiaMojo.generateReportsPages(DoxiaMojo.java:813)
>         at org.apache.maven.doxia.DoxiaMojo.execute(DoxiaMojo.java:332)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:367)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:502)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:465)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:447)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:136)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:186)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:302)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:324)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> In my opinion, if no source was defined, I don't need a report. 
> The proposed that the patch applies this rule but the generated site has project report link in the nav bar (so checkstyle.html is empty and apidocs\index.html doesnt exist)
> Thoughts?

-- 
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


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


[jira] Updated: (MNG-945) Handle project that contains no source

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-945?page=all ]

Brett Porter updated MNG-945:
-----------------------------

    Fix Version:     (was: 2.0-beta-3)
                 2.0-beta-4

> Handle project that contains no source
> --------------------------------------
>
>          Key: MNG-945
>          URL: http://jira.codehaus.org/browse/MNG-945
>      Project: Maven 2
>         Type: Bug
>   Components: maven-site-plugin
>     Versions: 2.0-beta-1
>  Environment: trunk (290857)
>     Reporter: Vincent Siveton
>      Fix For: 2.0-beta-4

>
>
> In a specific case, site plugin throws IllegalArgumentException if no source was defined.
> My project is a *main* parent project with the following structure:
> +- test/
>    +- pom.xml
> In this case, the following exception is thrown when site:site is call.
> java.lang.IllegalStateException: basedir C:\temp\test\src\main\java does not exist
>         at org.codehaus.plexus.util.DirectoryScanner.scan(DirectoryScanner.java:539)
>         at org.codehaus.plexus.util.FileUtils.getFileNames(FileUtils.java:1343)
>         at org.codehaus.plexus.util.FileUtils.getFileNames(FileUtils.java:1309)
>         at org.codehaus.plexus.util.FileUtils.getFiles(FileUtils.java:1281)
>         at org.codehaus.plexus.util.FileUtils.getFiles(FileUtils.java:1275)
>         at org.apache.maven.plugin.checkstyle.CheckstyleReport.getFilesToProcess(CheckstyleReport.java:387)
>         at org.apache.maven.plugin.checkstyle.CheckstyleReport.executeReport(CheckstyleReport.java:244)
>         at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:117)
>         at org.apache.maven.doxia.DoxiaMojo.generateReportsPages(DoxiaMojo.java:813)
>         at org.apache.maven.doxia.DoxiaMojo.execute(DoxiaMojo.java:332)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:367)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:502)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:465)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:447)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:136)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:186)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:302)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:324)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> In my opinion, if no source was defined, I don't need a report. 
> The proposed that the patch applies this rule but the generated site has project report link in the nav bar (so checkstyle.html is empty and apidocs\index.html doesnt exist)
> Thoughts?

-- 
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


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


[jira] Closed: (MNG-945) Handle project that contains no source

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-945?page=all ]
     
Brett Porter closed MNG-945:
----------------------------

     Assign To: Brett Porter
    Resolution: Fixed

> Handle project that contains no source
> --------------------------------------
>
>          Key: MNG-945
>          URL: http://jira.codehaus.org/browse/MNG-945
>      Project: Maven 2
>         Type: Bug
>   Components: maven-core, maven-site-plugin
>     Versions: 2.0-beta-1
>  Environment: trunk (290857)
>     Reporter: Vincent Siveton
>     Assignee: Brett Porter
>      Fix For: 2.0-beta-4

>
>
> In a specific case, site plugin throws IllegalArgumentException if no source was defined.
> My project is a *main* parent project with the following structure:
> +- test/
>    +- pom.xml
> In this case, the following exception is thrown when site:site is call.
> java.lang.IllegalStateException: basedir C:\temp\test\src\main\java does not exist
>         at org.codehaus.plexus.util.DirectoryScanner.scan(DirectoryScanner.java:539)
>         at org.codehaus.plexus.util.FileUtils.getFileNames(FileUtils.java:1343)
>         at org.codehaus.plexus.util.FileUtils.getFileNames(FileUtils.java:1309)
>         at org.codehaus.plexus.util.FileUtils.getFiles(FileUtils.java:1281)
>         at org.codehaus.plexus.util.FileUtils.getFiles(FileUtils.java:1275)
>         at org.apache.maven.plugin.checkstyle.CheckstyleReport.getFilesToProcess(CheckstyleReport.java:387)
>         at org.apache.maven.plugin.checkstyle.CheckstyleReport.executeReport(CheckstyleReport.java:244)
>         at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:117)
>         at org.apache.maven.doxia.DoxiaMojo.generateReportsPages(DoxiaMojo.java:813)
>         at org.apache.maven.doxia.DoxiaMojo.execute(DoxiaMojo.java:332)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:367)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:502)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:465)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:447)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:136)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:186)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:302)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:324)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> In my opinion, if no source was defined, I don't need a report. 
> The proposed that the patch applies this rule but the generated site has project report link in the nav bar (so checkstyle.html is empty and apidocs\index.html doesnt exist)
> Thoughts?

-- 
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


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


[jira] Commented: (MNG-945) Handle project that contains no source

Posted by "Vincent Siveton (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-945?page=comments#action_46919 ] 

Vincent Siveton commented on MNG-945:
-------------------------------------

With the patch, all reports are empty: it is definitely not a good patch!

My first idea was to add a check in CheckstyleReport class to know if src dir exists or not. I dont like this approach: no enough abstract for all reports.
Maybe we could add an abstract method in the api, something like isSourceManadatory()


> Handle project that contains no source
> --------------------------------------
>
>          Key: MNG-945
>          URL: http://jira.codehaus.org/browse/MNG-945
>      Project: Maven 2
>         Type: Bug
>   Components: maven-site-plugin
>     Versions: 2.0-beta-1
>  Environment: trunk (290857)
>     Reporter: Vincent Siveton
>      Fix For: 2.0-beta-2
>  Attachments: maven-reporting-impl.diff
>
>
> In a specific case, site plugin throws IllegalArgumentException if no source was defined.
> My project is a *main* parent project with the following structure:
> +- test/
>    +- pom.xml
> In this case, the following exception is thrown when site:site is call.
> java.lang.IllegalStateException: basedir C:\temp\test\src\main\java does not exist
>         at org.codehaus.plexus.util.DirectoryScanner.scan(DirectoryScanner.java:539)
>         at org.codehaus.plexus.util.FileUtils.getFileNames(FileUtils.java:1343)
>         at org.codehaus.plexus.util.FileUtils.getFileNames(FileUtils.java:1309)
>         at org.codehaus.plexus.util.FileUtils.getFiles(FileUtils.java:1281)
>         at org.codehaus.plexus.util.FileUtils.getFiles(FileUtils.java:1275)
>         at org.apache.maven.plugin.checkstyle.CheckstyleReport.getFilesToProcess(CheckstyleReport.java:387)
>         at org.apache.maven.plugin.checkstyle.CheckstyleReport.executeReport(CheckstyleReport.java:244)
>         at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:117)
>         at org.apache.maven.doxia.DoxiaMojo.generateReportsPages(DoxiaMojo.java:813)
>         at org.apache.maven.doxia.DoxiaMojo.execute(DoxiaMojo.java:332)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:367)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:502)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:465)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:447)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:136)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:186)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:302)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:324)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> In my opinion, if no source was defined, I don't need a report. 
> The proposed that the patch applies this rule but the generated site has project report link in the nav bar (so checkstyle.html is empty and apidocs\index.html doesnt exist)
> Thoughts?

-- 
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


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


[jira] Commented: (MNG-945) Handle project that contains no source

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-945?page=comments#action_48332 ] 

Brett Porter commented on MNG-945:
----------------------------------

I liked Edwin's idea, however on implementing it I realised that each is done individually with the reports list pre-rendered - so when a report fails, it is already linked on previously successful reports.

I will instead investigate adding:

boolean canGenerateReport();

to MavenReport

> Handle project that contains no source
> --------------------------------------
>
>          Key: MNG-945
>          URL: http://jira.codehaus.org/browse/MNG-945
>      Project: Maven 2
>         Type: Bug
>   Components: maven-core, maven-site-plugin
>     Versions: 2.0-beta-1
>  Environment: trunk (290857)
>     Reporter: Vincent Siveton
>      Fix For: 2.0-beta-4

>
>
> In a specific case, site plugin throws IllegalArgumentException if no source was defined.
> My project is a *main* parent project with the following structure:
> +- test/
>    +- pom.xml
> In this case, the following exception is thrown when site:site is call.
> java.lang.IllegalStateException: basedir C:\temp\test\src\main\java does not exist
>         at org.codehaus.plexus.util.DirectoryScanner.scan(DirectoryScanner.java:539)
>         at org.codehaus.plexus.util.FileUtils.getFileNames(FileUtils.java:1343)
>         at org.codehaus.plexus.util.FileUtils.getFileNames(FileUtils.java:1309)
>         at org.codehaus.plexus.util.FileUtils.getFiles(FileUtils.java:1281)
>         at org.codehaus.plexus.util.FileUtils.getFiles(FileUtils.java:1275)
>         at org.apache.maven.plugin.checkstyle.CheckstyleReport.getFilesToProcess(CheckstyleReport.java:387)
>         at org.apache.maven.plugin.checkstyle.CheckstyleReport.executeReport(CheckstyleReport.java:244)
>         at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:117)
>         at org.apache.maven.doxia.DoxiaMojo.generateReportsPages(DoxiaMojo.java:813)
>         at org.apache.maven.doxia.DoxiaMojo.execute(DoxiaMojo.java:332)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:367)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:502)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:465)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:447)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:136)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:186)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:302)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:324)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> In my opinion, if no source was defined, I don't need a report. 
> The proposed that the patch applies this rule but the generated site has project report link in the nav bar (so checkstyle.html is empty and apidocs\index.html doesnt exist)
> Thoughts?

-- 
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


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


[jira] Commented: (MNG-945) Handle project that contains no source

Posted by "Edwin Punzalan (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-945?page=comments#action_48319 ] 

Edwin Punzalan commented on MNG-945:
------------------------------------

How about the if report throws a NoReportGeneratedException and then the exception is caught and the site plugin then goes on to the next report?

> Handle project that contains no source
> --------------------------------------
>
>          Key: MNG-945
>          URL: http://jira.codehaus.org/browse/MNG-945
>      Project: Maven 2
>         Type: Bug
>   Components: maven-core, maven-site-plugin
>     Versions: 2.0-beta-1
>  Environment: trunk (290857)
>     Reporter: Vincent Siveton
>      Fix For: 2.0-beta-4

>
>
> In a specific case, site plugin throws IllegalArgumentException if no source was defined.
> My project is a *main* parent project with the following structure:
> +- test/
>    +- pom.xml
> In this case, the following exception is thrown when site:site is call.
> java.lang.IllegalStateException: basedir C:\temp\test\src\main\java does not exist
>         at org.codehaus.plexus.util.DirectoryScanner.scan(DirectoryScanner.java:539)
>         at org.codehaus.plexus.util.FileUtils.getFileNames(FileUtils.java:1343)
>         at org.codehaus.plexus.util.FileUtils.getFileNames(FileUtils.java:1309)
>         at org.codehaus.plexus.util.FileUtils.getFiles(FileUtils.java:1281)
>         at org.codehaus.plexus.util.FileUtils.getFiles(FileUtils.java:1275)
>         at org.apache.maven.plugin.checkstyle.CheckstyleReport.getFilesToProcess(CheckstyleReport.java:387)
>         at org.apache.maven.plugin.checkstyle.CheckstyleReport.executeReport(CheckstyleReport.java:244)
>         at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:117)
>         at org.apache.maven.doxia.DoxiaMojo.generateReportsPages(DoxiaMojo.java:813)
>         at org.apache.maven.doxia.DoxiaMojo.execute(DoxiaMojo.java:332)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:367)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:502)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:465)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:447)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:136)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:186)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:302)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:324)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> In my opinion, if no source was defined, I don't need a report. 
> The proposed that the patch applies this rule but the generated site has project report link in the nav bar (so checkstyle.html is empty and apidocs\index.html doesnt exist)
> Thoughts?

-- 
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


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


[jira] Commented: (MNG-945) Handle project that contains no source

Posted by "Vincent Siveton (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-945?page=comments#action_46874 ] 

Vincent Siveton commented on MNG-945:
-------------------------------------

Try also this command line from components\maven-plugins
m2 site:site

> Handle project that contains no source
> --------------------------------------
>
>          Key: MNG-945
>          URL: http://jira.codehaus.org/browse/MNG-945
>      Project: Maven 2
>         Type: Bug
>   Components: maven-site-plugin
>     Versions: 2.0-beta-1
>  Environment: trunk (290857)
>     Reporter: Vincent Siveton
>      Fix For: 2.0-beta-2
>  Attachments: maven-reporting-impl.diff
>
>
> In a specific case, site plugin throws IllegalArgumentException if no source was defined.
> My project is a *main* parent project with the following structure:
> +- test/
>    +- pom.xml
> In this case, the following exception is thrown when site:site is call.
> java.lang.IllegalStateException: basedir C:\temp\test\src\main\java does not exist
>         at org.codehaus.plexus.util.DirectoryScanner.scan(DirectoryScanner.java:539)
>         at org.codehaus.plexus.util.FileUtils.getFileNames(FileUtils.java:1343)
>         at org.codehaus.plexus.util.FileUtils.getFileNames(FileUtils.java:1309)
>         at org.codehaus.plexus.util.FileUtils.getFiles(FileUtils.java:1281)
>         at org.codehaus.plexus.util.FileUtils.getFiles(FileUtils.java:1275)
>         at org.apache.maven.plugin.checkstyle.CheckstyleReport.getFilesToProcess(CheckstyleReport.java:387)
>         at org.apache.maven.plugin.checkstyle.CheckstyleReport.executeReport(CheckstyleReport.java:244)
>         at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:117)
>         at org.apache.maven.doxia.DoxiaMojo.generateReportsPages(DoxiaMojo.java:813)
>         at org.apache.maven.doxia.DoxiaMojo.execute(DoxiaMojo.java:332)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:367)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:502)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:465)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:447)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:136)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:186)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:302)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:324)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> In my opinion, if no source was defined, I don't need a report. 
> The proposed that the patch applies this rule but the generated site has project report link in the nav bar (so checkstyle.html is empty and apidocs\index.html doesnt exist)
> Thoughts?

-- 
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


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


[jira] Commented: (MNG-945) Handle project that contains no source

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-945?page=comments#action_46923 ] 

Brett Porter commented on MNG-945:
----------------------------------

I think it is ok to do it in every plugin. There are other parameters to validate as well, not necessarily just the source directory - and additionally, it should be using the source roots anyway.

> Handle project that contains no source
> --------------------------------------
>
>          Key: MNG-945
>          URL: http://jira.codehaus.org/browse/MNG-945
>      Project: Maven 2
>         Type: Bug
>   Components: maven-site-plugin
>     Versions: 2.0-beta-1
>  Environment: trunk (290857)
>     Reporter: Vincent Siveton
>      Fix For: 2.0-beta-2
>  Attachments: maven-reporting-impl.diff
>
>
> In a specific case, site plugin throws IllegalArgumentException if no source was defined.
> My project is a *main* parent project with the following structure:
> +- test/
>    +- pom.xml
> In this case, the following exception is thrown when site:site is call.
> java.lang.IllegalStateException: basedir C:\temp\test\src\main\java does not exist
>         at org.codehaus.plexus.util.DirectoryScanner.scan(DirectoryScanner.java:539)
>         at org.codehaus.plexus.util.FileUtils.getFileNames(FileUtils.java:1343)
>         at org.codehaus.plexus.util.FileUtils.getFileNames(FileUtils.java:1309)
>         at org.codehaus.plexus.util.FileUtils.getFiles(FileUtils.java:1281)
>         at org.codehaus.plexus.util.FileUtils.getFiles(FileUtils.java:1275)
>         at org.apache.maven.plugin.checkstyle.CheckstyleReport.getFilesToProcess(CheckstyleReport.java:387)
>         at org.apache.maven.plugin.checkstyle.CheckstyleReport.executeReport(CheckstyleReport.java:244)
>         at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:117)
>         at org.apache.maven.doxia.DoxiaMojo.generateReportsPages(DoxiaMojo.java:813)
>         at org.apache.maven.doxia.DoxiaMojo.execute(DoxiaMojo.java:332)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:367)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:502)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:465)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:447)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:136)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:186)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:302)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:324)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> In my opinion, if no source was defined, I don't need a report. 
> The proposed that the patch applies this rule but the generated site has project report link in the nav bar (so checkstyle.html is empty and apidocs\index.html doesnt exist)
> Thoughts?

-- 
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


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


[jira] Commented: (MNG-945) Handle project that contains no source

Posted by "Vincent Siveton (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-945?page=comments#action_46881 ] 

Vincent Siveton commented on MNG-945:
-------------------------------------

I totally agree with you: it is not a good patch but it is a first idea;)

maven-site (in SVN) works fine for me but if you remove the <excludeDefaults/> (ie  excludeDefaults is false) in <reporting/> section, the same exception occurs.



> Handle project that contains no source
> --------------------------------------
>
>          Key: MNG-945
>          URL: http://jira.codehaus.org/browse/MNG-945
>      Project: Maven 2
>         Type: Bug
>   Components: maven-site-plugin
>     Versions: 2.0-beta-1
>  Environment: trunk (290857)
>     Reporter: Vincent Siveton
>      Fix For: 2.0-beta-2
>  Attachments: maven-reporting-impl.diff
>
>
> In a specific case, site plugin throws IllegalArgumentException if no source was defined.
> My project is a *main* parent project with the following structure:
> +- test/
>    +- pom.xml
> In this case, the following exception is thrown when site:site is call.
> java.lang.IllegalStateException: basedir C:\temp\test\src\main\java does not exist
>         at org.codehaus.plexus.util.DirectoryScanner.scan(DirectoryScanner.java:539)
>         at org.codehaus.plexus.util.FileUtils.getFileNames(FileUtils.java:1343)
>         at org.codehaus.plexus.util.FileUtils.getFileNames(FileUtils.java:1309)
>         at org.codehaus.plexus.util.FileUtils.getFiles(FileUtils.java:1281)
>         at org.codehaus.plexus.util.FileUtils.getFiles(FileUtils.java:1275)
>         at org.apache.maven.plugin.checkstyle.CheckstyleReport.getFilesToProcess(CheckstyleReport.java:387)
>         at org.apache.maven.plugin.checkstyle.CheckstyleReport.executeReport(CheckstyleReport.java:244)
>         at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:117)
>         at org.apache.maven.doxia.DoxiaMojo.generateReportsPages(DoxiaMojo.java:813)
>         at org.apache.maven.doxia.DoxiaMojo.execute(DoxiaMojo.java:332)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:367)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:502)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:465)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:447)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:136)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:186)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:302)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:324)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> In my opinion, if no source was defined, I don't need a report. 
> The proposed that the patch applies this rule but the generated site has project report link in the nav bar (so checkstyle.html is empty and apidocs\index.html doesnt exist)
> Thoughts?

-- 
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


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