[jira] [Commented] (MJAVADOC-763) JavadocReportTest.testExceptions is broken

2023-08-17 Thread Slawomir Jaranowski (Jira)


[ 
https://issues.apache.org/jira/browse/MJAVADOC-763?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17755491#comment-17755491
 ] 

Slawomir Jaranowski commented on MJAVADOC-763:
--

[~elharo] - please take care about
- fix version
- assigned user 
- commit message should contains Jira number

> JavadocReportTest.testExceptions is broken
> --
>
> Key: MJAVADOC-763
> URL: https://issues.apache.org/jira/browse/MJAVADOC-763
> Project: Maven Javadoc Plugin
>  Issue Type: Bug
>Reporter: Elliotte Rusty Harold
>Priority: Major
> Fix For: 3.5.1
>
>
> The Mojo lookup fails. This is hidden by bad exception handling in the test 
> that catches too broad an exception type. 
> [ERROR] Errors: 
> [ERROR]   
> JavadocReportTest.testExceptions:603->lookupMojo:103->AbstractMojoTestCase.lookupMojo:355->AbstractMojoTestCase.lookupMojo:426
>  » ComponentConfiguration Cannot load implementation hint 
> 'org.apache.maven.plugins.javadoc.stubs.ExceptionTestMavenProjectStub'



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MJAVADOC-763) JavadocReportTest.testExceptions is broken

2023-08-14 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MJAVADOC-763?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17754341#comment-17754341
 ] 

ASF GitHub Bot commented on MJAVADOC-763:
-

elharo merged PR #219:
URL: https://github.com/apache/maven-javadoc-plugin/pull/219




> JavadocReportTest.testExceptions is broken
> --
>
> Key: MJAVADOC-763
> URL: https://issues.apache.org/jira/browse/MJAVADOC-763
> Project: Maven Javadoc Plugin
>  Issue Type: Bug
>Reporter: Elliotte Rusty Harold
>Priority: Major
>
> The Mojo lookup fails. This is hidden by bad exception handling in the test 
> that catches too broad an exception type. 
> [ERROR] Errors: 
> [ERROR]   
> JavadocReportTest.testExceptions:603->lookupMojo:103->AbstractMojoTestCase.lookupMojo:355->AbstractMojoTestCase.lookupMojo:426
>  » ComponentConfiguration Cannot load implementation hint 
> 'org.apache.maven.plugins.javadoc.stubs.ExceptionTestMavenProjectStub'



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MJAVADOC-763) JavadocReportTest.testExceptions is broken

2023-08-14 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MJAVADOC-763?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17754256#comment-17754256
 ] 

ASF GitHub Bot commented on MJAVADOC-763:
-

slachiewicz commented on code in PR #219:
URL: 
https://github.com/apache/maven-javadoc-plugin/pull/219#discussion_r1293952178


##
src/test/java/org/apache/maven/plugins/javadoc/JavadocReportTest.java:
##
@@ -594,27 +595,6 @@ public void testOptionsUmlautEncoding() throws Exception {
 }
 }
 
-/**
- * @throws Exception if any
- */
-public void testExceptions() throws Exception {
-try {
-Path testPom = 
unit.resolve("default-configuration/exception-test-plugin-config.xml");
-JavadocReport mojo = lookupMojo(testPom);

Review Comment:
   ExceptionTestMavenProjectStub project class is missing. agree was bad from 
start





> JavadocReportTest.testExceptions is broken
> --
>
> Key: MJAVADOC-763
> URL: https://issues.apache.org/jira/browse/MJAVADOC-763
> Project: Maven Javadoc Plugin
>  Issue Type: Bug
>Reporter: Elliotte Rusty Harold
>Priority: Major
>
> The Mojo lookup fails. This is hidden by bad exception handling in the test 
> that catches too broad an exception type. 
> [ERROR] Errors: 
> [ERROR]   
> JavadocReportTest.testExceptions:603->lookupMojo:103->AbstractMojoTestCase.lookupMojo:355->AbstractMojoTestCase.lookupMojo:426
>  » ComponentConfiguration Cannot load implementation hint 
> 'org.apache.maven.plugins.javadoc.stubs.ExceptionTestMavenProjectStub'



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MJAVADOC-763) JavadocReportTest.testExceptions is broken

2023-08-14 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MJAVADOC-763?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17754235#comment-17754235
 ] 

