Helma,

thank you for the information, but it seems not to be as simple as it
sounds. Maybe you either just had tons of luck or I am missing anything.

>> if you right click on the target you want in the top build.xml file
>> outline (I don't have Eclipse open now so I might be wrong when it comes 
>> to exact names). 

I right clicked on the "webapp" targer and choose "Run As" -> "Ant build
...". (Note the three dots. If I choose the option without the three dots,
it just starts and I cannot enter any parameter.

In the topmost line of the dialog that comes up, there is an error reported
saying: "No targets could be determined for the buildfile". Ok, let's ignore
this here. Let's also ignore the fact that the "Run" button in this dialog
is diabled!

>> One of the tabs you see in the dialog sets the Ant Home
>> directory. I set it to an installed version of ant 1.6.1, but since 
>> Cocoon includes ant 1.6.1 as well, you could also set it to that.

Slowly ...

First of all, I guess you are talking about the "Base Directory" field on
the "Main" tab?

I set this to ${workspace_loc:/cocoon-2.1.5/tools} by choosing the "tools"
folder in the Cocoon source tree from the projects. (Would you personally do
any thing different here?)

Still no targets and "Run" button disbled. So I save this configuration and
you're right: It shows up in the "External Tools" menu.

But then I try to run this build from the external tools menu () and get:

Buildfile: C:\local\src\cocoon-2.1.5\build.xml
init:
init-tasks:
    [mkdir] Created dir: C:\local\src\cocoon-2.1.5\tools\${tools.tasks.dest}
BUILD FAILED: C:\local\src\cocoon-2.1.5\tools\targets\init-build.xml:159:
srcdir "C:\local\src\cocoon-2.1.5\tools\${tools.tasks.src}" does not exist!
Total time: 751 milliseconds

Looks like the external ant cannot / does not resolve the properties ...

Any (more) ideas? What did you do differently? I am on Eclipse 3.1M3 on XP.
(Tried on Linux as well, identical behaviour. I like cross-platform
problems.)

Bonus question: Why use an external ant? Why should the built-in Ant not be
able to compile Cocoon?

Regards,
Torsten

-----Urspr�ngliche Nachricht-----
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Gesendet: Freitag, 17. Dezember 2004 01:05
An: [EMAIL PROTECTED]
Betreff: RE: Still challenged with building Cocoon in Eclipse

When put this way I assume I do build Cocoon in Eclipse 3.1 according to
your definitions. The ExceptionInInitializerError is caused by the fact that
Eclipse defaults to it's own Ant 1.6.2 version, as you've already figured
out. I solved this problem by going into the properties of the "run ..."
option if you right click on the target you want in the top build.xml file
outline (I don't have Eclipse open now so I might be wrong when it comes to
exact names). One of the tabs you see in the dialog sets the Ant Home
directory. I set it to an installed version of ant 1.6.1, but since Cocoon
includes ant 1.6.1 as well, you could also set it to that.
Note: you have to do this for each target you want to run!

After that it's point and click to run the target. IIRC the last tab allows
you to check the "external tools" box. If you do that, and you've filled in
a meaningful name in the box above the tabs, your name becomes part of the
dropdown list of the toolbar icon that is green with a white triangle and a
red box.

After that, recompiling Cocoon is even more simple: you select the name from
the dropdown list and if you've done that before, you only have to click the
icon, because Eclipse remembers the last selection you've made.

HTH.

Bye, Helma

-----Original Message-----
From: Torsten Schlabach [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, 15 December, 2004 17:43
To: [EMAIL PROTECTED]
Subject: Still challenged with building Cocoon in Eclipse


Hi all,

I still try to build Cocoon in Eclipse by following this howto:

http://wiki.apache.org/cocoon/Cocoon215TOC

and I still face this error:

Buildfile: C:\local\eclipse-scratchpad-workspace\cocoon-2.1.6\build.xml
init:
init-tasks:
    [mkdir] Created dir:
C:\local\eclipse-scratchpad-workspace\cocoon-2.1.6\build\cocoon-2.1.6\mocks
    [javac] Compiling 1 source file to
C:\local\eclipse-scratchpad-workspace\cocoon-2.1.6\build\cocoon-2.1.6\mocks
compile-deprecated:
BUILD FAILED: java.lang.ExceptionInInitializerError
Total time: 30 seconds

Someone pointed me at

http://wiki.apache.org/cocoon/YourCocoonBasedProjectAnt16

But having read this through I think it cannot be the answer as it is based
on heavily changing the build.xml and properties files and if I get it right
talks about building it through on the command line first and then just use
Eclipse as and editor / viewer.

So my question still is: Did anyone ever successfully:

- Download and extract the tar
- Run ant eclipse-project
- Imported and built the project in Eclipse

When I say "build in Eclipse" I am talking about locating the top build.xml
file in Eclipse, right-clicking on it and choosing "Run as ..." and "Ant
build".

Especially, what I don't understand in the "LoadInEclipse" Wiki page is this
section:

To run the Ant build from within Eclipse you have to add something like this
to the build.xml:

  <!-- =========================================================== -->
  <!-- Use the Eclipse compiler if we are running in eclipse       -->
  <!-- =========================================================== -->

  <target name="properties" if="eclipse.running">
    <property name="build.compiler"
value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
  </target>


Where should I put this?

Regards,
Torsten

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to