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

Cannot invoke "com.thoughtworks.qdox.model.JavaField.getName()" because "field" is null #157

Open
Reissner opened this issue Jul 26, 2023 · 0 comments

Comments

@Reissner
Copy link

I write a plugin (https://github.com/Reissner/latex-maven-plugin)
and mvn clean deploy results in following message:

[INFO] — plugin:3.9.0:descriptor (default-descriptor) @ latex-maven-plugin —
[INFO] Using 'UTF-8' encoding to read mojo source files.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14.056 s
[INFO] Finished at: 2023-06-22T09:29:29+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-plugin-plugin:3.9.0:descriptor (default-descriptor) on project latex-maven-plugin: Execution default-descriptor of goal org.apache.maven.plugins:maven-plugin-plugin:3.9.0:descriptor failed: Cannot invoke "com.thoughtworks.qdox.model.JavaField.getName()" because "field" is null -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

After long search (1 night) I found the following 'reason':

package eu.simuline.m2latex.core;
public enum Target {
txt() {
private final String TXT_OUTPUT_FILES = "^T$T
.txt$";

// may throw BuildFailureException TEX01
public void processSource(LatexProcessor latexProcessor,
LatexMainDesc desc) throws BuildFailureException

{ latexProcessor.processLatex2txt(desc); }
public String getPatternOutputFiles(Settings settings)

{ return "^T$T\\.txt$"; }
}, ...;
...
}

Removing the line

private final String TXT_OUTPUT_FILES = "^T$T.txt$";

'resolves' the problem.
I feel this could indicate not just a bug but a conceptual flaw.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant