ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antoine Levy-Lambert" <levylamb...@tiscali-dsl.de>
Subject Re: <javac> not creating package subdirectories
Date Thu, 09 Jan 2003 08:05:32 GMT
Yes, in good Java practice, your source file should be
${src}/api/enCommerce/getAccess/API/User/MyFile.java

and not


${src}/api/MyFile.java

All the Java tools expect you to have a directory structure beneath your
source directories which matches your package structure.

Antoine

----- Original Message -----
From: <suu_quan@non.agilent.com>
To: <ant-user@jakarta.apache.org>
Sent: Thursday, January 09, 2003 1:36 AM
Subject: <javac> not creating package subdirectories


> the following task (only 1 java file)
>
> <javac srcdir="${src}/api" optimize="on" classpathref="classpath"/>
>
> creates a .class file in the ${src}/api directory, even though the java
file has this statement
>
> package enCommerce.getAccess.API.User;
>
> I expect it to create the directories enCommerce/getAccess/API/User and
put the class file there.
>
> That screws up my following task
>     <jar destfile="${distr}/getextapi.jar"  filesonly="true">
>         <fileset dir="${src}/api">
>                 <include name="**/*.class"/>
>         </fileset>
>     </jar>
>
> what did I not do right?
> Should I organize the source directory structure according to the package
structure?
>
> I move the java file to ${src}/api/enCommerce/getAccess/API/User/*.java
> and I got the desired result.
>
> Is that what's supposed to happen?
>
> tia
> Suu Quan
> 408-553-7155  (cell 408-420-6687)
> Configuration Management & Release Engineering
> Agilent Technologies
> Bldg 54, between Posts G4-G5
> 5301 Stevens Creek Blvd
> Santa Clara, CA 95051
>
> --
> To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message