You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by su...@non.agilent.com on 2003/01/09 01:36:09 UTC

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:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: not creating package subdirectories

Posted by Matt Moran <ma...@mattnliz.net>.
I'm not an expert, but it's unclear to me why you expect this to work.  If
you execute javac from the command line, does it create the directories for
you?  (When I try something similar, it doesn't happen that way.  The .class
file is put in the same directory as the .java file.)

Also, from http://jakarta.apache.org/ant/manual/CoreTasks/javac.html
"When the source files are part of a package, the directory structure of the
source tree should follow the package hierarchy."

Although I think this is actually referring to the logic ant uses to
determine if the file needs to be recompiled.

Matt Moran

----- Original Message -----
From: <su...@non.agilent.com>
To: <an...@jakarta.apache.org>
Sent: Wednesday, January 08, 2003 6:36 PM
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:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: not creating package subdirectories

Posted by Antoine Levy-Lambert <le...@tiscali-dsl.de>.
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: <su...@non.agilent.com>
To: <an...@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:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Hi Can some tell me the Deployement steps for the EJB on WebLogic6.1 using ANT

Posted by uday shankar <ud...@yahoo.com>.
Hi,
Re: Hi Can some tell me the Deployement steps for the
EJB on WebLogic6.1 using ANT
Expect to hear from you soon.
Thanks in advance
Uday Singh

--- Conor MacNeill <co...@cortexebusiness.com.au>
wrote:
> uday shankar wrote:
> > Expect to hear from  you soon.
> 
> If you take the time to create a new thread with the
> correct subject you'll 
> probably hear more, sooner.
> 
> Conor
> 
> 
> 
> --
> To unsubscribe, e-mail:  
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: not creating package subdirectories

Posted by Conor MacNeill <co...@cortexebusiness.com.au>.
uday shankar wrote:
> Expect to hear from  you soon.

If you take the time to create a new thread with the correct subject you'll 
probably hear more, sooner.

Conor



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: not creating package subdirectories

Posted by uday shankar <ud...@yahoo.com>.
HI,
Can Any one mail me the deployement steps of the EJB
Apps on WebLogic 6.1 using the ANT.Just the steps
which is necessary for me to initiate the deployement
and the EJB app runiing whose cleint may be a servlet.
Expect to hear from  you soon.
Thanks in advance 
Uday Singh
--- suu_quan@non.agilent.com wrote:
> 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:  
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>