[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Separate build and source directory?




It's a bit of a pain for me also, but only because I like to jar up projects
cleanly without shifting files around. The sneaky shortcut is to

opp -KS (classes)

in the source directory before you compile everything the regular
old-fashioned way that you were before; that way you get all the files,
source and class. Most IDEs should allow you to put that in as a
pre-compilation command. Mine doesn't of course :)

Reason
http://www.exratio.com/


>Why does ozone not support separate directories for building and source?
>The opp help says:
>
>% $OZONE_HOME/bin/opp -h
>Ozone Post Processor
>usage: opp [-ks] [-st] [-p<pattern>] [-ni] [-nc] [-q] [-h] [-o<directory>]
>[-odmg] class [class]*
>    -ks       save the generated source files
>    -KS       save the generated source files; do not invoke compiler
>    -st       print stack trace
>    -p        regular expression to specify update methods
>    -ni       do not search interface code for update methods
>    -q        supress output of any messages
>    -o        out/input directory for class files and sources
>    -odmg     create proxies for the ozone ODMG interface
>    -nc       do not create code needed for direct invokes and
>ClientCacheDatabase
>    -version  shows version information
>    -h        shows this help
>
>
>Note the line "out/input directory for class files and sources" here. I
>can't separate them. Until recently I compiled the proxies into the source
>and afterwards cleaned up the mess using some moves.
>But I updated from java 1.2 to 1.3 (I guess it's this switch that made the
>difference, I updated the whole system) and now this workaround doesn't
>work anymore because opp doesn't include the current directory (.) into
>the classpath (that's where my *.class-files are, the source path is
>specified using the -o switch), so some required classes aren't found.
>My IDE requires *.java and *.class files to be separated (and I like this
>approach).
>
>What should I do? I could compile those *_Proxy.java-files manually, but
>that's an even greater workaround than my older one.
>
>andy
>on Mac OS X (BSD-like) / Java 1.3