You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Trenton Adams <tr...@trentonadams.ca> on 2008/04/01 04:03:39 UTC
Re: rmic-maven-plugin issues
How do I document this for the plugin?
The plugin should probably default to including interfaces that
implement "Remote" in the rmi-classes, so that a person doesn't have to
write a plugin configuration for rmic-maven-plugin. But, here's what I
added to "<build><plugins></plugins></build>".
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>rmic-maven-plugin</artifactId>
<executions>
<execution>
<id>rmi package</id>
<phase>package</phase>
<goals>
<goal>package</goal>
</goals>
<configuration>
<outputDirectory>${project.build.outputDirectory}</outputDirectory>
<includes>
<include>**/*_Stub*</include>
<include>**/Interface*</include>
</includes>
</configuration>
</execution>
<execution>
<id>rmi compilation</id>
<goals>
<goal>rmic</goal>
</goals>
<configuration>
<outputDirectory>${project.build.outputDirectory}</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
I was also able to resolve the rmi-client dependency, by using a
classifier like so (see the commented section)...
<dependency>
<groupId>ca.company.application</groupId>
<artifactId>rmi</artifactId>
<version>0.1.0-SNAPSHOT</version>
<!--<classifier>client</classifier>-->
<scope>compile</scope>
</dependency>
If you leave the classifier commented out, you can do an in process RMI
server, as it will resolve the full rmi.jar. Which is what I do for
development.
Trenton Adams wrote:
> Hi guys,
>
> I'm attempting to build an RMI client/server JAR. It doesn't appear
> to be making the client JAR correctly, because it doesn't include the
> interfaces of my RMI objects. The server JAR turns out just fine, and
> has all classes, which is exactly what I want.
>
> I also want to know how I'm supposed to get the client JAR in as a
> dependency to another project. When I put the rmi project as a
> dependency, it pulls in the full RMI server JAR.
>
> I also noticed that there is an error in the documentation under the
> "Using the package goal" section. The excludes need to be inside of a
> "configuration" element.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org