aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Problem in Maven2 pom for converting ejb2.1 project into sources. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Problem in Maven2 pom for converting ejb2.1 project into sources. " Watch "Problem in Maven2 pom for converting ejb2.1 project into sources. " New topic
Author

Problem in Maven2 pom for converting ejb2.1 project into sources.

Conan King
Greenhorn

Joined: Aug 31, 2003
Posts: 23
Hi

I have a strange problem, Am trying to build a ejb 2.1 project in maven. we use Weblogic 9.2 server and the ejb components use annotations.

Using Ant build xml the following code runs fine and generates the home and remote interfaces:

<path id="dependencyfinder">
<pathelement location="${BEA_HOME}/jdk150_06/lib/tools.jar"/>
<pathelement location="${BEA_HOME}/weblogic92/server/lib/weblogic.jar"/>
<pathelement location="${BEA_HOME}/weblogic92/server/lib/webservices.jar"/>
<pathelement location="${BEA_HOME}/weblogic92/server/lib/wls-api.jar"/>
<pathelement location="${BEA_HOME}/weblogic92/server/lib/api.jar"/>
</path>



<taskdef name="ejbgen" classname="com.bea.wls.ejbgen.ant.EJBGenAntTask">
<classpath refid="dependencyfinder"/>
</taskdef>
<target name="ejb-generate">
<ejbgen source="1.5" outputDir = "C:\workspace\eclipseworkspace\demoEJB\testEJB\.apt_src"
descriptorDir = "C:\workspace\eclipseworkspace\demoEJB\testEJB\src\main\java\META-INF"
forceGeneration = "true">

<fileset dir="C:\workspace\eclipseworkspace\demoEJB\testEJB\src\main\java" includes="**/*Bean.java" />
</ejbgen>
</target>


However the same thing called from maven gives compilation errors due to annotations:

Maven code:


<configuration>
<tasks>

<path id="dependencyfinder">
<pathelement location="${BEA_HOME}/jdk150_06/lib/tools.jar"/>
<pathelement location="${BEA_HOME}/weblogic92/server/lib/weblogic.jar"/>
<pathelement location="${BEA_HOME}/weblogic92/server/lib/webservices.jar"/>
<pathelement location="${BEA_HOME}/weblogic92/server/lib/wls-api.jar"/>
<pathelement location="${BEA_HOME}/weblogic92/server/lib/api.jar"/>
</path>

<taskdef name="ejbgen" classname="com.bea.wls.ejbgen.ant.EJBGenAntTask">
<classpath refid="dependencyfinder"/>
</taskdef>
<echo message="!!!EJBGEN - REMOTE / HOME GENERATION!!!"/>

<ejbgen source="1.5" outputDir = "${basedir}\.apt_src"
descriptorDir = "${basedir}\src\main\java\META-INF"
forceGeneration = "true">

<fileset dir="${basedir}\src\main\java" includes="**/*Bean.java" />
</ejbgen>

</tasks>
</configuration>

The error given is like this:

[JAM] Error: unexpected exception thrown:
com.bea.util.jam.internal.javadoc.JavadocParsingException: Parsing failure in C:\workspace\eclipseworkspace\demoEJB
.java at line 18. Most likely, an annotation is declared whose type has not been imported.

If anybody has faced such problems with annotations in ejb projects in WL 9.2 please let me know.


King<br /> <br />SCJP 1.4, SCWCD 1.4
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
Look, I'm a fan of Robert E. Howard too. But maybe you missed our JavaRanch display name policy. If you must hide your real identity, choose something less obvious. Thanks.


"I'm not back." - Bill Harding, Twister
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem in Maven2 pom for converting ejb2.1 project into sources.