[
https://issues.apache.org/jira/browse/PDFBOX-5396?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tim Allison updated PDFBOX-5396:
--------------------------------
Description:
I recently stubbed my toe on this one again. At least in the 2.x branch, the
module fontbox requires that the JAVA_HOME variable be set. If it isn't set,
the project build fails in fontbox without any meaningful indication as to why,
even with the -X option set in maven.
{noformat}
(default-compile) on project fontbox: Compilation failure -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to
execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.0:compile
(default-compile) on project fontbox: Compilation failure
at org.apache.maven.lifecycle.internal.MojoExecutor.execute
{noformat}
Also, on our website, there's no mention that JAVA_HOME should be set. And,
yes, I realize that it is set on most developers' systems. :D
One solution would be to add this rule to the maven-enforcer-plugin
configuration in the parent pom:
{code:java}
<requireEnvironmentVariable>
<variableName>JAVA_HOME</variableName>
<message>The JAVA_HOME environment variable must be set!</message>
</requireEnvironmentVariable>
{code}
If this is ok, I'll add this rule in 2.x and see if I get the same behavior in
trunk.
Side note: This was probably the cause of:
https://www.mail-archive.com/[email protected]/msg11423.html and a few
other issues.
was:
I recently stubbed my toe on this one again. At least in the 2.x branch, the
module fontbox requires that the JAVA_HOME variable be set. If it isn't set,
the project build fails in fontbox without any meaningful indication as to why,
even with the -X option set in maven.
{noformat}
(default-compile) on project fontbox: Compilation failure -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to
execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.0:compile
(default-compile) on project fontbox: Compilation failure
at org.apache.maven.lifecycle.internal.MojoExecutor.execute
{noformat}
Also, on our website, there's no mention that JAVA_HOME should be set. And,
yes, I realize that it is set on most developers' systems. :D
One solution would be to add this rule to the maven-enforcer-plugin
configuration in the parent pom:
{code:java}
<requireEnvironmentVariable>
<variableName>JAVA_HOME</variableName>
<message>The JAVA_HOME environment variable must be
set!</message></requireEnvironmentVariable>
{code}
If this is ok, I'll add this rule in 2.x and see if I get the same behavior in
trunk.
Side note: This was probably the cause of:
https://www.mail-archive.com/[email protected]/msg11423.html and a few
other issues.
> Add maven enforcer rule to ensure that JAVA_HOME is set
> -------------------------------------------------------
>
> Key: PDFBOX-5396
> URL: https://issues.apache.org/jira/browse/PDFBOX-5396
> Project: PDFBox
> Issue Type: Task
> Affects Versions: 2.0.25
> Reporter: Tim Allison
> Priority: Trivial
>
> I recently stubbed my toe on this one again. At least in the 2.x branch, the
> module fontbox requires that the JAVA_HOME variable be set. If it isn't set,
> the project build fails in fontbox without any meaningful indication as to
> why, even with the -X option set in maven.
> {noformat}
> (default-compile) on project fontbox: Compilation failure -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to
> execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.0:compile
> (default-compile) on project fontbox: Compilation failure
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute
> {noformat}
> Also, on our website, there's no mention that JAVA_HOME should be set. And,
> yes, I realize that it is set on most developers' systems. :D
> One solution would be to add this rule to the maven-enforcer-plugin
> configuration in the parent pom:
> {code:java}
> <requireEnvironmentVariable>
> <variableName>JAVA_HOME</variableName>
> <message>The JAVA_HOME environment variable must be set!</message>
> </requireEnvironmentVariable>
> {code}
> If this is ok, I'll add this rule in 2.x and see if I get the same behavior
> in trunk.
> Side note: This was probably the cause of:
> https://www.mail-archive.com/[email protected]/msg11423.html and a few
> other issues.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]