commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Carman" <ja...@carmanconsulting.com>
Subject RE: [all] Maven2/RMIC?
Date Thu, 13 Apr 2006 00:03:06 GMT
I need to run the RMIC compiler after the test classes are compiled, but
there is no (not yet at least) process-test-classes phase.  Has anyone been
able to RMIC compile a test class?


-----Original Message-----
From: carlossg@gmail.com [mailto:carlossg@gmail.com] On Behalf Of Carlos
Sanchez
Sent: Monday, March 13, 2006 8:39 PM
To: Jakarta Commons Developers List
Subject: Re: [all] Maven2/RMIC?

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 <james@carmanconsulting.com> 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: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>
>


--
I could give you my word as a Spaniard.
No good. I've known too many Spaniards.
                             -- The Princess Bride

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message