eboy.test | 1 Dec 2010 10:50
Picon

Re: Running Ant target from a jar


David Weintraub wrote:
> 
> On Tue, Nov 30, 2010 at 6:39 AM, eboy.test <kchintal <at> edu.uni-klu.ac.at>
> wrote:
>>
>> I am using a ant build file to run targets (ant targets) in a Java API.
>> Now,
>> i want to make a jar out of the API and i want to know whether i will be
>> able to run the targets now with the jar.
> 
> A jarfile is just like a directory in Java. You specify the JAR in
> your CLASSPATH, and the classfiles it contains are available for you
> to run.
> 
> -- 
> David Weintraub
> qazwart <at> gmail.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe <at> ant.apache.org
> For additional commands, e-mail: user-help <at> ant.apache.org
> 
> 
> 

you mean with java ? 

e.g. javaw - jar test.jar 

(Continue reading)

Laurence Mills-Gahl | 1 Dec 2010 17:45
Picon

sql task output suppressing a column

I am having difficulty with the results of a sql task not being the same
as the results from the sql query in the db environment and I am
wondering if anybody else has seen this behavior.

I have a sql task executing the following query:

SELECT
c.property_value,
center.name,
s.property_value
FROM center INNER JOIN center_property c ON center.centerKey =
c.centerKey AND c.property_type = '_CODE'
LEFT OUTER JOIN center_property s ON center.centerKey = s.centerKey AND
s.property_type = '_STATUS'
WHERE center.parentCenterFK = 147
AND center.active = 1
ORDER BY center.name ASC

The 'center' table is joined to the 'center_property' table twice using
the property_type _CODE and _STATUS in order to get the values for the
_CODE and _STATUS. This query gives me the expected results from within
the mysql commandline tool and gui manager.
From ant though, I get the code property value and the status property
value, but the center.name column is always blank.

I have thought about the column 'name' being a reserved word but quoting
the column name or making it an alias works with the command line query,
but gives the same results via ant.

I have tried moving the sql to an external resource file as well as
(Continue reading)

Rainer Noack | 1 Dec 2010 21:03
Favicon

AW: sql task output suppressing a column

Hmm, sounds like a driver problem (jdbc vs. Native) , not an ant issue.

-----Ursprüngliche Nachricht-----
Von: Laurence Mills-Gahl [mailto:elemgee <at> gmail.com] 
Gesendet: Mittwoch, 1. Dezember 2010 17:45
An: user <at> ant.apache.org
Betreff: sql task output suppressing a column

I am having difficulty with the results of a sql task not being the same as
the results from the sql query in the db environment and I am wondering if
anybody else has seen this behavior.

I have a sql task executing the following query:

SELECT
c.property_value,
center.name,
s.property_value
FROM center INNER JOIN center_property c ON center.centerKey = c.centerKey
AND c.property_type = '_CODE'
LEFT OUTER JOIN center_property s ON center.centerKey = s.centerKey AND
s.property_type = '_STATUS'
WHERE center.parentCenterFK = 147
AND center.active = 1
ORDER BY center.name ASC

The 'center' table is joined to the 'center_property' table twice using the
property_type _CODE and _STATUS in order to get the values for the _CODE and
_STATUS. This query gives me the expected results from within the mysql
commandline tool and gui manager.
(Continue reading)

Michael Ludwig | 1 Dec 2010 21:16
Picon
Picon

Re: Running Ant target from a jar

eboy.test schrieb am 01.12.2010 um 01:50 (-0800):

> I want something like
> 
> e.g. ant -jar test.jar rundemo
> 
> here rundemo is the ant target, which invokes a class from test
> package 

Have you tried running ant -h ? It would point you to -lib.

--

-- 
Michael Ludwig
Laurence Mills-Gahl | 2 Dec 2010 01:13
Picon

Re: AW: sql task output suppressing a column

Good idea, but it's not a driver issue. A small jdbc app executing the
same query with the same version of the driver gives me a result set as
expected.

On 12/1/10 3:03 PM, Rainer Noack wrote:
> Hmm, sounds like a driver problem (jdbc vs. Native) , not an ant issue.
>
> -----Ursprüngliche Nachricht-----
> Von: Laurence Mills-Gahl [mailto:elemgee <at> gmail.com] 
> Gesendet: Mittwoch, 1. Dezember 2010 17:45
> An: user <at> ant.apache.org
> Betreff: sql task output suppressing a column
>
> I am having difficulty with the results of a sql task not being the same as
> the results from the sql query in the db environment and I am wondering if
> anybody else has seen this behavior.
>
> I have a sql task executing the following query:
>
> SELECT
> c.property_value,
> center.name,
> s.property_value
> FROM center INNER JOIN center_property c ON center.centerKey = c.centerKey
> AND c.property_type = '_CODE'
> LEFT OUTER JOIN center_property s ON center.centerKey = s.centerKey AND
> s.property_type = '_STATUS'
> WHERE center.parentCenterFK = 147
> AND center.active = 1
> ORDER BY center.name ASC
(Continue reading)

Laurence Mills-Gahl | 2 Dec 2010 04:49
Picon

Re: AW: sql task output suppressing a column

The problem seems to have been somewhere in the difference between sun
java libraries and gnu. The process worked as expected on Mac OS X but
not on SuSE Linux (until I switched to the Sun JVM and libraries).
I don't know more than that at this point, but the expected behavior is
back. It does seem odd that one column out of three would not display,
but for the moment, I'm going to go with the library mismatch.

On 12/1/10 3:03 PM, Rainer Noack wrote:
> Hmm, sounds like a driver problem (jdbc vs. Native) , not an ant issue.
>
> -----Ursprüngliche Nachricht-----
> Von: Laurence Mills-Gahl [mailto:elemgee <at> gmail.com] 
> Gesendet: Mittwoch, 1. Dezember 2010 17:45
> An: user <at> ant.apache.org
> Betreff: sql task output suppressing a column
>
> I am having difficulty with the results of a sql task not being the same as
> the results from the sql query in the db environment and I am wondering if
> anybody else has seen this behavior.
>
> I have a sql task executing the following query:
>
> SELECT
> c.property_value,
> center.name,
> s.property_value
> FROM center INNER JOIN center_property c ON center.centerKey = c.centerKey
> AND c.property_type = '_CODE'
> LEFT OUTER JOIN center_property s ON center.centerKey = s.centerKey AND
> s.property_type = '_STATUS'
(Continue reading)

Garrett Smith | 14 Dec 2010 06:33
Picon
Gravatar

CHMOD and "."

I want Ant to change permissions on a directory, recursively. I have:

        <chmod perm="755">
        	<fileset dir="${build}/domunit"/>
        </chmod>

Yet the result does not include the "domunit" directory itself (see
below). How can I change this to set the permission on "." to 755?

tomomi:domunit garrett$ pwd
/Users/garrett/workspace/ape-javascript-library/build/domunit
tomomi:domunit garrett$ ls -al
total 136
drwx------   5 garrett  staff    170 Dec 12 22:03 .
drwx------  68 garrett  staff   2312 Dec 13 01:43 ..
-rwxr-xr-x   1 garrett  staff    625 Dec 12 22:03 TestReporter.css
-rwxr-xr-x   1 garrett  staff  64071 Dec 12 22:03 domunit.js
drwxr-xr-x   3 garrett  staff    102 Dec  8 21:23 eventsynth
tomomi:domunit garrett$
--

-- 
Garrett
Roos Tomas | 14 Dec 2010 09:47
Favicon

Fixed default target

Hey!

I'm wondering if it's possible to have a fixed default target, which
always executes instead of what's put on the command-line?

The reason for this is we use the depends feature of ant to be able to
for instance publish to an ivy repository with a better flow. ant local
milestone publish.

And for the toplevel I want to by using the invoked-targets property
pass this on to the a subant. The thing is
${ant.project.invoked-targets} is not available before hitting the first
target.

So is there a way of always hitting the same target, event with targets
specified on the command line? 

I can't really see why the bug regarding ${ant.project.invoked-targets}
was implemented if this is not possible, since when you would anyway
need to create all these extra targets at the toplevel ?

Thanks in advance, hope you understood.

Best regards, Tomas

Jo Support | 14 Dec 2010 12:09
Picon

propertyfile task and escaping

Hello,

Scenario: Ant 1.8.0 on WinXP

is there a way to avoid escaping chars by propertyfile task?

The following task

<propertyfile file="myFile.properties">
	<entry  key="MY_URL" value="http://mydomain/"/>
</propertyfile>

produces the following file

MY_URL=http\://mydomain/

that is bad.
I know there are other solutions, like echoing a new property file
(but I have a lot of other properties inside the file that I don't
have to change, and I would like not to list them just because of the
new file creation) and/or using the simple replace task (but I should
know the original value of the property to indicate the token, and I
don't know it).

Any suggestion?

Thanks a lot
Jo
Scot P. Floess | 14 Dec 2010 14:37
Picon
Gravatar

Re: CHMOD and "."


Not sure this will work, but maybe:
         <chmod perm="755">
                <fileset dir="${build}/../domunit"/>
         </chmod>

On Mon, 13 Dec 2010, Garrett Smith wrote:

> I want Ant to change permissions on a directory, recursively. I have:
>
>        <chmod perm="755">
>        	<fileset dir="${build}/domunit"/>
>        </chmod>
>
> Yet the result does not include the "domunit" directory itself (see
> below). How can I change this to set the permission on "." to 755?
>
> tomomi:domunit garrett$ pwd
> /Users/garrett/workspace/ape-javascript-library/build/domunit
> tomomi:domunit garrett$ ls -al
> total 136
> drwx------   5 garrett  staff    170 Dec 12 22:03 .
> drwx------  68 garrett  staff   2312 Dec 13 01:43 ..
> -rwxr-xr-x   1 garrett  staff    625 Dec 12 22:03 TestReporter.css
> -rwxr-xr-x   1 garrett  staff  64071 Dec 12 22:03 domunit.js
> drwxr-xr-x   3 garrett  staff    102 Dec  8 21:23 eventsynth
> tomomi:domunit garrett$
>

--

-- 
(Continue reading)


Gmane