Re: Maven javadoc plugin: look for javadoc binary in PATH?

2020-03-25 Thread Antonin Delpeuch (lists)
Thanks, this mechanism of toolchains seems useful, I was not aware of
it. In this particular scenario however, I would prefer to avoid having
to create a symlink manually if possible…

I think it is a fairly reasonable expectation that if a software
component is looking for a binary, it looks for it in the PATH, among
other things.

Best,
Antonin

On 24/03/2020 20:00, Robert Scholte wrote:
> Both stack overflow answers are missing the solution I would choose: 
> toolchain[1] 
> This makes it possible to refer to a different JDKs compared to the runtime 
> JDK used by Maven.
> However, having /usr/bin/javadoc doesn't follow the expected folder 
> structure, because toolchain will look for /bin/javadoc , but you should be 
> able to fix that with symlink I guess
> 
> Robert
> 
> 
> [1] https://maven.apache.org/guides/mini/guide-using-toolchains.html 
> [https://maven.apache.org/guides/mini/guide-using-toolchains.html]
> 
> On 23-3-2020 00:05:35, Antonin Delpeuch (lists)  
> wrote:
> Hi,
> 
> tldr: I am wondering if it would make sense for the Javadoc plugin to
> look for the javadoc binary on the $PATH as well.
> 
> Running the javadoc plugin on a Debian with OpenJDK 12 fails with the
> error: "Unable to find javadoc command: The environment variable
> JAVA_HOME is not correctly set."
> 
> As far as I can tell there is no javadoc binary anywhere in the OpenJDK
> 12 distribution packaged for Debian. But I do have a /usr/bin/javadoc.
> 
> So if the javadoc plugin looked for a javadoc binary in the PATH, it
> would work out of the box on Debian with that JDK.
> 
> This seems to be an issue many people run into:
> 
> https://stackoverflow.com/questions/13961615/unable-to-find-javadoc-command-maven
> 
> https://stackoverflow.com/questions/49472783/maven-is-unable-to-find-javadoc-command
> 
> Should I do a pull request to also look for the binary in the PATH?
> 
> Best wishes,
> 
> Antonin
> 
> 
> 
> -
> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> For additional commands, e-mail: dev-h...@maven.apache.org
> 
> 


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



Re: Maven javadoc plugin: look for javadoc binary in PATH?

2020-03-25 Thread Antonin Delpeuch (lists)
Hi Elliotte,

Thanks! I have done so here, I hope I did not get too many things wrong:
https://issues.apache.org/jira/browse/MJAVADOC-646

Best,
Antonin

On 24/03/2020 20:31, Elliotte Rusty Harold wrote:
> I suggest filing an RFE in the Jira, and perhaps then sending a PR.
> 
> I actually hit this myself yesterday, and it would have been nice if
> the javadoc plugin had found th binary in /usr/bin.
> 
> In general I'm in favor of defense in depth for these sorts of things.
> Check as many places as we know about before failing.
> 
> On Sun, Mar 22, 2020 at 7:05 PM Antonin Delpeuch (lists)
>  wrote:
>>
>> Hi,
>>
>> tldr: I am wondering if it would make sense for the Javadoc plugin to
>> look for the javadoc binary on the $PATH as well.
>>
>> Running the javadoc plugin on a Debian with OpenJDK 12 fails with the
>> error: "Unable to find javadoc command: The environment variable
>> JAVA_HOME is not correctly set."
>>
>> As far as I can tell there is no javadoc binary anywhere in the OpenJDK
>> 12 distribution packaged for Debian. But I do have a /usr/bin/javadoc.
>>
>> So if the javadoc plugin looked for a javadoc binary in the PATH, it
>> would work out of the box on Debian with that JDK.
>>
>> This seems to be an issue many people run into:
>>
>> https://stackoverflow.com/questions/13961615/unable-to-find-javadoc-command-maven
>>
>> https://stackoverflow.com/questions/49472783/maven-is-unable-to-find-javadoc-command
>>
>> Should I do a pull request to also look for the binary in the PATH?
>>
>> Best wishes,
>>
>> Antonin
>>
>>
>>
>> -
>> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
>> For additional commands, e-mail: dev-h...@maven.apache.org
>>
> 
> 


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



Re: Maven javadoc plugin: look for javadoc binary in PATH?

2020-03-24 Thread Elliotte Rusty Harold
I suggest filing an RFE in the Jira, and perhaps then sending a PR.

I actually hit this myself yesterday, and it would have been nice if
the javadoc plugin had found th binary in /usr/bin.

In general I'm in favor of defense in depth for these sorts of things.
Check as many places as we know about before failing.

On Sun, Mar 22, 2020 at 7:05 PM Antonin Delpeuch (lists)
 wrote:
>
> Hi,
>
> tldr: I am wondering if it would make sense for the Javadoc plugin to
> look for the javadoc binary on the $PATH as well.
>
> Running the javadoc plugin on a Debian with OpenJDK 12 fails with the
> error: "Unable to find javadoc command: The environment variable
> JAVA_HOME is not correctly set."
>
> As far as I can tell there is no javadoc binary anywhere in the OpenJDK
> 12 distribution packaged for Debian. But I do have a /usr/bin/javadoc.
>
> So if the javadoc plugin looked for a javadoc binary in the PATH, it
> would work out of the box on Debian with that JDK.
>
> This seems to be an issue many people run into:
>
> https://stackoverflow.com/questions/13961615/unable-to-find-javadoc-command-maven
>
> https://stackoverflow.com/questions/49472783/maven-is-unable-to-find-javadoc-command
>
> Should I do a pull request to also look for the binary in the PATH?
>
> Best wishes,
>
> Antonin
>
>
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> For additional commands, e-mail: dev-h...@maven.apache.org
>


-- 
Elliotte Rusty Harold
elh...@ibiblio.org

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



Re: Maven javadoc plugin: look for javadoc binary in PATH?

2020-03-24 Thread Robert Scholte
Both stack overflow answers are missing the solution I would choose: 
toolchain[1] 
This makes it possible to refer to a different JDKs compared to the runtime JDK 
used by Maven.
However, having /usr/bin/javadoc doesn't follow the expected folder structure, 
because toolchain will look for /bin/javadoc , but you should be able to fix 
that with symlink I guess

Robert


[1] https://maven.apache.org/guides/mini/guide-using-toolchains.html 
[https://maven.apache.org/guides/mini/guide-using-toolchains.html]

On 23-3-2020 00:05:35, Antonin Delpeuch (lists)  
wrote:
Hi,

tldr: I am wondering if it would make sense for the Javadoc plugin to
look for the javadoc binary on the $PATH as well.

Running the javadoc plugin on a Debian with OpenJDK 12 fails with the
error: "Unable to find javadoc command: The environment variable
JAVA_HOME is not correctly set."

As far as I can tell there is no javadoc binary anywhere in the OpenJDK
12 distribution packaged for Debian. But I do have a /usr/bin/javadoc.

So if the javadoc plugin looked for a javadoc binary in the PATH, it
would work out of the box on Debian with that JDK.

This seems to be an issue many people run into:

https://stackoverflow.com/questions/13961615/unable-to-find-javadoc-command-maven

https://stackoverflow.com/questions/49472783/maven-is-unable-to-find-javadoc-command

Should I do a pull request to also look for the binary in the PATH?

Best wishes,

Antonin



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