[ https://issues.apache.org/jira/browse/MPLUGIN-476?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Slawomir Jaranowski closed MPLUGIN-476. --------------------------------------- Resolution: Information Provided > Cannot invoke "com.thoughtworks.qdox.model.JavaField.getName()" because > "field" is null > --------------------------------------------------------------------------------------- > > Key: MPLUGIN-476 > URL: https://issues.apache.org/jira/browse/MPLUGIN-476 > Project: Maven Plugin Tools > Issue Type: New Feature > Components: Plugin Plugin > Affects Versions: 3.9.0 > Reporter: Ernst Reissner > Priority: Major > > 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. -- This message was sent by Atlassian Jira (v8.20.10#820010)