Comments (5)
Thank you for the investigation.
I looked into this and there seems to be something already setting the 'headless' state before the doclet class even gets loaded:
public class UMLDoclet extends StandardDoclet {
static {
System.setProperty("java.awt.headless", "true");
}
// ...
public UMLDoclet() {
super();
this.config = new DocletConfig();
System.out.println("Headless? java.awt.headless=" + System.getProperty("java.awt.headless")
+ ", GraphicsEnvironment.isHeadless()=" + java.awt.GraphicsEnvironment.isHeadless());
}
}
Results in: Headless? java.awt.headless=true, GraphicsEnvironment.isHeadless()=false
The java module system also prevents us from using filthy reflection tools to try manipulate the private static GraphicsEnvironment.headless
field directly.
Do you have other suggestions that will autoconfigure the built-in PlantUML behave decently?
from umldoclet.
Perhaps the maven javadoc plugin could (/should) set this system property by default?
I can't imagine any usecase for running anything non-headless from the javadoc plugin.
from umldoclet.
Results in: Headless? java.awt.headless=true, GraphicsEnvironment.isHeadless()=false
Okay, that may have been a bit premature running tests from my IDE 🫣.
Commandline maven gives me:
[INFO] --- maven-javadoc-plugin:3.6.3:jar (attach-javadocs) @ umldoclet ---
[INFO] No previous run data found, generating javadoc.
[INFO]
Headless? java.awt.headless=true, GraphicsEnvironment.isHeadless()=true
I'll create a version where I set the java.awt.headless
system property directly when loading the doclet class (first 'contact' UMLDoclet gets). It won't hurt and might even fix the issue. 🤞
from umldoclet.
@arthurvl Could you please check whether the problem still exists with version 2.1.2
?
from umldoclet.
Closing this issue to lack of activity. @arthurvl feel free to re-open if you still experience this issue with the latest version.
from umldoclet.
Related Issues (20)
- Upgrading spring boot service from java 8 to java 11 gives error regarding the UMLDoclet HOT 7
- Failure to generate UML diagrams and SVG HOT 11
- Using JDK-16 package.svg graphics are not shown on package-summary pages, although graphics do get generated HOT 1
- Fix UML diagram locations for java modules HOT 1
- How to set TypeDisplay.NONE? HOT 6
- Sharing a Gradle Kotlin DSL configuration HOT 2
- Dot Executable: null on windows when GRAPHVIZ_DOT not declared HOT 8
- Override option for SVG Object Tags HOT 6
- <umlImageFormat>png</umlImageFormat> not working HOT 2
- Add support for PlantUML server HOT 3
- Document how to include custom plantuml diagrams into generated javadoc HOT 4
- Is there a way to backport the styling from v2 to v1? HOT 15
- NPE on some package level images HOT 2
- Documentation of additionalOptions HOT 7
- Regular Doclet logging turns up as warnings in maven
- Allow provide additional plantUML options(rendern with Smetana) HOT 4
- No connection is drawn for return value types HOT 2
- Enable "-link" option multiple times HOT 1
- Diagrams not always included in HTML
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from umldoclet.