ASF GitHub Bot commented on MJAVADOC-763:
-

elharo commented on code in PR #219:
URL: 
https://github.com/apache/maven-javadoc-plugin/pull/219#discussion_r1293875949


##
src/test/java/org/apache/maven/plugins/javadoc/JavadocReportTest.java:
##
@@ -594,27 +595,6 @@ public void testOptionsUmlautEncoding() throws Exception {
 }
 }
 
-/**
- * @throws Exception if any
- */
-public void testExceptions() throws Exception {
-try {
-Path testPom = 
unit.resolve("default-configuration/exception-test-plugin-config.xml");
-JavadocReport mojo = lookupMojo(testPom);

Review Comment:
   No, the execute method is never invoked. The lookupMojo method fails because 
the mojo was poorly written. It's been months since I wrote this, so I'm not 
sure if the test case was always broken or the code itself, but this is trying 
to test line 604 but instead the exception is thrown before we get there. The 
test fails if you catch MojoExecutionException instead of Exception. 





> JavadocReportTest.testExceptions is broken
> --
>
> Key: MJAVADOC-763
> URL: https://issues.apache.org/jira/browse/MJAVADOC-763
> Project: Maven Javadoc Plugin
>  Issue Type: Bug
>Reporter: Elliotte Rusty Harold
>Priority: Major
>
> The Mojo lookup fails. This is hidden by bad exception handling in the test 
> that catches too broad an exception type. 
> [ERROR] Errors: 
> [ERROR]   
> JavadocReportTest.testExceptions:603->lookupMojo:103->AbstractMojoTestCase.lookupMojo:355->AbstractMojoTestCase.lookupMojo:426
>  » ComponentConfiguration Cannot load implementation hint 
> 'org.apache.maven.plugins.javadoc.stubs.ExceptionTestMavenProjectStub'



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MJAVADOC-763) JavadocReportTest.testExceptions is broken

2023-08-14 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MJAVADOC-763?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17753954#comment-17753954
 ] 

ASF GitHub Bot commented on MJAVADOC-763:
-

slachiewicz commented on code in PR #219:
URL: 
https://github.com/apache/maven-javadoc-plugin/pull/219#discussion_r1293185054


##
src/test/java/org/apache/maven/plugins/javadoc/JavadocReportTest.java:
##
@@ -594,27 +595,6 @@ public void testOptionsUmlautEncoding() throws Exception {
 }
 }
 
-/**
- * @throws Exception if any
- */
-public void testExceptions() throws Exception {
-try {
-Path testPom = 
unit.resolve("default-configuration/exception-test-plugin-config.xml");
-JavadocReport mojo = lookupMojo(testPom);

Review Comment:
   Maybe we should catch MojoExecutionException and check the root cous of the 
failing test instead of the generic Exception?





> JavadocReportTest.testExceptions is broken
> --
>
> Key: MJAVADOC-763
> URL: https://issues.apache.org/jira/browse/MJAVADOC-763
> Project: Maven Javadoc Plugin
>  Issue Type: Bug
>Reporter: Elliotte Rusty Harold
>Priority: Major
>
> The Mojo lookup fails. This is hidden by bad exception handling in the test 
> that catches too broad an exception type. 
> [ERROR] Errors: 
> [ERROR]   
> JavadocReportTest.testExceptions:603->lookupMojo:103->AbstractMojoTestCase.lookupMojo:355->AbstractMojoTestCase.lookupMojo:426
>  » ComponentConfiguration Cannot load implementation hint 
> 'org.apache.maven.plugins.javadoc.stubs.ExceptionTestMavenProjectStub'



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MJAVADOC-763) JavadocReportTest.testExceptions is broken

2023-07-14 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MJAVADOC-763?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17743109#comment-17743109
 ] 

