This works for me. A known issue it's that it won't work under Mac as
the jdk tools doesn't exist, but I believe it's only needed when
iiop=true
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>process-classes</phase>
<configuration>
<tasks>
<echo>Running rmic</echo>
<rmic base="${project.build.directory}/classes"
classname="org.springframework.remoting.rmi.RmiInvocationWrapper"/>
<rmic base="${project.build.directory}/classes"
classname="org.springframework.remoting.rmi.RmiInvocationWrapper"
iiop="true">
<classpath refid="maven.compile.classpath"/>
</rmic>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<scope>system</scope>
<version>1.4</version>
<systemPath>${java.home}/../lib/tools.jar</systemPath>
</dependency>
</dependencies>
</plugin>
On 3/13/06, James Carman <[EMAIL PROTECTED]> wrote:
> All,
>
> Has anyone got RMIC to work using Maven2? Jakarta Commons Proxy's test
> cases need to generate RMIC stubs, but I can't get it working. It keeps
> complaining about either JAVA_HOME or CLASSPATH issues. There are
> complaints out there on the forums about it, but I didn't really see a good
> work-around. Here's the relevant part of the pom.xml file:
>
> <plugins>
> <plugin>
> <artifactId>maven-antrun-plugin</artifactId>
> <executions>
> <execution>
> <id>generate-rmic-stubs</id>
> <phase>test-compile</phase>
> <configuration>
> <tasks>
> <property environment="env"/>
> <path id="rmic.classpath">
> <fileset dir="${java.home}/lib">
> <include name="tools.jar"/>
> </fileset>
> </path>
>
> <mkdir dir="target/test-classes"/>
> <rmic base="target/test-classes" includes="**/RmiEchoImpl.class"
> classpathref="rmic.classpath"/>
> </tasks>
> </configuration>
> <goals>
> <goal>run</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
> </plugins>
>
> James
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
I could give you my word as a Spaniard.
No good. I've known too many Spaniards.
-- The Princess Bride
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]