Thursday 15 August 2013

java - Error with self-bootstrapping Ant build -


I am trying to write an ant build which is not I need to add anti-plugins Is the ant Lib's directory, or / home / mysuser /. Ent / Lib , or in my Eclipse example Ent Home, etc.; That is because I can finally build my project on a host Jenkins server, where I do not have access to the system's ant establishment.

I'm calling it "self-bootstrapping" building, because I use IVs

The aura of my creation (using the plugin as an example: & lt; path id = " Build.path "& gt; fileset dir =" $ {Lib.buildtime.dir} "includes =" ** / * .jar "/> gt; & lt; / path & gt; ; ; lv; ivy: resolution file = "$ {ivy.xml}" /> gt; iv: pattern = "$ {gen.lib.main.dir } / [Artifact] - [amendment] Receive. [Ext] "conf =" main "/> & lt; iv: pattern =" $ {gen.lib.test.dir} / [artifact] - [amendment]. [Ext] "conf =" test "/> & lt; IV: get pattern =" $ {gen.lib.buildtime.dir} / [artifact] - [amendment]. [Ext] "conf =" buildtime "/> & lt; IV: report todir =" $ {gen.staging.dir} "/> & lt; iv: cache path path =" build.path "conf = "Buildtime" /> gt; target name = "taskdefs" depend = "solved"> gt; troubleshoot resource = "/ net / sf / extradib / entrleb" XML "URI =" Antibyl: Net SF. Antarbib "classpathref =" build.path "/> & gt; Property name =" Fajj "value =" discussion "/> gt; antcontrib: if & gt; ; & Lt; antcontrib: par arg1 = "$ {fez}" arg2 = "buzz" /> gt; antcontrib: then> echo message = "fuzzy buzz!" / & Gt; & lt ; / Antcontrib: then> gt; antcontrib: and & gt; & lt; echo message = "fuzz is not buzz!" / & Gt; & lt; / antcontrib: and & gt; & lt; / antcontrib: If I run the taskdefs target, then my entry output will be done if & gt; & lt; / target & gt; & gt; Project & gt;

In an echo " Fuzzed ! "Instead of seeing the message, I get the following error:

  build failel / home / menu / deception / workspace / map / build.xml: 169: problem: work or type Failed to create antible: net.sf.antcontrib: If the reason: Name is undefined Action: Check spelling Action: Check that any custom works / types have been declared Action: Check that any & lt; presetdef & Gt; / & lt; macrodf & gt; declarations have taken place in this namespace E type or functions have not been defined, but this is an antibab declaration. Action: Check that the implementation library exists in one of: - / home / myuser / eclipse / plugins / org.apache.ant_1.8.3.v201301120609 / Lib - / home / myuser / .ac / lib -a directory has been added to the command-line with LB logic   

What am I trying to do (recommended above To avoid doing 1 out of 3) is impossible? If so, why? If not, in my setup Thank you in advance!

I would normally create a single "bootstrap" target and use it To install Ivy "$ HOME / .ant / lib" directory < In the end, it is a shame that Ivy has an ANT Is not packaged with default. If you search for your hosted service then prevent you from copying files to the Home directory, then the easiest thing is to send a copy of Ivy Jar with your source (and enable it using the workforce)

Update

Use the following taskdef for ant-contrib:

  & lt; Taskdef uri = "antlib: net.sf.antcontrib" classpathref = "build.path" />   

Update the requirements In recent times the library was redistributed as one at some level.

No comments:

Post a Comment