hi  Macro
Actuly  ${maven.build.dir}/${pom.artifactId}-${ pom.currentVersion}.jar"
this is working fine in maven 1.X and it will give you the location of your
target folder and give the name of your jar file like
 src
  target(${maven.build.dir}/)
         my-1.0.jar(${pom.artifactId}-${ pom.currentVersion}.jar)

yes i am using multiproject

i have used maven 1.x now our company moving to maven 2.x but converting our
project.xml to pom.xml have difficulty and i am not able to call ant task in
my pom

can you please sen me some pom eg where ant are called

Thanks in advances
Neeraj

On 10/4/06, Marco Mistroni <[EMAIL PROTECTED]> wrote:

Hello,
maven2 will result in an error if the execution of your ant task fails..
try to use this in your pom.xml, you'll see that maven will error out

<taskdef name="webdoclet" classname="xdoclet.modules.web.WebDocletTask"/>
<webdoclet destdir="."/>

if you havent imported proper dependencies and defined the classpath, ant
wont be able to execute your task and  maven will error out =(like' cannot
find clas sblah blah blah)

again, try to echo

${maven.build.dir}/${pom.artifactId}-${ pom.currentVersion}.jar"

do you have a multiproject?
can you tell the structure of your project?

ant task might be executing from a different directory that you might
think

hth
marco


On 10/4/06, neeraj daffodil <[EMAIL PROTECTED]> wrote:
>
> hi Wayne
>    Thanks for your link
> Actully i am not geeting any ant error ,maven should have to give the
> error
> if we are wrong
> yes you are right that i have wrong syntex
> but still maven show build succesfully i am not able to understand why
> this
> is happening
> and still in delima how i call ant task in my pom
>
> Regards
> Neeraj
>
>
>
> On 10/4/06, Wayne Fay <[EMAIL PROTECTED]> wrote:
> >
> > First off, your XML is not well-formed. <echo>...</ant:echo> doesn't
> > look like valid XML, so I'm not surprised its not working right for
> > you. Also you enclosed the <echo/> node inside an <ant> node but then
> > the <copy/> node was outside it. So you need to make the XML proper
> > before proceeding. Follow the examples online or search this mailing
> > list for tons of Antrun plugin examples.
> >
> > Second, you might want to specify <copy ... verbose="true"> which
> > might provide additional information from Ant when it is doing the
> > file copy. I'm not using <copy/> right now personally so no
> > guarantees, but that is what the Ant Copy task webpage says:
> > http://ant.apache.org/manual/CoreTasks/copy.html
> >
> > Wayne
> >
> > On 10/4/06, Marco Mistroni <[EMAIL PROTECTED]> wrote:
> > > hello,
> > >   check what is the actual value of ${maven.build.dir}/${
> pom.artifactId
> > }-${
> > > pom.currentVersion}.jar" by echoing...
> > >
> > > maven will result in a success regardless the outcome of copy (pls
> > anyone
> > > correct me if i m mwrong, but i have experienced same behaviour)..
> > >
> > > hth
> > >  marco.
> > >
> > >
> > >
> > > On 10/4/06, Neeraj Bisht <[EMAIL PROTECTED]> wrote:
> > > >
> > > > hi all
> > > >            i want to include ant task in my pom (maven 2.0.4 ) but
> how
> > i
> > > > can
> > > > proceed , i do not know
> > > > i did googling and find some link on apache site
> > > > http://maven.apache.org/plugins/maven-antrun-plugin/usage.html
> > > > but here it is not clear and i tried i did not get any error and
> also
> > i am
> > > > unable to run ant task
> > > > i did not get the echo command please if any one have good link or
> eg
> > > > please
> > > > send me
> > > >
> > > > <pluginManagement>
> > > >    <plugins>
> > > >     <plugin>
> > > >         <artifactId>maven-antrun-plugin</artifactId>
> > > >         <executions>
> > > >           <execution>
> > > >             <phase>package</phase>
> > > >             <configuration>
> > > >               <tasks>
> > > >          <ant>
> > > >             <echo>hi this is runing ant task</ant:echo>
> > > > </ant>
> > > >             <copy file="${maven.build.dir}/${pom.artifactId}-${
> > > > pom.currentVersion}.jar" tofile="${user.home}/.m2/repository/${
> > pom.groupId
> > > > }/hars/${pom.artifactId}-${pom.currentVersion}.har"/>
> > > >
> > > >               </tasks>
> > > >             </configuration>
> > > >             <goals>
> > > >               <goal>run</goal>
> > > >             </goals>
> > > >           </execution>
> > > >         </executions>
> > > >       </plugin>
> > > > </plugins>
> > > >
> > > > </pluginManagement>
> > > >
> > > > both echo and copy command are not working and maven 2.0.4 show
> build
> > > > succesful
> > > >
> > > > Regards
> > > >
> > > > Neeraj
> > > >
> > > >
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>


Reply via email to