[
http://jira.codehaus.org/browse/MEXEC-19?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_89105
]
Julien HENRY commented on MEXEC-19:
-----------------------------------
Here is my usage of the plugin:
I have a multimodule project.
* Module A is a parser generator based on javacc. The artifact produced by A
(say generator.jar) take one Java source file as input and produce another Java
source file as output.
* Module B need to use A as a mean to generate source code
In the pom of module B, I have :
{code:title=pom.xml|borderStyle=solid}
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>java</goal>
</goals>
<configuration>
<sourceRoot>
${project.build.directory}/generated-sources/main/java
</sourceRoot>
</configuration>
</execution>
</executions>
<configuration>
<mainClass>
net.sourceforge.jwebunit.javacc.WebTestCaseGenerator
</mainClass>
<arguments>
<argument>${basedir}/src/main/java</argument> <!-- Where are input sources -->
<argument>
${project.build.directory}/generated-sources/main/java <!-- Where should be put
output sources -->
</argument>
</arguments>
<includePluginDependencies>
true
</includePluginDependencies>
<includeProjectDependencies>
false
</includeProjectDependencies>
</configuration>
<dependencies>
<dependency>
<groupId>net.sourceforge.jwebunit</groupId>
<artifactId>
jwebunit-webtestcase-generator <!-- module A -->
</artifactId>
<version>1.4</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
{code}
I wasn't aware of exec:java was adding target/classes to the classpath, but I
really don't need this, and I really don't want it to bind the process-classes
phase.
If someone need this feature, I'm sorry you will have to add a new flag...
> exec:java plugin should bind to the process-classes phase
> ---------------------------------------------------------
>
> Key: MEXEC-19
> URL: http://jira.codehaus.org/browse/MEXEC-19
> Project: Mojo Exec Plugin
> Issue Type: Improvement
> Affects Versions: 1.1
> Environment: maven-exec-plugin-1.1-SNAPSHOT
> Reporter: Ryan Sonnek
> Priority: Trivial
>
> the exec:java plugin uses adds target/classes to the classpath, but relies on
> the user to run a specific maven goal (ex: install, compile, etc) before
> running the plugin. It would be better if the exec:java plugin automatically
> bound to the process-classes phase to always compile the classes in need.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email