ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonese <gig...@gmail.com>
Subject Re: Am i doing this right RE: ReplaceRegExp
Date Tue, 12 Feb 2008 19:56:05 GMT
mm ok here's my diagnostic's output see anything which might cause it
to not work for me?

C:\working\healthinteractions.com>ant -diagnostics
------- Ant diagnostics report -------
Apache Ant version 1.7.0 compiled on December 13 2006

-------------------------------------------
 Implementation Version
-------------------------------------------
core tasks     : 1.7.0
optional tasks : not available

-------------------------------------------
 ANT PROPERTIES
-------------------------------------------
ant.version: Apache Ant version 1.7.0 compiled on December 13 2006
ant.java.version: 1.6
ant.core.lib: C:\apache-ant-1.7.0\lib\ant.jar
ant.home: C:\apache-ant-1.7.0

-------------------------------------------
 ANT_HOME/lib jar listing
-------------------------------------------
ant.home: C:\apache-ant-1.7.0
ant-antlr.jar (5769 bytes)
ant-apache-bcel.jar (8627 bytes)
ant-apache-bsf.jar (3980 bytes)
ant-apache-log4j.jar (3074 bytes)
ant-apache-oro.jar (39591 bytes)
ant-apache-regexp.jar (3737 bytes)
ant-apache-resolver.jar (4080 bytes)
ant-commons-logging.jar (3943 bytes)
ant-commons-net.jar (47163 bytes)
ant-jai.jar (21368 bytes)
ant-javamail.jar (7011 bytes)
ant-jdepend.jar (8152 bytes)
ant-jmf.jar (6609 bytes)
ant-jsch.jar (30122 bytes)
ant-junit.jar (92792 bytes)
ant-launcher.jar (11734 bytes)
ant-netrexx.jar (9895 bytes)
ant-nodeps.jar (430311 bytes)
ant-starteam.jar (35404 bytes)
ant-stylebook.jar (2334 bytes)
ant-swing.jar (6713 bytes)
ant-testutil.jar (14919 bytes)
ant-trax.jar (6897 bytes)
ant-weblogic.jar (14254 bytes)
ant.jar (1289806 bytes)
ganymed.jar (244831 bytes)
svnant.jar (81432 bytes)
svnClientAdapter.jar (168642 bytes)
svnjavahl.jar (45121 bytes)
svnkit.jar (1222597 bytes)
xercesImpl.jar (1212965 bytes)
xml-apis.jar (195119 bytes)

-------------------------------------------
 USER_HOME/.ant/lib jar listing
-------------------------------------------
user.home: C:\Documents and Settings\Eric.Jones
No such directory.

-------------------------------------------
 Tasks availability
-------------------------------------------
image : Missing dependency javax.media.jai.PlanarImage
sshexec : Missing dependency com.jcraft.jsch.UserInfo
scp : Missing dependency com.jcraft.jsch.UserInfo
jdepend : Missing dependency jdepend.xmlui.JDepend
A task being missing/unavailable should only matter if you are trying to use it

-------------------------------------------
 org.apache.env.Which diagnostics
-------------------------------------------
Not available.
Download it at http://xml.apache.org/commons/

-------------------------------------------
 XML Parser information
-------------------------------------------
XML Parser : org.apache.xerces.jaxp.SAXParserImpl
XML Parser Location: C:\apache-ant-1.7.0\lib\xercesImpl.jar
Namespace-aware parser : org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser
Namespace-aware parser Location: C:\apache-ant-1.7.0\lib\xercesImpl.jar

-------------------------------------------
 System properties
-------------------------------------------
java.runtime.name : Java(TM) SE Runtime Environment
sun.boot.library.path : C:\Program Files\Java\jdk1.6.0_04\jre\bin
java.vm.version : 10.0-b19
ant.library.dir : C:\apache-ant-1.7.0\lib
java.vm.vendor : Sun Microsystems Inc.
java.vendor.url : http://java.sun.com/
path.separator : ;
java.vm.name : Java HotSpot(TM) Client VM
file.encoding.pkg : sun.io
user.country : US
sun.java.launcher : SUN_STANDARD
sun.os.patch.level : Service Pack 2
java.vm.specification.name : Java Virtual Machine Specification
user.dir : C:\working\healthinteractions.com
java.runtime.version : 1.6.0_04-b12
java.awt.graphicsenv : sun.awt.Win32GraphicsEnvironment
java.endorsed.dirs : C:\Program Files\Java\jdk1.6.0_04\jre\lib\endorsed
os.arch : x86
java.io.tmpdir : C:\DOCUME~1\ERIC~1.JON\LOCALS~1\Temp\
line.separator :

java.vm.specification.vendor : Sun Microsystems Inc.
user.variant :
os.name : Windows XP
ant.home : C:\apache-ant-1.7.0
sun.jnu.encoding : Cp1252
java.library.path : C:\Program
Files\Java\jdk1.6.0_04\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\W
INDOWS\System32\Wbem;C:\Program Files\QuickTime\QTSystem\;C:\Program
Files\Microsoft SQL Server\80\Tools\Binn\;C:\Program Files\Microsoft
SQL Server\9
0\Tools\binn\;C:\Program Files\Microsoft SQL
Server\90\DTS\Binn\;C:\Program Files\Microsoft SQL
Server\90\Tools\Binn\VSShell\Common7\IDE\;C:\Program F
iles\Microsoft Visual Studio
8\Common7\IDE\PrivateAssemblies\;C:\apache-ant-1.7.0\bin;C:\Program
Files\Microsoft SQL Server\90\Tools\Publishing\
java.specification.name : Java Platform API Specification
java.class.version : 50.0
sun.management.compiler : HotSpot Client Compiler
os.version : 5.1
user.home : C:\Documents and Settings\Eric.Jones
user.timezone : America/New_York
java.awt.printerjob : sun.awt.windows.WPrinterJob
file.encoding : Cp1252
java.specification.version : 1.6
user.name : eric.jones
java.class.path :
C:\apache-ant-1.7.0\lib\ant-launcher.jar;C:\working\healthinteractions.com\.;C:\Program
Files\Java\jre1.6.0_02\lib\ext\QTJava.zip;C:
\apache-ant-1.7.0\lib\ant-antlr.jar;C:\apache-ant-1.7.0\lib\ant-apache-bcel.jar;C:\apache-ant-1.7.0\lib\ant-apache-bsf.jar;C:\apache-ant-1.7.0\lib\ant
-apache-log4j.jar;C:\apache-ant-1.7.0\lib\ant-apache-oro.jar;C:\apache-ant-1.7.0\lib\ant-apache-regexp.jar;C:\apache-ant-1.7.0\lib\ant-apache-resolver
.jar;C:\apache-ant-1.7.0\lib\ant-commons-logging.jar;C:\apache-ant-1.7.0\lib\ant-commons-net.jar;C:\apache-ant-1.7.0\lib\ant-jai.jar;C:\apache-ant-1.7
.0\lib\ant-javamail.jar;C:\apache-ant-1.7.0\lib\ant-jdepend.jar;C:\apache-ant-1.7.0\lib\ant-jmf.jar;C:\apache-ant-1.7.0\lib\ant-jsch.jar;C:\apache-ant
-1.7.0\lib\ant-junit.jar;C:\apache-ant-1.7.0\lib\ant-launcher.jar;C:\apache-ant-1.7.0\lib\ant-netrexx.jar;C:\apache-ant-1.7.0\lib\ant-nodeps.jar;C:\ap
ache-ant-1.7.0\lib\ant-starteam.jar;C:\apache-ant-1.7.0\lib\ant-stylebook.jar;C:\apache-ant-1.7.0\lib\ant-swing.jar;C:\apache-ant-1.7.0\lib\ant-testut
il.jar;C:\apache-ant-1.7.0\lib\ant-trax.jar;C:\apache-ant-1.7.0\lib\ant-weblogic.jar;C:\apache-ant-1.7.0\lib\ant.jar;C:\apache-ant-1.7.0\lib\ganymed.j
ar;C:\apache-ant-1.7.0\lib\svnant.jar;C:\apache-ant-1.7.0\lib\svnClientAdapter.jar;C:\apache-ant-1.7.0\lib\svnjavahl.jar;C:\apache-ant-1.7.0\lib\svnki
t.jar;C:\apache-ant-1.7.0\lib\xercesImpl.jar;C:\apache-ant-1.7.0\lib\xml-apis.jar;C:\Program
Files\Java\jdk1.6.0_04\lib\tools.jar
java.vm.specification.version : 1.0
sun.arch.data.model : 32
java.home : C:\Program Files\Java\jdk1.6.0_04\jre
java.specification.vendor : Sun Microsystems Inc.
user.language : en
awt.toolkit : sun.awt.windows.WToolkit
java.vm.info : mixed mode, sharing
java.version : 1.6.0_04
java.ext.dirs : C:\Program
Files\Java\jdk1.6.0_04\jre\lib\ext;C:\WINDOWS\Sun\Java\lib\ext
sun.boot.class.path : C:\Program
Files\Java\jdk1.6.0_04\jre\lib\resources.jar;C:\Program
Files\Java\jdk1.6.0_04\jre\lib\rt.jar;C:\Program Files\Java\j
dk1.6.0_04\jre\lib\sunrsasign.jar;C:\Program
Files\Java\jdk1.6.0_04\jre\lib\jsse.jar;C:\Program
Files\Java\jdk1.6.0_04\jre\lib\jce.jar;C:\Program File
s\Java\jdk1.6.0_04\jre\lib\charsets.jar;C:\Program
Files\Java\jdk1.6.0_04\jre\classes
java.vendor : Sun Microsystems Inc.
file.separator : \
java.vendor.url.bug : http://java.sun.com/cgi-bin/bugreport.cgi
sun.cpu.endian : little
sun.io.unicode.encoding : UnicodeLittle
sun.desktop : windows
sun.cpu.isalist :

-------------------------------------------
 Temp dir
-------------------------------------------
Temp dir is C:\DOCUME~1\ERIC~1.JON\LOCALS~1\Temp\
Temp dir is writeable
Temp dir alignment with system clock is 0 ms

-------------------------------------------
 Locale information
-------------------------------------------
Timezone Eastern Standard Time offset=-18000000

-------------------------------------------
 Proxy information
-------------------------------------------
Java1.5+ proxy settings:
Direct connection

Eric

On Feb 12, 2008 2:40 PM, Scot P. Floess <floess@mindspring.com> wrote:
> This worked for me just fine...
>
> Here is my build.xml:
>
> <project>
>       <replaceregexp file="some.sql"
>                          match="\[[a-zA-Z0-1]{1,}\]"
>                          replace="[100]"
>                          byline="true"/>
> </project>
>
> Here is my sample file some.sql:
>
> USE [dacsdce]
> /****** Object:  Default [DF_formEnvironment_adminonly]    Script
> Date: 01/29/2008 20:15:03 ******/
> IF  EXISTS (SELECT * FROM sys.default_constraints WHERE object_id =
> OBJECT_ID(N'[dbo].[DF_formEnvironment_adminonly]') AND
> parent_object_id = OBJECT_ID(N'[dbo].[formEnvironment]'))
>
> Here is the result:
>
> USE [100]
> /****** Object:  Default [DF_formEnvironment_adminonly]    Script
> Date: 01/29/2008 20:15:03 ******/
> IF  EXISTS (SELECT * FROM sys.default_constraints WHERE object_id =
> OBJECT_ID(N'[100].[DF_formEnvironment_adminonly]') AND
> parent_object_id = OBJECT_ID(N'[100].[formEnvironment]'))
>
>
>
>
> jonese wrote:
> > I used Regex Coach to debug the expression and it shows it working.
> >
> > HOWEVER when run my target using -debug i get the following
> >
> > sql-gen-schema-file:
> > [replaceregexp] Replacing pattern '\[[a-zA-Z0-1]{1,}\]' with
> > '[healthinteractionsbs]' in 'C:\working\healthinteractions.com\DB\MS
> > SQL 2005\boomsocket_MSSQL_2005.sql' with flags: 'i'.
> > [replaceregexp] No change made
> >
> > the .sql file looks like so
> >
> > USE [dacsdce]
> > /****** Object:  Default [DF_formEnvironment_adminonly]    Script
> > Date: 01/29/2008 20:15:03 ******/
> > IF  EXISTS (SELECT * FROM sys.default_constraints WHERE object_id =
> > OBJECT_ID(N'[dbo].[DF_formEnvironment_adminonly]') AND
> > parent_object_id = OBJECT_ID(N'[dbo].[formEnvironment]'))
> > <<SNIP>>
> >
> > it should change USE [dacsdce] to USE [healthinteractionsbs]
> >
> > anyone see anything wrong with my regex or the file data?
> >
> > thanks in advance
> > eric
> >
> >
> > On Feb 12, 2008 1:03 PM, Scot P. Floess <floess@mindspring.com> wrote:
> >
> >> Are you sure the reg ex is working?  If not, nothing will be changed in
> >> the file...
> >>
> >> Can you send the sql file or some snippet of it?
> >>
> >>
> >>
> >> jonese wrote:
> >>
> >>> I have a simple build file and i'm trying to change some text in a .SQL
file.
> >>>
> >>> in my build file i have the following target
> >>> <target name="sql-gen-schema-file" description="generates the file
> >>> which creates tables, views etc">
> >>> <replaceregexp file="DB/MS SQL
> >>> ${db.server.version}/boomsocket_MSSQL_${db.server.version}.sql"
> >>>       match="\[[a-zA-Z0-1]{1,}\]"
> >>>       replace="[${db.name}]"
> >>>       flags="i" />
> >>> </target>
> >>>
> >>> I know the regex is good but every time i run it nothing happens to my
> >>> .SQL file.
> >>>
> >>> am i missing something?
> >>>
> >>> Running ant 1.7.x on Windows XP Pro
> >>>
> >>> eric
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> >>> For additional commands, e-mail: user-help@ant.apache.org
> >>>
> >>>
> >>>
> >>>
> >> --
> >> Scot P. Floess
> >> 27 Lake Royale
> >> Louisburg, NC  27549
> >>
> >> 252-478-8087 (Home)
> >> 919-754-4592 (Work)
> >>
> >> Chief Architect JPlate   http://sourceforge.net/projects/jplate
> >> Chief Architect JavaPIM  http://sourceforge.net/projects/javapim
> >>
> >> Architect Keros          http://sourceforge.net/projects/keros
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> >> For additional commands, e-mail: user-help@ant.apache.org
> >>
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> > For additional commands, e-mail: user-help@ant.apache.org
> >
> >
> >
>
> --
> Scot P. Floess
> 27 Lake Royale
> Louisburg, NC  27549
>
> 252-478-8087 (Home)
> 919-754-4592 (Work)
>
> Chief Architect JPlate   http://sourceforge.net/projects/jplate
> Chief Architect JavaPIM  http://sourceforge.net/projects/javapim
>
> Architect Keros          http://sourceforge.net/projects/keros
>
>

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


Mime
View raw message