Discussion:
[Middlegen-user] Starting with middlegen is difficult. samples/build.xml don't build.
abc def
2002-05-11 16:42:05 UTC
Permalink
Hello middlegen gurus,

I have been struggling with compiling middlegen.


I could get the middlegen/build.xml to compile before (and the latest CVS
ones compile no problem). But samples/build still has problems.

0. I started to use ant_1.4.1 . The docs/ant.html seems to suggest using
samples/lib/ant.jar. But isn't ant_1.4.1 sufficient (this is the latest
available one, 1.5 is beta)? If ant_1.4.1 isn't sufficient, how do I start
ant from a jar file only (like
java -D....... middlegen )?


1. Target middlegen complains "taskdef class middlegen.MiddlegenTask cannot
be found". The latest samples/build appends java.class.path to classpath of
samples/lib/*.jar files, hence I assume CLASSPATH env variable at the
commandline that "ant middlegen" is issued should have "..\build\classes".
But still don't compile.


2. The target create-database seems to be missing following 2 lines:
<target name="create-database" description="Create database">
<property name="gotclasspath" refid="classpath"/> <!-- baseAdd -->
<sql
................
classpath="${gotclasspath}" <!-- this one -->
onerror="continue" <!-- and this -->
/>


3. Is following part of samples/build.xml really handled in the code ?
Because I didn't see create for it.
<cmp20
package="${name}.ejb"
jndiprefix="${unique.name}"
generatepk="false"
/>

I wish I could start using middlegen, rather than trying to start it up.
(Part of my suffering might be due to me being relatively new to ant)


Regards,
-- ilker


_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com
e***@bekk.no
2002-05-11 20:52:02 UTC
Permalink
<FONT face="Default Sans Serif, Verdana, Arial, Helvetica, sans-serif" size=2><DIV><DIV><DIV>Hi, I'll try to answer your questions:</DIV><DIV>&nbsp;</DIV><DIV>0. Middlegen includes a version of Ant (found in the samples/lib/ dir). This is called from the build.bat/build.sh file. Running 'build' at the command line should build middlegen.jar and the specified plugins to the samples/lib dir. Take a look at the build.bat file to&nbsp;see how ant is called..</DIV><DIV>&nbsp;</DIV><DIV>1. Again use the build.bat (samples/build.bat)&nbsp;file to build the samples. The middlegen.jar file should be placed in the lib/ dir by the main middlegen build file (see previous point). The CLASSPATH env variable does not need to be set, except if you want to build the samples for weblogic (then weblogic.jar must be included). The build.bat file sets the proper classpath.</DIV><DIV>&nbsp;</DIV><DIV>2. Not sure about this one. I created the database "manually" with the create script directly in the mysql console. That should work if the target doesn't.</DIV><DIV>&nbsp;</DIV><DIV>3. The &lt;cmp20&gt; target is handled by the entity bean plugin found under plugins/entitybean/. Check out plugins/entitybean/doc/ant.html for some documentation..</DIV><DIV>&nbsp;</DIV><DIV>For people having problems compiling/building middlegen. The solution is most often that you need to run a clean build before running main build. Aslak has done some major changes lately, and the cvs repository changes often.</DIV><DIV>&nbsp;</DIV><DIV>If you keep having problems, don't hesitate to posting more detailed problem descriptions and we'll try to help.</DIV><DIV>&nbsp;</DIV><DIV>Btw, this is my first post to the user group. Do correct me if any of the information i have written here is wrong.. :)</DIV><DIV>&nbsp;</DIV><DIV>Regards</DIV><DIV>- Eivind Waaler<BR></DIV><FONT color=#990099>-----middlegen-user-***@lists.sourceforge.net wrote: -----<BR><BR></FONT>To: middlegen-***@lists.sourceforge.net<BR>From: "abc def" &lt;***@hotmail.com&gt;<BR>Sent by: middlegen-user-***@lists.sourceforge.net<BR>Date: 05/11/2002 08:41PM<BR>Subject: [Middlegen-user] Starting with middlegen is difficult. samples/build.xml don't build.<BR><BR>Hello middlegen gurus,<BR><BR>I have been struggling with compiling middlegen.<BR><BR><BR>I could get the middlegen/build.xml to compile before (and the latest CVS<BR>ones compile no problem). But samples/build still has problems.<BR><BR>0. I started to use ant_1.4.1 . The docs/ant.html seems to suggest using<BR>samples/lib/ant.jar. But isn't ant_1.4.1 sufficient (this is the latest<BR>available one, 1.5 is beta)? If ant_1.4.1 isn't sufficient, how do I start <BR>ant from a jar file only (like<BR>java -D....... middlegen )?<BR><BR><BR>1. Target middlegen complains "taskdef class middlegen.MiddlegenTask cannot<BR>be found". The latest samples/build appends java.class.path to classpath of<BR>samples/lib/*.jar files, hence I assume CLASSPATH env variable at the<BR>commandline that "ant middlegen" is issued should have "..\build\classes".<BR>But still don't compile.<BR><BR><BR>2. The target create-database seems to be missing following 2 lines:<BR> &lt;target name="create-database" description="Create database"&gt;<BR> &lt;property name="gotclasspath" refid="classpath"/&gt; &lt;!-- baseAdd --&gt;<BR> &lt;sql<BR> ................<BR> classpath="${gotclasspath}" &lt;!-- this one --&gt;<BR> onerror="continue" &lt;!-- and this --&gt;<BR> /&gt;<BR><BR><BR>3. Is following part of samples/build.xml really handled in the code ?<BR> Because I didn't see create for it.<BR> &lt;cmp20<BR> package="${name}.ejb"<BR> jndiprefix="${unique.name}"<BR> generatepk="false"<BR> /&gt;<BR><BR>I wish I could start using middlegen, rather than trying to start it up.<BR>(Part of my suffering might be due to me being relatively new to ant)<BR><BR><BR>Regards,<BR>-- ilker<BR><BR><BR>_________________________________________________________________<BR>Chat with friends online, try MSN Messenger: <a href="http://messenger.msn.com" target=blank>http://messenger.msn.com</a><BR><BR><BR>_______________________________________________________________<BR><BR>Have big pipes? SourceForge.net is looking for download mirrors. We supply<BR>the hardware. You get the recognition. Email Us: ***@sourceforge.net<BR>_______________________________________________<BR>middlegen-user mailing list<BR>middlegen-***@lists.sourceforge.net<BR><A target=blank href="https://lists.sourceforge.net/lists/listinfo/middlegen-user" >https://lists.sourceforge.net/lists/listinfo/middlegen-user</a><BR></DIV></DIV></FONT>
Aslak Hellesøy
2002-05-12 09:01:02 UTC
Permalink
Hi Ilker

I saw Eivind replied. I'll just add to that.
-----Original Message-----
Sent: 11. mai 2002 20:42
Subject: [Middlegen-user] Starting with middlegen is difficult.
samples/build.xml don't build.
Hello middlegen gurus,
I have been struggling with compiling middlegen.
I could get the middlegen/build.xml to compile before (and the latest CVS
ones compile no problem). But samples/build still has problems.
0. I started to use ant_1.4.1 . The docs/ant.html seems to suggest using
samples/lib/ant.jar. But isn't ant_1.4.1 sufficient (this is the latest
available one, 1.5 is beta)? If ant_1.4.1 isn't sufficient, how
do I start
ant from a jar file only (like
java -D....... middlegen )?
Middlegen relies on Ant 1.5 (the new DynamicConfigurator interface). As
pointed out by Eivind; It's bundled.
1. Target middlegen complains "taskdef class
middlegen.MiddlegenTask cannot
be found". The latest samples/build appends java.class.path to
classpath of
samples/lib/*.jar files, hence I assume CLASSPATH env variable at the
commandline that "ant middlegen" is issued should have "..\build\classes".
But still don't compile.
Pass the -debug flag to Ant to get more verbose output. Probably due to
using Ant version < 1.5.
<target name="create-database" description="Create database">
<property name="gotclasspath" refid="classpath"/> <!-- baseAdd -->
<sql
................
classpath="${gotclasspath}" <!-- this one -->
onerror="continue" <!-- and this -->
/>
I agree this is the best way to do it, but the buid.bat/build.sh set up the
classpath (by adding all jars in samples/lib to classpath) before Ant is
fired up, so it shouldn't be needed.
3. Is following part of samples/build.xml really handled in the code ?
Because I didn't see create for it.
<cmp20
package="${name}.ejb"
jndiprefix="${unique.name}"
generatepk="false"
/>
There aint no createCmp20 method. The new Ant 1.5 lets you use
DynamicConfigurator to create sub elements.
I wish I could start using middlegen, rather than trying to start it up.
(Part of my suffering might be due to me being relatively new to ant)
Try to get the sample up and running first before putting middlegen into
"your own" project.

HTH,
Aslak
Regards,
-- ilker
_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com
_______________________________________________________________
Have big pipes? SourceForge.net is looking for download mirrors. We supply
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Loading...