0

I have a couple of third-party repos configured. I know they're configured correctly because it's downloading artifacts from them. But exec-maven-plugin doesn't seem to recognize those third-party repos. It looks for its dependency in Maven Central and then tells me the POM doesn't exist there. Of course it doesn't; it's in the third party repo! Do I need to do something special to tell exec-maven-plugin to use the third-party repo?

<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>
Kevin Krumwiede
  • 9,868
  • 4
  • 34
  • 82
  • exec-maven-plugin only deal with program execution, it doesn't manage the dependencies for you. Did you run it on the same exact environment? (Same PC, jdk version etc) – gerrytan Jul 28 '14 at 03:55
  • The POM that contains this plugin tag successfully downloads other dependencies from the same third-party repo where exec-maven-plugin should be finding its dependency. – Kevin Krumwiede Jul 28 '14 at 04:48
  • Are you saying that the dependency tag here has no effect, and I should put it elsewhere? – Kevin Krumwiede Jul 28 '14 at 04:50

1 Answers1

0

A reading of Using Plugin Dependencies instead of Project Dependencies, indicates you will need to specify the following (in addition to what you have)

<configuration>
      <includeProjectDependencies>false</includeProjectDependencies>
      <includePluginDependencies>true</includePluginDependencies>
      <executableDependency>
        <groupId>com.chalcodes.jplex</groupId>
        <artifactId>1.2.1</artifactId>
      </executableDependency>
...
</configuration
Raghuram
  • 51,854
  • 11
  • 110
  • 122