You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Ryan, Scott" <Sc...@echostar.com> on 2004/12/28 18:23:15 UTC

Eclipse Source when EJB's are used

I am trying to include EJB implementation source code in my eclipse projects
for web projects that only use the client jars.  I have the several web
projects that access EJB's via their home and remote interfaces.  In the
project XML I include a dependency for the jar version of the artifact which
resolves to the client jar.  I have created source zip files that include
both the client code as well as the implementation code.  

The problem is that when I include the sources in the .classpath entry
Eclipse only lets me see the source code for the client jar rather than the
implementation code.  If I was able to see the implementation code I could
set breakpoints and debug within the implementation code.  If I include the
deployment jar (ejb) then my war is built with the incorrect jar.  

I extended the eclipse plugin to support downloading of the source code and
inclusion into the .classpath.  I tried to reference the dependency twice
but the system ignores any duplicates.  

Any input would be appreciated.  Here is my sample project.xml with
duplicates.

<dependency>
    <groupId>group1</groupId>
    <artifactId>api-ejb</artifactId>
    <version>3.0.1.0</version>
    <type>jar</type>
    <properties>
        <war.bundle>true</war.bundle>
    </properties>
</dependency>
<dependency>
    <groupId>group1</groupId>
    <artifactId>api-ejb</artifactId>
    <version>3.0.1.0</version>
    <type>ejb</type>
    <properties>
        <eclipse.source>true</eclipse.source>
    </properties>
</dependency>

Scott Damon Ryan
Developer
(720) 514-5389
Scott.Ryan@echostar.com

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


Re: Eclipse Source when EJB's are used

Posted by Mark McBride <mc...@llnl.gov>.
If I understand you're problem correctly you need to tell your ejb 
container to keep the source
code it generates when it compiles your ejbs and creates the containers 
implementation that includes
such things as tx management etc.

For oc4j/orion I use the -DKeepWrapperCode=true to tell oc4j to not discard 
the source files
when compiling my ejb's. The source files then end up in the base eclipse 
project. You'll need to refresh your workspace to see them.

This method of keeping the ejb generated source is probably different for 
each ejb container.

Hope this helps.

-Mark

At 09:23 AM 12/28/2004, Ryan, Scott wrote:
>I am trying to include EJB implementation source code in my eclipse projects
>for web projects that only use the client jars.  I have the several web
>projects that access EJB's via their home and remote interfaces.  In the
>project XML I include a dependency for the jar version of the artifact which
>resolves to the client jar.  I have created source zip files that include
>both the client code as well as the implementation code.
>
>The problem is that when I include the sources in the .classpath entry
>Eclipse only lets me see the source code for the client jar rather than the
>implementation code.  If I was able to see the implementation code I could
>set breakpoints and debug within the implementation code.  If I include the
>deployment jar (ejb) then my war is built with the incorrect jar.
>
>I extended the eclipse plugin to support downloading of the source code and
>inclusion into the .classpath.  I tried to reference the dependency twice
>but the system ignores any duplicates.
>
>Any input would be appreciated.  Here is my sample project.xml with
>duplicates.
>
><dependency>
>     <groupId>group1</groupId>
>     <artifactId>api-ejb</artifactId>
>     <version>3.0.1.0</version>
>     <type>jar</type>
>     <properties>
>         <war.bundle>true</war.bundle>
>     </properties>
></dependency>
><dependency>
>     <groupId>group1</groupId>
>     <artifactId>api-ejb</artifactId>
>     <version>3.0.1.0</version>
>     <type>ejb</type>
>     <properties>
>         <eclipse.source>true</eclipse.source>
>     </properties>
></dependency>
>
>Scott Damon Ryan
>Developer
>(720) 514-5389
>Scott.Ryan@echostar.com
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>For additional commands, e-mail: users-help@maven.apache.org