ASF GitHub Bot commented on MJAVADOC-763:
-

elharo commented on code in PR #219:
URL: 
https://github.com/apache/maven-javadoc-plugin/pull/219#discussion_r1263627189


##
src/test/java/org/apache/maven/plugins/javadoc/JavadocReportTest.java:
##
@@ -594,27 +595,6 @@ public void testOptionsUmlautEncoding() throws Exception {
 }
 }
 
-/**
- * @throws Exception if any
- */
-public void testExceptions() throws Exception {
-try {
-Path testPom = 
unit.resolve("default-configuration/exception-test-plugin-config.xml");
-JavadocReport mojo = lookupMojo(testPom);

Review Comment:
   This lookup fails and throws an exception, causing the test to pass. It 
never executes the mojo which is what it's supposed to test.





> JavadocReportTest.testExceptions is broken
> --
>
> Key: MJAVADOC-763
> URL: https://issues.apache.org/jira/browse/MJAVADOC-763
> Project: Maven Javadoc Plugin
>  Issue Type: Bug
>Reporter: Elliotte Rusty Harold
>Priority: Major
>
> The Mojo lookup fails. This is hidden by bad exception handling in the test 
> that catches too broad an exception type. 
> [ERROR] Errors: 
> [ERROR]   
> JavadocReportTest.testExceptions:603->lookupMojo:103->AbstractMojoTestCase.lookupMojo:355->AbstractMojoTestCase.lookupMojo:426
>  » ComponentConfiguration Cannot load implementation hint 
> 'org.apache.maven.plugins.javadoc.stubs.ExceptionTestMavenProjectStub'



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MJAVADOC-763) JavadocReportTest.testExceptions is broken

2023-07-14 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MJAVADOC-763?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17743099#comment-17743099
 ] 

ASF GitHub Bot commented on MJAVADOC-763:
-

michael-o commented on PR #219:
URL: 
https://github.com/apache/maven-javadoc-plugin/pull/219#issuecomment-1635681681

   I don't have an opinion here




> JavadocReportTest.testExceptions is broken
> --
>
> Key: MJAVADOC-763
> URL: https://issues.apache.org/jira/browse/MJAVADOC-763
> Project: Maven Javadoc Plugin
>  Issue Type: Bug
>Reporter: Elliotte Rusty Harold
>Priority: Major
>
> The Mojo lookup fails. This is hidden by bad exception handling in the test 
> that catches too broad an exception type. 
> [ERROR] Errors: 
> [ERROR]   
> JavadocReportTest.testExceptions:603->lookupMojo:103->AbstractMojoTestCase.lookupMojo:355->AbstractMojoTestCase.lookupMojo:426
>  » ComponentConfiguration Cannot load implementation hint 
> 'org.apache.maven.plugins.javadoc.stubs.ExceptionTestMavenProjectStub'



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MJAVADOC-763) JavadocReportTest.testExceptions is broken

2023-07-10 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MJAVADOC-763?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17741569#comment-17741569
 ] 

ASF GitHub Bot commented on MJAVADOC-763:
-

elharo opened a new pull request, #219:
URL: https://github.com/apache/maven-javadoc-plugin/pull/219

   And clean up other tests to prevent accidental pass or fail




> JavadocReportTest.testExceptions is broken
> --
>
> Key: MJAVADOC-763
> URL: https://issues.apache.org/jira/browse/MJAVADOC-763
> Project: Maven Javadoc Plugin
>  Issue Type: Bug
>Reporter: Elliotte Rusty Harold
>Priority: Major
>
> The Mojo lookup fails. This is hidden by bad exception handling in the test 
> that catches too broad an exception type. 
> [ERROR] Errors: 
> [ERROR]   
> JavadocReportTest.testExceptions:603->lookupMojo:103->AbstractMojoTestCase.lookupMojo:355->AbstractMojoTestCase.lookupMojo:426
>  » ComponentConfiguration Cannot load implementation hint 
> 'org.apache.maven.plugins.javadoc.stubs.ExceptionTestMavenProjectStub'



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MJAVADOC-763) JavadocReportTest.testExceptions is broken

