db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Embretsen <John.Embret...@Sun.COM>
Subject Re: Are SimpleApp.java and SimpleMobileApp.java missing package statements?
Date Wed, 30 Jan 2008 07:28:23 GMT
Bryan Pendleton wrote:
> If I run "ant all" twice in a row in my environment, SimpleApp.java
> and SimpleMobileApp.java are always re-compiled.
> It seems like this may be because the directory structure of the
> source code indicates that SimpleApp.java should be in package 'simple',
> and SimpleMobileApp.java should be in package 'simplemobile', but
> in fact neither .java file contains a "package" statement.
> Do others experience this same behavior?

You are right, ant does not recognize Simple*App when re-running "ant all", 
probably for the reason you state. Package placement is currently not entirely 
consistent among the different demos.

For example, nserverdemo/NsSample.java belongs to the package "nserverdemo" and 
resides in the directory demo/programs/nserverdemo/ (in -bin distributions), 
while simple/SimpleApp.java belongs to the default (unnamed) package and resides 
in the directory demo/programs/simple/. Neither of these follow the 
recommendations in the Java spec (to use full package names, org.apache...).

There was consensus to keep SimpleApp in the default package, see comments to 
DERBY-223 [1], but this can of course be changed if so desired.


[1]: http://issues.apache.org/jira/browse/DERBY-223 (Change programs under demo 
directory use consistent package names so IDEs do not report errors)

View raw message