Java 自己的Maven插件属性标记为;元素。。“此处不允许使用”;在Intellij中

Java 自己的Maven插件属性标记为;元素。。“此处不允许使用”;在Intellij中,java,intellij-idea,maven-plugin,Java,Intellij Idea,Maven Plugin,我创建了自己的maven插件: @Mojo(name = "build") public class InstallerBuilder extends AbstractMojo { @Parameter(property = "installerBuilderApplication", required = true) private File installerBuilderApplication; public void execute() throws Mojo

我创建了自己的maven插件:

@Mojo(name = "build")
public class InstallerBuilder extends AbstractMojo {

    @Parameter(property = "installerBuilderApplication", required = true)
    private File installerBuilderApplication;

    public void execute() throws MojoExecutionException, MojoFailureException {

        getLog().info("installerBuilderApplication: " + installerBuilderApplication);

        if (!installerBuilderApplication.isFile()) {
            getLog().error("Please ceheck [installerBuilderApplication] argument is correct.");
            throw new MojoExecutionException("Application for installer builder is not a file [" + installerBuilderApplication.getName() + "]");
        }
    }
}
我正在其他maven项目中使用它,如:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <parent>
        <artifactId>company-installer</artifactId>
        <groupId>com.company.lsg</groupId>
        <version>0.0.1-SNAPSHOT</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>lsg-installer-builder</artifactId>
    <name>LSG Installer and Patches Build</name>

    <build>
        <plugins>
            <plugin>
                <groupId>com.company.lsg</groupId>
                <artifactId>lsg-installer-maven-plugin</artifactId>
                <version>0.0.1-SNAPSHOT</version>
                <configuration>
                    <installerBuilderApplication>${basedir}/src/installer/builder_app/NSISPortable/App/NSIS/makensis.exe</installerBuilderApplication>
                    <installerBase>C:\LSG\Generic_Installer</installerBase>
                </configuration>
                <executions>
                    <execution>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>build</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <!-- inherits config from parent: can override if required -->
            </plugin>
        </plugins>
    </build>

</project>

Maven软件包很管用,但不知怎的,它让我很困扰

谁能建议我能做些什么来克服这个错误


编辑:我添加了整个pom.xml,它是父级的一个模块。Parent只声明了三个模块,pluginmanagement with maven compile plugin

能否显示pom.xml文件的开头?我添加了wohle pom.xml确保插件可以从编辑器中解析,并且指定了版本。尝试更新索引。插件可以工作(如果我不提供参数,至少会失败)。我做了:设置->..->Maven->存储库->更新,但这也没有帮助