Hello Jon -

     That's too bad that importscrubber messed up the Scarab source code.
Importscrubber is still definitely a work in progress, and there are some
things that it is definitely going to miss.  For example, since the
compiler inlines references to static finals, and importscrubber looks in
the class file for class references.... it's going to miss those
references.  Which is unfortunate.  Also, if a string looks a lot like a
class name, Importscrubber may think its a class name and try to turn it
into an import statement.

     At any rate, I'll take a look at how importscrubber mangles the Scarab
code and see if there's anything I can fix.  Thanks for the feedback,

     Yours,

Tom Copeland
[EMAIL PROTECTED]
703-317-5193


                                                                                       
                                                       
                    Jon Stevens                                                        
                                                       
                    <jon@latchkey        To:     "[EMAIL PROTECTED]" 
<[EMAIL PROTECTED]>                                    
                    .com>                cc:     <[EMAIL PROTECTED]>   
                                                       
                                         Subject:     Re: ImportScrubberTask           
                                                       
                    10/21/2001                                                         
                                                       
                    11:52 PM                                                           
                                                       
                                                                                       
                                                       
                                                                                       
                                                       




on 10/21/01 8:40 PM, "Pier Fumagalli" <[EMAIL PROTECTED]> wrote:

> Jon Stevens at [EMAIL PROTECTED] wrote:
>
>> <http://importscrubber.sourceforge.net/ant.html>
>>
>> org.apache.tools.ant.taskdefs.optional.importscrubber.ImportScrubberTask
>>
>> Given that this isn't an official Jakarta project, shouldn't the tool
choose
>> another namespace?
>
> Indeed...
>
>   Pier
>

That said, I just tried running importscrubber against Scarab's code and it
totally f*cked it up. I highly recommend not using it or at least being
very
careful with it.

Tom, feel free to try yourself...I added the following to Scarab's
build.xml:

    <!-- ==================================================================
-->
    <!-- Tool to create proper import statements
-->
    <!-- ==================================================================
-->
    <target name="scrub" depends="om-peer,prepare">
        <taskdef name="scrub"

classname
="org.apache.tools.ant.taskdefs.optional.importscrubber.ImportScrub
berTask"/>

        <property name="tmp.dir" value="tmp"/>

        <delete dir="${tmp.dir}" quiet="true"/>

        <copy todir="${tmp.dir}/org">
          <fileset dir="${build.src.scarab}/org"/>
        </copy>

        <javac srcdir="${tmp.dir}"
            destdir="${tmp.dir}"
            excludes="**/package.html,torque/**"
            debug="true">

          <classpath refid="classpath"/>

          <classpath>
            <fileset dir="${build.project.webinf.lib}">
              <include name="**/torque*.jar"/>
            </fileset>
          </classpath>
        </javac>

        <scrub root="${tmp.dir}" format="nobreaks" recurse="true"/>

        <delete>
          <fileset dir="${tmp.dir}" includes="**/*.class"/>
        </delete>

        <copy todir="${src.java.dir.scarab}/org" overwrite="true">
          <fileset dir="${tmp.dir}/org"/>
        </copy>

    </target>

-jon


                                                                            
                                                                            
 -------------------------------------------------------------------------- 


This email may contain confidential and proprietary information which is
for the sole use of the intended recipient.  If you received this email in
error, please notify the sender and delete this email from your computer.
Any review, distribution or retransmission of or reliance on this email by
anyone other than the intended recipient is forbidden.




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to