0

我配置了几个第三方存储库。我知道它们配置正确,因为它正在从它们下载工件。但exec-maven-plugin似乎不承认那些第三方回购。它在 Maven Central 中查找它的依赖项,然后告诉我 POM 不存在。当然不是;它在第三方回购!我需要做一些特别的事情来告诉exec-maven-plugin使用第三方回购吗?

<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>exec-maven-plugin</artifactId>
    <version>1.2.1</version>
    <executions>
        <execution>
            <id>emulation</id>
            <phase>generate-sources</phase>
            <goals>
                <goal>java</goal>
            </goals>
            <configuration>
                <mainClass>krum.jplex.JPlex</mainClass>
                <arguments>
                    <argument>${basedir}/src/main/jplex/EmulationLexer.jplex</argument>
                    <argument>${project.build.directory}/generated-sources/jplex</argument>
                    <argument>${project.build.directory}/generated-resources/jplex</argument>
                </arguments>
                <sourceRoot>${project.build.directory}/generated-sources/jplex</sourceRoot>
                <includePluginDependencies>true</includePluginDependencies>
                <classpathScope>compile</classpathScope>
            </configuration>
        </execution>
    </executions>
    <dependencies>
        <dependency>
            <groupId>com.chalcodes.jplex</groupId>
            <artifactId>JPlex</artifactId>
            <version>1.2.1</version>
        </dependency>
    </dependencies>
</plugin>
4

1 回答 1

0

阅读Using Plugin Dependencies 而不是 Project Dependencies,表明您需要指定以下内容(除了您所拥有的)

<configuration>
      <includeProjectDependencies>false</includeProjectDependencies>
      <includePluginDependencies>true</includePluginDependencies>
      <executableDependency>
        <groupId>com.chalcodes.jplex</groupId>
        <artifactId>1.2.1</artifactId>
      </executableDependency>
...
</configuration
于 2014-07-28T06:37:52.933 回答