Re: xCode 3 New Java Project
Re: xCode 3 New Java Project
- Subject: Re: xCode 3 New Java Project
- From: Greg Guerin <email@hidden>
- Date: Fri, 23 Nov 2007 15:20:27 -0700
Robert Morse wrote:
>But I could never figure out how to add a jar file through xcode that put it
>in the correct place.
When an Xcode project is using an external build process, you can't "add a
file" through Xcode. If you could, then Xcode would have to know how to
add files to the build process, and if it knew that, the process wouldn't
be external. An "external build process" implies that all the information
about the build process is external to Xcode's project. That's what
external means.
The folders in the Ant-based Xcode Java project are blue, not yellow, which
signifies they are folder references, not merely Xcode groups. With folder
references, files are automatically added and removed from the project
simply by adding and removing them from the folder that is referenced by
the project. This is what a folder reference is.
To add a jar file to an Xcode 3 Ant-based project, add it to the "lib"
folder, and Ant should then see it. I assume that adding a jar means you
want to compile or run against classes in the jar. If a symlink doesn't
work, consider using a hard-link (same 'ln' cmd, but no '-s').
If you want to use the earlier style of JAM-based Java targets, try the
following in Xcode 3:
1. Create a new project and choose the "Empty Project" template.
2. Name it and place it where you wish.
3. In the resulting Xcode window, contextual-click and choose "Add
Target...".
4. Choose Applet, Application, or Tool under the Java heading.
5. Click Next, name the target, then click Finish.
5. Observe the resulting target has conventional Xcode build phases.
Other alternatives that might work (I haven't tried these) are:
A. Copy an earlier Java project, strip it down, and then make copies of
it for each new project. This is the "manual stationery" approach.
B. Copy and revise the earlier Java-project templates from Xcode 2.4.1,
which will probably have to be updated for Xcode 3 and placed in a
different template location.
You may also find Xcode 3's Organizer feature useful in managing Ant-based
projects. Google for Xcode Organizer for more info.
-- GG
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden