Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JDK21: error: invalid flag: -basePackage #5

Closed
manticore-projects opened this issue Jan 14, 2025 · 4 comments
Closed

JDK21: error: invalid flag: -basePackage #5

manticore-projects opened this issue Jan 14, 2025 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@manticore-projects
Copy link
Owner

error: invalid flag: -basePackage
@manticore-projects manticore-projects self-assigned this Jan 14, 2025
@manticore-projects manticore-projects added the bug Something isn't working label Jan 14, 2025
This was referenced Feb 3, 2025
Closed
@manoelcampos
Copy link
Collaborator

This parameter is not being used anywhere. I don't know what it is expected to do since the docs don't make it clear.

@manticore-projects
Copy link
Owner Author

manticore-projects commented Feb 4, 2025

This parameter is not being used anywhere. I don't know what it is expected to do since the docs don't make it clear.

It is used to trim the package names in the generated output, e.g. to translate com.manticore.tools.xml-doclet.* to xml-doclet.* when setting -basePackage "com.manticore.tools".
Also, please lets use com.manticore instead of com.manticoreprojects because this is the maven registration -- and we have enough name chaos already around this package.

In my projects, the Doclet call looks like:

tasks.register('xmldoc', Javadoc) {
    
    source = sourceSets.main.allJava
    // beware: Gradle deletes this folder automatically and there is no switch-off
    destinationDir = reporting.file("xmlDoclet")
    options.docletpath = configurations.xmlDoclet.files as List
    options.doclet = "com.github.markusbernhardt.xmldoclet.XmlDoclet"
    title = "API $version"
    options.addBooleanOption("rst", true)
    options.addBooleanOption("withFloatingToc", Boolean.parseBoolean(System.getenv().getOrDefault("FLOATING_TOC", "true")))
    options.addStringOption("basePackage", "net.sf.jsqlparser")
    options.addStringOption("filename", outFile.getName())

}

Here is a good illustration: https://manticore-projects.com/XMLDoclet/javadoc.html
You can see, that output is left-trimmed by basePackage.

@manoelcampos
Copy link
Collaborator

It is used to trim the package names in the generated output, e.g. to translate com.manticore.tools.xml-doclet.* to xml-doclet.* when setting -basePackage "com.manticore.tools".

I see. Thanks.

Also, please lets use com.manticore instead of com.manticoreprojects because this is the maven registration -- and we have enough name chaos already around this package.

Sure. I’ll change it latter today.

@manticore-projects
Copy link
Owner Author

Everything I have tested so far is working just fine. Lets see what the real world will say after release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants