You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Matt Raible <mr...@gmail.com> on 2006/08/31 22:50:09 UTC
Cargo and Ant Properties
This might be a Cargo question, but I tried to subscribe to their
mailing list several times w/o success. Must be on of those days...
;-)
I seem to have successfully integrated Cargo with Canoo WebTest using
Maven 2. I'm doing this as part of AppFuse's move from Ant to Maven
2. My antrun-plugin is configured as follows:
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>integration-test</phase>
<configuration>
<tasks>
<taskdef
file="src/test/resources/webtestTaskdefs.properties"/>
<mkdir dir="target/webtest-data"/>
<!-- Delete old results file if it exists -->
<delete
file="target/webtest-data/web-tests-result.xml"/>
<!-- This is so the default will be
used if no test case is specified -->
<property name="testcase"
value="run-all-tests"/>
<echo level="info">Testing with locale
'${user.language}'</echo>
<ant
antfile="src/test/data/web-tests.xml" inheritRefs="true"/>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
...
</plugin>
The echo from my pom.xml works fine:
[echo] Testing with locale 'en'
But it doesn't seem like this property (${user.language}) is resolved
in the web-tests.xml file that's called.
[INFO] [talledLocalContainer] WARN - ValidatorResources.getForm(448) |
Form 'null' not found for locale '${user.language}'
Is it possible to read Cargo's properties in the Ant file that's
called? For example, it'd be nice if I could make my host, port and
basepath values variables rather than hard-coded.
<config host="localhost" port="8080" protocol="http"
basepath="appfuse-spring-war-2.0-SNAPSHOT"
resultpath="target/webtest-data" saveresponse="true"
resultfile="web-tests-result.xml" summary="true">
<header name="Accept-Language" value="${user.language}"/>
</config>
I've attached my pom.xml in case someone has time to critique it.
Thanks,
Matt
Re: Cargo and Ant Properties
Posted by Matt Raible <mr...@gmail.com>.
On 8/31/06, Matt Raible <mr...@gmail.com> wrote:
> On 8/31/06, Vincent Massol <vi...@massol.net> wrote:
> > Hi Matt,
> >
> > > -----Original Message-----
> > > From: Matt Raible [mailto:mraible@gmail.com]
> > > Sent: jeudi 31 août 2006 22:50
> > > To: Maven Users List
> > > Subject: Cargo and Ant Properties
> > >
> > > This might be a Cargo question, but I tried to subscribe to their
> > > mailing list several times w/o success. Must be on of those days...
> > > ;-)
> >
> > I thought you were already subscribed... Codehaus has moved to a new system
> > since the outage of a few months back. There's now a web interface for doing
> > everything. See http://xircles.codehaus.org/manage_email
>
> Yeah, I saw (and used) that. For some reason, it didn't subscribe me
> using Firefox on OS X. The problem is likely user error. ;-)
>
> >
> > > I seem to have successfully integrated Cargo with Canoo WebTest using
> > > Maven 2. I'm doing this as part of AppFuse's move from Ant to Maven
> > > 2. My antrun-plugin is configured as follows:
> > >
> > > <plugin>
> > > <artifactId>maven-antrun-plugin</artifactId>
> > > <executions>
> > > <execution>
> > > <phase>integration-test</phase>
> > > <configuration>
> > > <tasks>
> > > <taskdef
> > > file="src/test/resources/webtestTaskdefs.properties"/>
> > > <mkdir dir="target/webtest-data"/>
> > > <!-- Delete old results file if it exists
> > > -->
> > > <delete
> > > file="target/webtest-data/web-tests-result.xml"/>
> > > <!-- This is so the default will be
> > > used if no test case is specified -->
> > > <property name="testcase"
> > > value="run-all-tests"/>
> > > <echo level="info">Testing with locale
> > > '${user.language}'</echo>
> > > <ant
> > > antfile="src/test/data/web-tests.xml" inheritRefs="true"/>
> > > </tasks>
> > > </configuration>
> > > <goals>
> > > <goal>run</goal>
> > > </goals>
> > > </execution>
> > > </executions>
> > > ...
> > > </plugin>
> > >
> > > The echo from my pom.xml works fine:
> > >
> > > [echo] Testing with locale 'en'
> > >
> > > But it doesn't seem like this property (${user.language}) is resolved
> > > in the web-tests.xml file that's called.
> > >
> > > [INFO] [talledLocalContainer] WARN - ValidatorResources.getForm(448) |
> > > Form 'null' not found for locale '${user.language}'
> > >
> > > Is it possible to read Cargo's properties in the Ant file that's
> > > called? For example, it'd be nice if I could make my host, port and
> > > basepath values variables rather than hard-coded.
> > >
> > > <config host="localhost" port="8080" protocol="http"
> > > basepath="appfuse-spring-war-2.0-SNAPSHOT"
> > > resultpath="target/webtest-data" saveresponse="true"
> > > resultfile="web-tests-result.xml" summary="true">
> > > <header name="Accept-Language" value="${user.language}"/>
> > > </config>
> > >
> > > I've attached my pom.xml in case someone has time to critique it.
> >
> > Why don't you use Cargo's Maven2 plugin
> > (http://cargo.codehaus.org/Maven2+plugin)? :-)
>
> I am using, and it works great! However, I need to hook Cargo's
> properties in with Ant for Canoo WebTest. WebTest tests are written
> in Ant, so I want to set the configuration properties for Cargo and
> read them with Ant. Is that possible with the maven-antrun-plugin?
> Can you read properties set in pom.xml in an external build file?
To answer my own question, no - this is not possible.
http://jira.codehaus.org/browse/MANTRUN-43
OK, I can accept that for now, and use something like the following instead:
<ant antfile="src/test/data/web-tests.xml" inheritRefs="true">
<property name="user.language" value="${user.language}"/>
<property name="webapp.name" value="${build.artifactId}"/>
<property name="hostname" value="${cargo.hostname}"/>
<property name="port" value="${cargo.servlet.port}"/>
</ant>
However, this doesn't resolve the last two properties from Cargo. Do
I need to set those as <properties> in my pom.xml to read them or are
they set as part of Cargo's execution?
Matt
>
> Thanks,
>
> Matt
>
> >
> > Thanks
> > -Vincent
> >
> >
> >
> > p4.vert.ukl.yahoo.com uncompressed Thu Aug 31 20:27:00 GMT 2006
> >
> >
> > ___________________________________________________________________________
> > Découvrez un nouveau moyen de poser toutes vos questions quelque soit le sujet !
> > Yahoo! Questions/Réponses pour partager vos connaissances, vos opinions et vos expériences.
> > http://fr.answers.yahoo.com
> >
> >
> >
>
Re: Cargo and Ant Properties
Posted by Tomasz Pik <to...@gmail.com>.
On 8/31/06, Matt Raible <mr...@gmail.com> wrote:
> On 8/31/06, Vincent Massol <vi...@massol.net> wrote:
> > Hi Matt,
> >
> > > -----Original Message-----
> > > From: Matt Raible [mailto:mraible@gmail.com]
> > > Sent: jeudi 31 août 2006 22:50
> > > To: Maven Users List
> > > Subject: Cargo and Ant Properties
> > >
> > > This might be a Cargo question, but I tried to subscribe to their
> > > mailing list several times w/o success. Must be on of those days...
> > > ;-)
> >
> > I thought you were already subscribed... Codehaus has moved to a new system
> > since the outage of a few months back. There's now a web interface for doing
> > everything. See http://xircles.codehaus.org/manage_email
>
> Yeah, I saw (and used) that. For some reason, it didn't subscribe me
> using Firefox on OS X. The problem is likely user error. ;-)
Maybe you've the same problem I had today (Ruby error...) - try to go to
http://xircles.codehaus.org/my/email/settings
and just save your settings, even if it looks like current setup is OK.
After doing that I was able to subscribe to one of lists.
HTH,
Tomek
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Cargo and Ant Properties
Posted by Matt Raible <mr...@gmail.com>.
On 8/31/06, Vincent Massol <vi...@massol.net> wrote:
> Hi Matt,
>
> > -----Original Message-----
> > From: Matt Raible [mailto:mraible@gmail.com]
> > Sent: jeudi 31 août 2006 22:50
> > To: Maven Users List
> > Subject: Cargo and Ant Properties
> >
> > This might be a Cargo question, but I tried to subscribe to their
> > mailing list several times w/o success. Must be on of those days...
> > ;-)
>
> I thought you were already subscribed... Codehaus has moved to a new system
> since the outage of a few months back. There's now a web interface for doing
> everything. See http://xircles.codehaus.org/manage_email
Yeah, I saw (and used) that. For some reason, it didn't subscribe me
using Firefox on OS X. The problem is likely user error. ;-)
>
> > I seem to have successfully integrated Cargo with Canoo WebTest using
> > Maven 2. I'm doing this as part of AppFuse's move from Ant to Maven
> > 2. My antrun-plugin is configured as follows:
> >
> > <plugin>
> > <artifactId>maven-antrun-plugin</artifactId>
> > <executions>
> > <execution>
> > <phase>integration-test</phase>
> > <configuration>
> > <tasks>
> > <taskdef
> > file="src/test/resources/webtestTaskdefs.properties"/>
> > <mkdir dir="target/webtest-data"/>
> > <!-- Delete old results file if it exists
> > -->
> > <delete
> > file="target/webtest-data/web-tests-result.xml"/>
> > <!-- This is so the default will be
> > used if no test case is specified -->
> > <property name="testcase"
> > value="run-all-tests"/>
> > <echo level="info">Testing with locale
> > '${user.language}'</echo>
> > <ant
> > antfile="src/test/data/web-tests.xml" inheritRefs="true"/>
> > </tasks>
> > </configuration>
> > <goals>
> > <goal>run</goal>
> > </goals>
> > </execution>
> > </executions>
> > ...
> > </plugin>
> >
> > The echo from my pom.xml works fine:
> >
> > [echo] Testing with locale 'en'
> >
> > But it doesn't seem like this property (${user.language}) is resolved
> > in the web-tests.xml file that's called.
> >
> > [INFO] [talledLocalContainer] WARN - ValidatorResources.getForm(448) |
> > Form 'null' not found for locale '${user.language}'
> >
> > Is it possible to read Cargo's properties in the Ant file that's
> > called? For example, it'd be nice if I could make my host, port and
> > basepath values variables rather than hard-coded.
> >
> > <config host="localhost" port="8080" protocol="http"
> > basepath="appfuse-spring-war-2.0-SNAPSHOT"
> > resultpath="target/webtest-data" saveresponse="true"
> > resultfile="web-tests-result.xml" summary="true">
> > <header name="Accept-Language" value="${user.language}"/>
> > </config>
> >
> > I've attached my pom.xml in case someone has time to critique it.
>
> Why don't you use Cargo's Maven2 plugin
> (http://cargo.codehaus.org/Maven2+plugin)? :-)
I am using, and it works great! However, I need to hook Cargo's
properties in with Ant for Canoo WebTest. WebTest tests are written
in Ant, so I want to set the configuration properties for Cargo and
read them with Ant. Is that possible with the maven-antrun-plugin?
Can you read properties set in pom.xml in an external build file?
Thanks,
Matt
>
> Thanks
> -Vincent
>
>
>
> p4.vert.ukl.yahoo.com uncompressed Thu Aug 31 20:27:00 GMT 2006
>
>
> ___________________________________________________________________________
> Découvrez un nouveau moyen de poser toutes vos questions quelque soit le sujet !
> Yahoo! Questions/Réponses pour partager vos connaissances, vos opinions et vos expériences.
> http://fr.answers.yahoo.com
>
>
>
RE: Cargo and Ant Properties
Posted by Vincent Massol <vi...@massol.net>.
Hi Matt,
> -----Original Message-----
> From: Matt Raible [mailto:mraible@gmail.com]
> Sent: jeudi 31 août 2006 22:50
> To: Maven Users List
> Subject: Cargo and Ant Properties
>
> This might be a Cargo question, but I tried to subscribe to their
> mailing list several times w/o success. Must be on of those days...
> ;-)
I thought you were already subscribed... Codehaus has moved to a new system
since the outage of a few months back. There's now a web interface for doing
everything. See http://xircles.codehaus.org/manage_email
> I seem to have successfully integrated Cargo with Canoo WebTest using
> Maven 2. I'm doing this as part of AppFuse's move from Ant to Maven
> 2. My antrun-plugin is configured as follows:
>
> <plugin>
> <artifactId>maven-antrun-plugin</artifactId>
> <executions>
> <execution>
> <phase>integration-test</phase>
> <configuration>
> <tasks>
> <taskdef
> file="src/test/resources/webtestTaskdefs.properties"/>
> <mkdir dir="target/webtest-data"/>
> <!-- Delete old results file if it exists
> -->
> <delete
> file="target/webtest-data/web-tests-result.xml"/>
> <!-- This is so the default will be
> used if no test case is specified -->
> <property name="testcase"
> value="run-all-tests"/>
> <echo level="info">Testing with locale
> '${user.language}'</echo>
> <ant
> antfile="src/test/data/web-tests.xml" inheritRefs="true"/>
> </tasks>
> </configuration>
> <goals>
> <goal>run</goal>
> </goals>
> </execution>
> </executions>
> ...
> </plugin>
>
> The echo from my pom.xml works fine:
>
> [echo] Testing with locale 'en'
>
> But it doesn't seem like this property (${user.language}) is resolved
> in the web-tests.xml file that's called.
>
> [INFO] [talledLocalContainer] WARN - ValidatorResources.getForm(448) |
> Form 'null' not found for locale '${user.language}'
>
> Is it possible to read Cargo's properties in the Ant file that's
> called? For example, it'd be nice if I could make my host, port and
> basepath values variables rather than hard-coded.
>
> <config host="localhost" port="8080" protocol="http"
> basepath="appfuse-spring-war-2.0-SNAPSHOT"
> resultpath="target/webtest-data" saveresponse="true"
> resultfile="web-tests-result.xml" summary="true">
> <header name="Accept-Language" value="${user.language}"/>
> </config>
>
> I've attached my pom.xml in case someone has time to critique it.
Why don't you use Cargo's Maven2 plugin
(http://cargo.codehaus.org/Maven2+plugin)? :-)
Thanks
-Vincent
p4.vert.ukl.yahoo.com uncompressed Thu Aug 31 20:27:00 GMT 2006
___________________________________________________________________________
Découvrez un nouveau moyen de poser toutes vos questions quelque soit le sujet !
Yahoo! Questions/Réponses pour partager vos connaissances, vos opinions et vos expériences.
http://fr.answers.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org