Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jdt-dev] Automatic build of referenced project

Hi,
I need help with the following situation:

Some source files of a larger java project (ProjectA) are generated by a
general project (ProjectB). I would like to automatically rebuild ProjectA
(and ProjectB) if any source file of ProjectA (or ProjectB) is changed.

This is how I do it right now:
1) I checked ProjectB in the project references of ProjectA.
2) I have to switch off "Build automatically" in the Project menu, because
otherwise ProjectB is never compiled.
3) The Makefile of ProjectB generates the source file for ProjectA with this
commands:
  java JLex.Main Yylexer.lex; mv Yylexer.lex.java
../ProjectA/src/Yylexer.java
  This is initiated by clicking "Build all".
4) The file Yylexer.java was added as source of ProjectB before it is first
generated by ProjectB. Now that Yylexer.java was generated by ProjectB, I
have to open it in ProjectB, so that the project builder is notified of it's
changes. Finally I can launch ProjectB.

My question:
How can I build these steps (both the Managed Java ProjectB and the General
ProjectA which it depends on) automatically with a single click (or better:
automatically by saving any source file)?

Hoping for some help,
Edi

ps: Version: 3.2.2
Build id: M20070212-1330

(And a more general - not so urgent, but related - problem: can I add a
source file (source.java) to a project which I have copied (independent from
eclipse) into the project directory? If I choose to add source.java to the
project, I get "a resource already exists on disk <path>/source.java". If I
choose to import from the file system I get "Source is in the hierarchy of
the destination.".)
-- 
View this message in context: http://www.nabble.com/Automatic-build-of-referenced-project-tf4052515.html#a11510774
Sent from the Eclipse JDT - General mailing list archive at Nabble.com.



Back to the top