Hello,
I will discuss upgrading our antrun plugin with my group,
but some dependencies seem to be up to date....
Thank you for taking the time.
Chris
P.S. Here is the plugin config:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.2</version>
<dependencies>
<dependency>
<groupId>ant</groupId>
<artifactId>ant-nodeps</artifactId>
<version>1.6.5</version>
</dependency>
<!-- For populating version files Could probably be
replaced by xmltask -->
<dependency>
<groupId>jakarta-regexp</groupId>
<artifactId>jakarta-regexp</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>ant</groupId>
<artifactId>ant-jakarta-regexp</artifactId>
<version>1.6.1</version>
</dependency>
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>1.5.0</version>
<scope>system</scope>
<systemPath>${java.home}/../lib/tools.jar</systemPath>
</dependency>
<dependency>
<!-- For codesigning loop -->
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
<version>1.0b3</version>
</dependency>
<dependency>
<!-- For xslt task -->
<groupId>ant</groupId>
<artifactId>ant-trax</artifactId>
<version>1.6.5</version>
</dependency>
<dependency>
<!-- For XSLT 2.0 transform in xslt task -->
<groupId>net.sf.saxon</groupId>
<artifactId>saxon</artifactId>
<version>8.7</version>
</dependency>
</dependencies>
</plugin>
-----Original Message-----
From: Dennis Lundberg [mailto:[email protected]]
Sent: Tuesday, November 09, 2010 11:49 AM
To: Maven Developers List
Subject: Re: running net start fails from Maven but succeeds from Ant
On 2010-11-09 20:23, Hahn, Christopher (SAN DIEGO) wrote:
> Hi,
>
> Thank you for getting back to me.
>
> I am seeing version 1.2 of the plugin.
This is rather old. The latest version is 1.6. Please try that one.
> The weird thing is that the ant I used (1.8) was only installed,
> by me, in order to drive the "ant only" command line test.
>
> I could not find an ant install on this box, and am thinking
> that Maven is using its own plugins to run this within Maven.
The Maven plugin has its own internal copy of Ant. It doesn't use the
one that you installed.
> ....what seems odd to me is that I am using the simplest aspects
> of this capability. ...i.e. a straight exec with args.
>
> no conditionals or such.
What does your plugin config look like?
>
> Thanks again,
>
> Chris
>
> -----Original Message-----
> From: Dennis Lundberg [mailto:[email protected]]
> Sent: Tuesday, November 09, 2010 11:04 AM
> To: Maven Developers List
> Subject: Re: running net start fails from Maven but succeeds from Ant
>
> Hi
>
> I assume that you are using the Maven AntRun Plugin to run the snippet,
> but you didn't tell us which version of the plugin you are using.
> Different versions of the plugin uses/supports different versions of Ant.
>
> http://maven.apache.org/plugins/maven-antrun-plugin/
>
> On 2010-11-09 19:50, Hahn, Christopher (SAN DIEGO) wrote:
>> Hello all,
>>
>>
>>
>> I am looking into why an Ant task is failing from Maven, but succeeding
>>
>> when called directly using ant.
>>
>>
>>
>> We have in a build.xml this block:
>>
>> ===============================================
>>
>> <target name="restartora">
>>
>> <exec executable="C:/Windows/system32/net.exe" failonerror="false">
>>
>> <arg line="stop OracleServiceORCL"/>
>>
>> </exec>
>>
>> <exec executable="C:/Windows/system32/net.exe" failonerror="true">
>>
>> <arg line="start OracleServiceORCL"/>
>>
>> </exec>
>>
>> </target>
>>
>> ===============================================
>>
>>
>>
>> I added this target as a dependency to an oracle load target and
>>
>> am getting this error:
>>
>> ===============================================
>>
>> [concat] restartora:
>> [concat] [INFO]
>> ------------------------------------------------------------------------
>> [concat] [ERROR] BUILD ERROR
>> [concat] [INFO]
>> ------------------------------------------------------------------------
>> [concat] [INFO] An Ant BuildException has occured: The following error
>> occurred while executing this line:
>> [concat] <SNIP>/build.xml:121: Execute failed: java.io.IOException:
>> Cannot run program "C:/Windows/system32/net.exe" (in directory
>> "<SNIP>"): error=2, No such file or directory
>> [concat] [INFO]
>> ------------------------------------------------------------------------
>>
>> ===============================================
>>
>>
>>
>> However, when run from the command line using Ant, I see:
>>
>> ===============================================
>>
>> D:\<SNIP>d:\ant\apache-ant-1.8.0\bin\ant.bat -f build.xml restartora
>>
>> Buildfile: D:\<SNIP>\build.xml
>>
>>
>>
>> restartora:
>>
>> [exec] The OracleServiceORCL service is stopping.......
>>
>> [exec] The OracleServiceORCL service was stopped successfully.
>>
>> [exec]
>>
>> [exec] The OracleServiceORCL service is starting....
>>
>> [exec] The OracleServiceORCL service was started successfully.
>>
>> [exec]
>>
>>
>>
>> BUILD SUCCESSFUL
>>
>> Total time: 30 seconds
>>
>> D:\ <SNIP>
>>
>> ===============================================
>>
>>
>>
>> I fully qualified the references, and so do not think that this is
>>
>> an environment issue....(but this is still what I suspect, as my
>>
>> Ant might be too-much newer than my Maven)
>>
>>
>>
>> I am using:
>>
>> ===============================================
>>
>> D:\p4\SM\7.10\7.11\server\test\smsetup>set MAVEN_OPTS=-Xmx1024m -Xms128m
>>
>> Maven version: 2.0.10
>>
>> Java version: 1.5.0_19
>>
>> OS name: "windows 2003" version: "5.2" arch: "x86" Family: "windows"
>>
>> ===============================================
>>
>>
>>
>> Any kicks in the head appreciated,
>>
>>
>>
>> Chris
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> cid:[email protected]
>>
>>
>>
>> *Christopher Hahn*
>> The Dude
>>
>> Software Production Engineering
>> R&D Services, Hewlett-Packard
>> Phone: 858-655-4096
>> Cell: 619-630-9791
>> [email protected] <mailto:[email protected]>
>>
>>
>>
>> */Visit our SPE Portal/*
>> <http://teams5.sharepoint.hp.com/teams/SPE/default.aspx>*//*
>>
>> ------------------------------------------------------------------------
>>
>>
>>
>>
>>
>
>
--
Dennis Lundberg
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]