Свойство подключаемого модуля Maven, помеченное как «Элемент .. здесь не разрешено» в Intellij - PullRequest
0 голосов
/ 26 июня 2018

Я создал собственный плагин 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>

Где отмечен параметр: enter image description here

Пакет Maven работает, но меня это как-то беспокоит.

Кто-нибудь может подсказать, что я могу сделать, чтобы преодолеть ошибку!

РЕДАКТИРОВАТЬ: я добавил весь pom.xml, это модуль parent. Родитель имеет только три объявленных модуля и управление плагином с помощью maven-compile-plugin

...