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

Marco Brandizi commented on MJAVADOC-818:
-----------------------------------------

OK, it's not a major thing, just a few Bash commands to add to CI scripts.

A reason for making it configurable, beside the fact 'apidocs' is a bad name, 
is that one might already have many projects that produce 'javadocs' and many 
web pages that link to them. So, it's not really just vanity.

Also, hardcoding a constant like that is poor practice, if another plug-in 
relies on that, this dir name could still have a modifiable default and the 
documentation could say another plug-in depends on that default. Those who 
don't use the site plug-in wouldn't need to concern about the dependency. In 
fact, I don't use it, cause I have my own ways to create the same reports.

Thanks anyway.

> Make the 'apidocs' output directory changeable 
> -----------------------------------------------
>
>                 Key: MJAVADOC-818
>                 URL: https://issues.apache.org/jira/browse/MJAVADOC-818
>             Project: Maven Javadoc Plugin
>          Issue Type: New Feature
>    Affects Versions: 3.10.1
>         Environment: Apache Maven 3.9.9 
> (8e8579a9e76f7d015ee5ec7bfcdc97d260186937)
> Maven home: /usr/local/Cellar/maven/3.9.9/libexec
> Java version: 21.0.4, vendor: Eclipse Adoptium, runtime: 
> /Library/Java/JavaVirtualMachines/temurin-21.jdk/Contents/Home
> Default locale: en_GB, platform encoding: UTF-8
> OS name: "mac os x", version: "15.0.1", arch: "x86_64", family: "mac"
>            Reporter: Marco Brandizi
>            Priority: Major
>             Fix For: waiting-for-feedback
>
>
> I've just switched to the Javadoc plug-in 3.10.1 and I see that I can still 
> set my outputDirectory, but the 'apidocs/' tail is always added to whatever 
> path I define with this option. Same for reportOutputDirectory. Eg, if I say 
> outputDirectory = target/javadoc, it creates target/javadoc/apidocs/*, 
> not target/javadoc/* 
> Before, I was using 3.6.2 and I could do this:
> {\{In the POM}}
> {{<destDir>javadoc</destDir>}}
> And then:
> {{mvn javadoc:javadoc -DreportOutputDirectory=doc}}
>  With the result that the javadocs/* were created into <project 
> home>/javadoc/*.
> Now I can see that the string "apidocs" is hardcoded in the plug-in source, 
> so I guess there is no way to change it, it's only possible to relocate it. I 
> would like to be able to change it, mostly because a Java library is not the 
> same as an API.



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

Reply via email to