uh, this time, I can't see anything wrong: there must be a subtle mistake somewhere. Can you attach your build.xml and output of "ant -diagnostics"?
Le dimanche 18 mai 2008, sudheshna iyer a écrit : > Thank you very much for your help. > > As per the instructions, I have downloaded > maven-ant-tasks-2.0.9.jar and put it in the ant lib > directory. > I also can find it in the list of directories when I > do ant -diagnostics. > > But when I run build.xml, I get the following error: > ....build.xml:4: Unexpected attribute > "xmlns:artifact" > > My build.xml: > > <?xml version="1.0"?> > <project name="Harnessing Hibernate 3 (Developer's > Notebook Second Edition)" > default="db" basedir="." > > xmlns:artifact="antlib:org.apache.maven.artifact.ant"> > > <!-- Set up properties containing important project > directories --> > <property name="source.root" value="src"/> > <property name="class.root" value="classes"/> > <property name="data.dir" value="data"/> > > <artifact:dependencies > pathId="dependency.class.path"> > <dependency groupId="hsqldb" artifactId="hsqldb" > version="1.8.0.7"/> > <dependency groupId="org.hibernate" > artifactId="hibernate" > version="3.2.5.ga"> > <exclusion groupId="javax.transaction" > artifactId="jta"/> > </dependency> > <dependency groupId="org.hibernate" > artifactId="hibernate-tools" > version="3.2.0.beta9a"/> > <dependency groupId="org.apache.geronimo.specs" > artifactId="geronimo-jta_1.1_spec" > version="1.1"/> > <dependency groupId="log4j" artifactId="log4j" > version="1.2.14"/> > </artifact:dependencies> > ..... > > --- Hervé BOUTEMY <[EMAIL PROTECTED]> wrote: > > yes, it seems like you are trying to use Maven Ant > > Tasks (maven-ant-tasks.jar) > > in an Ant build (build.xml) > > > > The doc is here: > > http://maven.apache.org/ant-tasks.html > > The tasks can be downloaded here: > > http://www.apache.org/dyn/closer.cgi/maven/binaries/maven-ant-tasks-2.0.9.j >ar > > > Regards, > > > > Hervé > > > > Le samedi 17 mai 2008, Wayne Fay a écrit : > > > As Wendy told you on the Dev list, Maven2 does not > > > > use files named > > > > > build.xml but rather files named pom.xml. > > > > > > Thus, it seems like you do not have a Maven > > > > project at all, but rather > > > > > some Ant build script (I guess?). Where did this > > > > build.xml file come > > > > > from -- you should probably ask that person how > > > > you should run it. > > > > > Wayne > > > > > > On 5/16/08, sudheshna iyer > > > > <[EMAIL PROTECTED]> wrote: > > > > I have downloaded apache-maven-2.0.9-bin.tar.gz > > > > and > > > > > > extracted to dir: C:\apache-maven-2.0.9 > > > > > > > > I have added C:\apache-maven-2.0.9 to the path. > > > > When I > > > > > > run "mvn --version" at cmd prompt, I got the > > > > following results: > > > > > > > > C:\Work\GettingStartedWithHibernate3>mvn > > > > --version > > > > > > Maven version: 2.0.9 > > > > Java version: 1.5.0_05 > > > > OS name: "windows xp" version: "5.1" arch: "x86" > > > > Family: "windows" > > > > > > > > I have a build file with the following lines: > > > > > > > > <artifact:dependencies > > > > pathId="dependency.classpath"> > > > > <dependency groupId="hsqldb" > > > > artifactId="hsqldb" > > > > > > version="1.8.0.7"/> > > > > <dependency groupId="org.hibernate" > > > > artifactId="hibernate" > > > > version="3.2.5.ga"> > > > > <exclusion groupId="javax.transaction" > > > > artifactId="jta"/> > > > > </dependency> > > > > <dependency groupId="org.hibernate" > > > > artifactId="hibernate-tools" > > > > version="3.2.0.beta9a"/> > > > > <dependency > > > > groupId="org.apache.geronimo.specs" > > > > artifactId="geronimo-jta_1.1_spec" > > > > > > version="1.1"/> > > > > <dependency groupId="log4j" > > > > artifactId="log4j" > > > > > > version="1.2.14"/> > > > > </artifact:dependencies> > > > > > > > > But when I run the above build.xml, I receive > > > > the > > > > > > following error: > > > > > > > > Buildfile: build.xml > > > > > > > > BUILD FAILED > > file:C:/Work/GettingStartedWithHibernate3/build.xml:11: > > > > Unexpected element "artifact:dependencies" > > > > > > > > What am I missing? > > --------------------------------------------------------------------- > > > > > 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] > > --------------------------------------------------------------------- > > > 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]