2023-07-10 Thread Elliotte Rusty Harold (Jira)


[ 
https://issues.apache.org/jira/browse/MJAVADOC-763?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17741565#comment-17741565
 ] 

Elliotte Rusty Harold commented on MJAVADOC-763:


Yep, this never worked and never tested what it claimed to test:

https://github.com/apache/maven-javadoc-plugin/commit/067c711cd2bc1f744bfabfce226671561714227e

A combination of cargo cult programing, not writing the test first, and bad 
exception management. 

> JavadocReportTest.testExceptions is broken
> --
>
> Key: MJAVADOC-763
> URL: https://issues.apache.org/jira/browse/MJAVADOC-763
> Project: Maven Javadoc Plugin
>  Issue Type: Bug
>Reporter: Elliotte Rusty Harold
>Priority: Major
>
> The Mojo lookup fails. This is hidden by bad exception handling in the test 
> that catches too broad an exception type. 
> [ERROR] Errors: 
> [ERROR]   
> JavadocReportTest.testExceptions:603->lookupMojo:103->AbstractMojoTestCase.lookupMojo:355->AbstractMojoTestCase.lookupMojo:426
>  » ComponentConfiguration Cannot load implementation hint 
> 'org.apache.maven.plugins.javadoc.stubs.ExceptionTestMavenProjectStub'



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MJAVADOC-763) JavadocReportTest.testExceptions is broken

2023-07-10 Thread Elliotte Rusty Harold (Jira)


[ 
https://issues.apache.org/jira/browse/MJAVADOC-763?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17741563#comment-17741563
 ] 

Elliotte Rusty Harold commented on MJAVADOC-763:


not clear this test ever worked:

$ git log --diff-filter=D --summary|grep ExceptionTestMavenProjectStub
(base) ~/maven-javadoc-plugin$ 

> JavadocReportTest.testExceptions is broken
> --
>
> Key: MJAVADOC-763
> URL: https://issues.apache.org/jira/browse/MJAVADOC-763
> Project: Maven Javadoc Plugin
>  Issue Type: Bug
>Reporter: Elliotte Rusty Harold
>Priority: Major
>
> The Mojo lookup fails. This is hidden by bad exception handling in the test 
> that catches too broad an exception type. 
> [ERROR] Errors: 
> [ERROR]   
> JavadocReportTest.testExceptions:603->lookupMojo:103->AbstractMojoTestCase.lookupMojo:355->AbstractMojoTestCase.lookupMojo:426
>  » ComponentConfiguration Cannot load implementation hint 
> 'org.apache.maven.plugins.javadoc.stubs.ExceptionTestMavenProjectStub'



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MJAVADOC-763) JavadocReportTest.testExceptions is broken

2023-07-10 Thread Elliotte Rusty Harold (Jira)


[ 
https://issues.apache.org/jira/browse/MJAVADOC-763?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17741556#comment-17741556
 ] 

Elliotte Rusty Harold commented on MJAVADOC-763:


org.apache.maven.plugins.javadoc.stubs.ExceptionTestMavenProjectStub is missing 
from the project

> JavadocReportTest.testExceptions is broken
> --
>
> Key: MJAVADOC-763
> URL: https://issues.apache.org/jira/browse/MJAVADOC-763
> Project: Maven Javadoc Plugin
>  Issue Type: Bug
>Reporter: Elliotte Rusty Harold
>Priority: Major
>
> The Mojo lookup fails. This is hidden by bad exception handling in the test 
> that catches too broad an exception type. 
> [ERROR] Errors: 
> [ERROR]   
> JavadocReportTest.testExceptions:603->lookupMojo:103->AbstractMojoTestCase.lookupMojo:355->AbstractMojoTestCase.lookupMojo:426
>  » ComponentConfiguration Cannot load implementation hint 
> 'org.apache.maven.plugins.javadoc.stubs.ExceptionTestMavenProjectStub'



--
This message was sent by Atlassian Jira
(v8.20.10#820010)