Is it me or NB4.1 ANT version?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Is it me or NB4.1 ANT version?

Bruno Lotse
Looks like another pesky problem.

I have JWSDP-1.5 installed on my system.
Tried how it is working in NB4.1 environment. Hate
running from CLI. NB4.1 is a way cooler.

Tried to create a web application with existing ANT
script.

Location of the application
jwsdp-1.5/xms-security/samples/simple

location of the build script
jwsdp-1.5/xms-security/samples/simple/build.xml

I did not touch that build.xml yet hoping that NB4.1
would  guide me to create a customized version to use
in the NB environment.

Yet what am I getting?
'The selected file is not a valid Ant script'

Eh? That script is right from Sun. Checked it out.
Looks fine for me.

OK. That script is actually the way I like it as it is
using XML general parsed entities to import parts
necessary for the runtime version

<!DOCTYPE project [
      <!ENTITY tomcat SYSTEM
"file:../buildconfig/tomcat-config.xml">
      <!ENTITY sjsas SYSTEM
"file:../buildconfig/sjsas-config.xml">
      <!ENTITY sjsws SYSTEM
"file:../buildconfig/sjsws-config.xml">
]>

This is very cool. Actually one of my favorite
techniques.
But why 'The selected file is not a valid Ant script'
?

Is it because general entities in the script? :(
Another question - can the current Ant version bundled
with NB4.1 handle ANT import task?



       

       
               
__________________________________________________________
Find your next car at http://autos.yahoo.ca
Reply | Threaded
Open this post in threaded view
|

Re: Is it me or NB4.1 ANT version?

Ludovic Champenois
Bruno Lotse wrote:

>Looks like another pesky problem.
>
>I have JWSDP-1.5 installed on my system.
>Tried how it is working in NB4.1 environment. Hate
>running from CLI. NB4.1 is a way cooler.
>
>Tried to create a web application with existing ANT
>script.
>
>Location of the application
>jwsdp-1.5/xms-security/samples/simple
>
>location of the build script
>jwsdp-1.5/xms-security/samples/simple/build.xml
>
>I did not touch that build.xml yet hoping that NB4.1
>would  guide me to create a customized version to use
>in the NB environment.
>
>Yet what am I getting?
>'The selected file is not a valid Ant script'
>
>Eh? That script is right from Sun. Checked it out.
>  
>
Might be from Sun, but it is buggy.

Try to remove the":file:" protocol:

<!DOCTYPE project [
      <!ENTITY tomcat SYSTEM
"../buildconfig/tomcat-config.xml">

....
It should work.

NB 4.1 has ANT 1.6.2. So import task is supported. See
http://ant.apache.org/manual/CoreTasks/import.html

Ludo


>Looks fine for me.
>
>OK. That script is actually the way I like it as it is
>using XML general parsed entities to import parts
>necessary for the runtime version
>
><!DOCTYPE project [
>      <!ENTITY tomcat SYSTEM
>"file:../buildconfig/tomcat-config.xml">
>      <!ENTITY sjsas SYSTEM
>"file:../buildconfig/sjsas-config.xml">
>      <!ENTITY sjsws SYSTEM
>"file:../buildconfig/sjsws-config.xml">
>]>
>
>This is very cool. Actually one of my favorite
>techniques.
>But why 'The selected file is not a valid Ant script'
>?
>
>Is it because general entities in the script? :(
>Another question - can the current Ant version bundled
>with NB4.1 handle ANT import task?
>
>
>
>
>
>
>
>__________________________________________________________
>Find your next car at http://autos.yahoo.ca
>  
>

Reply | Threaded
Open this post in threaded view
|

Re: Is it me or NB4.1 ANT version?

Bruno Lotse
RE:
Try to remove the":file:" protocol:
>
> <!DOCTYPE project [
>       <!ENTITY tomcat SYSTEM
> "../buildconfig/tomcat-config.xml">
>
> ....
> It should work.

Yesss, it does.
It actually does whenever I put a proper notation for
the file protocol like this:
 <!ENTITY tomcat SYSTEM
 "file:///../buildconfig/tomcat-config.xml">

The version in the JWSDP-1.5 is definitely a bug in
the script.

Cheers, Ludo ;)
Bruno


--- Ludovic Champenois <[hidden email]>
wrote:

> Bruno Lotse wrote:
>
> >Looks like another pesky problem.
> >
> >I have JWSDP-1.5 installed on my system.
> >Tried how it is working in NB4.1 environment. Hate
> >running from CLI. NB4.1 is a way cooler.
> >
> >Tried to create a web application with existing ANT
> >script.
> >
> >Location of the application
> >jwsdp-1.5/xms-security/samples/simple
> >
> >location of the build script
> >jwsdp-1.5/xms-security/samples/simple/build.xml
> >
> >I did not touch that build.xml yet hoping that
> NB4.1
> >would  guide me to create a customized version to
> use
> >in the NB environment.
> >
> >Yet what am I getting?
> >'The selected file is not a valid Ant script'
> >
> >Eh? That script is right from Sun. Checked it out.
> >  
> >
> Might be from Sun, but it is buggy.
>
> Try to remove the":file:" protocol:
>
> <!DOCTYPE project [
>       <!ENTITY tomcat SYSTEM
> "../buildconfig/tomcat-config.xml">
>
> ....
> It should work.
>
> NB 4.1 has ANT 1.6.2. So import task is supported.
> See
> http://ant.apache.org/manual/CoreTasks/import.html
>
> Ludo
>
>
> >Looks fine for me.
> >
> >OK. That script is actually the way I like it as it
> is
> >using XML general parsed entities to import parts
> >necessary for the runtime version
> >
> ><!DOCTYPE project [
> >      <!ENTITY tomcat SYSTEM
> >"file:../buildconfig/tomcat-config.xml">
> >      <!ENTITY sjsas SYSTEM
> >"file:../buildconfig/sjsas-config.xml">
> >      <!ENTITY sjsws SYSTEM
> >"file:../buildconfig/sjsws-config.xml">
> >]>
> >
> >This is very cool. Actually one of my favorite
> >techniques.
> >But why 'The selected file is not a valid Ant
> script'
> >?
> >
> >Is it because general entities in the script? :(
> >Another question - can the current Ant version
> bundled
> >with NB4.1 handle ANT import task?
> >
> >
> >
> >
> >
> >
> >
>
>__________________________________________________________
>
> >Find your next car at http://autos.yahoo.ca
> >  
> >
>
>


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com 
Reply | Threaded
Open this post in threaded view
|

Re: Is it me or NB4.1 ANT version?

Bruno Lotse
Incidentally, that script has also semantic bug (I
feel a little bit pedantic this time).

<!ENTITY tomcat SYSTEM
 "file:///../buildconfig/tomcat-config.xml">
This how tomcat-config.xml looks like
<property name="tomcat.home"
value="D:/AppServer/Tomcat/5.0.19" />
<property name="ant.jar"
value="${tomcat.home}/server/lib/catalina-ant.jar"/>

  <path id="app.classpath">
    <fileset dir="${tomcat.home}/xws-security/lib"/>
    <fileset dir="${tomcat.home}/jwsdp-shared/lib"/>
    <fileset dir="${tomcat.home}/common/lib"/>
    <fileset dir="${tomcat.home}/jaxrpc/lib"/>
    <fileset dir="${tomcat.home}/saaj/lib"/>
    <fileset dir="${tomcat.home}/jaxp/lib">
      <include name="**/*.jar"/>
                </fileset>

                <pathelement location="${javahome}/lib/tools.jar"/>
                <!--fileset dir="${javahome}/lib">
      <include name="tools.jar"/>
    </fileset-->
  </path>

 <taskdef name="wscompile"
classname="com.sun.xml.rpc.tools.ant.Wscompile"
             classpathref="app.classpath"/>

 <taskdef name="wsdeploy"
classname="com.sun.xml.rpc.tools.ant.Wsdeploy"
             classpathref="app.classpath"/>

<path id="ant.task.classpath">
    <pathelement location="${ant.jar}"/>
</path>

<taskdef name="deploy-catalina"
classname="org.apache.catalina.ant.DeployTask"
             classpathref="ant.task.classpath"/>

<taskdef name="undeploy-catalina"
           
classname="org.apache.catalina.ant.UndeployTask"
                                                 classpathref="ant.task.classpath"/>

Well, this file is NOT XML. XML document has to have a
root, i.e. be well-formed - the major requirement for
a
document peppered with tags to be an XML document.
That one does not have a root, therefore it is not a
XML but rather parsed entity.
Therefore, the proper notation is tomcat-config.ent
(ent stands for entity).

So, the final version
<!ENTITY tomcat SYSTEM
 "file:///../buildconfig/tomcat-config.ent">

Well, but this is definitely for those guys who wrote
WSDP files. ;)

Cheers,
Bruno




--- Bruno Lotse <[hidden email]> wrote:

> RE:
> Try to remove the":file:" protocol:
> >
> > <!DOCTYPE project [
> >       <!ENTITY tomcat SYSTEM
> > "../buildconfig/tomcat-config.xml">
> >
> > ....
> > It should work.
>
> Yesss, it does.
> It actually does whenever I put a proper notation
> for
> the file protocol like this:
>  <!ENTITY tomcat SYSTEM
>  "file:///../buildconfig/tomcat-config.xml">
>
> The version in the JWSDP-1.5 is definitely a bug in
> the script.
>
> Cheers, Ludo ;)
> Bruno
>
>
> --- Ludovic Champenois <[hidden email]>
> wrote:
>
> > Bruno Lotse wrote:
> >
> > >Looks like another pesky problem.
> > >
> > >I have JWSDP-1.5 installed on my system.
> > >Tried how it is working in NB4.1 environment.
> Hate
> > >running from CLI. NB4.1 is a way cooler.
> > >
> > >Tried to create a web application with existing
> ANT
> > >script.
> > >
> > >Location of the application
> > >jwsdp-1.5/xms-security/samples/simple
> > >
> > >location of the build script
> > >jwsdp-1.5/xms-security/samples/simple/build.xml
> > >
> > >I did not touch that build.xml yet hoping that
> > NB4.1
> > >would  guide me to create a customized version to
> > use
> > >in the NB environment.
> > >
> > >Yet what am I getting?
> > >'The selected file is not a valid Ant script'
> > >
> > >Eh? That script is right from Sun. Checked it
> out.
> > >  
> > >
> > Might be from Sun, but it is buggy.
> >
> > Try to remove the":file:" protocol:
> >
> > <!DOCTYPE project [
> >       <!ENTITY tomcat SYSTEM
> > "../buildconfig/tomcat-config.xml">
> >
> > ....
> > It should work.
> >
> > NB 4.1 has ANT 1.6.2. So import task is supported.
> > See
> > http://ant.apache.org/manual/CoreTasks/import.html
> >
> > Ludo
> >
> >
> > >Looks fine for me.
> > >
> > >OK. That script is actually the way I like it as
> it
> > is
> > >using XML general parsed entities to import parts
> > >necessary for the runtime version
> > >
> > ><!DOCTYPE project [
> > >      <!ENTITY tomcat SYSTEM
> > >"file:../buildconfig/tomcat-config.xml">
> > >      <!ENTITY sjsas SYSTEM
> > >"file:../buildconfig/sjsas-config.xml">
> > >      <!ENTITY sjsws SYSTEM
> > >"file:../buildconfig/sjsws-config.xml">
> > >]>
> > >
> > >This is very cool. Actually one of my favorite
> > >techniques.
> > >But why 'The selected file is not a valid Ant
> > script'
> > >?
> > >
> > >Is it because general entities in the script? :(
> > >Another question - can the current Ant version
> > bundled
> > >with NB4.1 handle ANT import task?
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
>
>__________________________________________________________
> >
> > >Find your next car at http://autos.yahoo.ca
> > >  
> > >
> >
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
> protection around
> http://mail.yahoo.com 
>


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com