You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by awolf_ccc <An...@cable.comcast.com> on 2010/01/19 21:16:20 UTC

exec-maven-plugin: Dependency in POM causes IAE

Hi,
  I am using the "exec-maven" plugin from codehaus,and it seems that there
is problem with the "exec:java" goal's JAR dependency resolution. Or (since
I'm a new user) I'm doing something wrong. Comments welcome!!

  Here is the scenario:

  (A) I build an application tool, packaged into a JAR file, and it has its
own project POM (TestDep);
  (B) I want to run the tool during "generate-sources" in another project
(TestApp);
     (1) I add these lines to the TestApp POM:

        <build>
          <plugins>
                 ...
            <plugin>
              <groupId>org.codehaus.mojo</groupId>
              <artifactId>exec-maven-plugin</artifactId>
              <dependencies>
                  ... GAV of project (TestDep)
              </dependencies>
              <executions>
                 <execution>
                 <phase>generate-sources</phase>
                 <goals>
                   <goal>java</goal>
                 </goals>
                 <configuration>
                     <executableDependency>
                        ... GAV of project (TestDep)
                     </executableDependency>
                     <mainClass>testDep.TestClass</mainClass>
                    
<includePluginDependencies>true</includePluginDependencies>
                    
<includeProjectDependencies>false</includeProjectDependencies>
                  </configuration>
                </execution>
              </executions>
            <plugin>
                 ...
          <plugins>
        </build>

All this works just great... until I add a dependency into the POM for the
TestDep build:

  (2)
    <project ...>
      ...
      <dependencies>
        <dependency>
          <groupId>org.apache.maven</groupId>
          <artifactId>maven-ant-task</artifactId>
          <version>2.0.10</version>
          <scope>compile</scope>
        </dependency>
      </dependencies>
      ...
    </project>

As soon as this is recorded and installed in the TestDep's POM, the
exec:java goal fails with an IAE (IllegalArgumentException) at
  sun.reflect.UnsafeObjectFieldAccessorImpl.set(...)

I did not see any other postings mentioning this kind of problem. I have the
test project's source and POM files ready to be posted to JIRA, but maybe
somebody has some words of wisdom before I do that.

Thanks!!
-- 
View this message in context: http://old.nabble.com/exec-maven-plugin%3A-Dependency-in-POM-causes-IAE-tp27231970p27231970.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org