Status/Resolution/Reason: Closed/Won't Fix/
Reporter/Name(from Bugbase): Jared Rypka-Hauer / Jared Rypka-Hauer (Jared Rypka-Hauer)
Created: 12/04/2008
Versions: 9.0
Failure Type: Unspecified
Found In Build/Fixed In Build: 0000 /
Priority/Frequency: Normal / Unknown
Locale/System: English / Platforms All
Vote Count: 12
Problem:
FROM AN EMAIL IN THE PRERELEASE FORUM:
I believe if you have SvnAnt available you have all (or most) of the svnadmin commands available.
I really want to see the major CF Admin commands implemented as ANT tasks... imagine:
<cfset appPath = expandPath("/myAppFolder/")>
<cfant defaultTarget="init">
<target name="init">
<available property="isUpdaterInstall" file="#appPath#" type="dir" />
<cfloop collection="props" item="i">
<property name="#i#" value="#props[i]#" />
</cfloop>
<mkdir dir="#appPath#" />
</target>
<target name="setupserver" depends="init">
<coldfusion adminpassword="myCfAdminPwd">
<debug activated="false" extended="false" />
<trustedcache mode="on" clear="true" />
<datasource actions="addIfMissing,verify" name="MyAppsDSN" drivertype="SQLServer" server="localhost" user="sa" ... />
</coldfusion>
</target>
<target name="updateFromSvn" depends="setupServer" if="isUpdaterInstall">
<svn ...>
<checkout .../>
</svn>
</target>
<target name="deployFromSvn" depends="setupServer" unless="isUpdaterInstall">
<svn ...>
<update .../>
</svn>
</target>
</cfant>
OR
<cfset appPath = expandPath("/myAppFolder/")>
<cfif NOT User.hasSvnRepo()>
<cfant>
<svn ...>
<!-- create user's repo for versioning uploaded documents! -->
<createRespository .../>
</svn>
</cfant>
</cfif>
OR
<!--
properties struct creates these properties before executing the first target
target specifies the first target to be examined
result captures at least stdOut, possibly exec times, result codes, etc., something parsable is best
-->
<cfant properties="#{foo="bar",dir=expandPath("/appDir")}#" source="myBuild.xml" target="myTarget" result="antOut />
<cfdump var="#antOut#" />
OR
<cfant>
<cfinclude template="myBuildFile" />
</cfant>
OR
<cfxml variable="antXml">
...
</cfxml>
<cfant>
#antXml#
</cfant>
OR...OR...OR...OR
There's about 10 million ways this could be done (and even more combinations of the above). Regardless of the ways, it MUST be done. Not having it is evil. Personally I prefer a combination of the first and second ideas, where I can actually leverage cf tag attributes to dynamically affect both the contents and the execution of my ANT script, i.e. specifying the initial target, or adding properties dynamically via the tag.
Being able to specify sourcePath, xml in the tag body, cfinclude the XML or output a variable are all valid and relatively important... at the very least supporting xml in the tag body and #xmlSource#. This will be used with dynamically constructed XML more often than not.
Treating the cfant tag like a cfoutput context is also important, think CFMAIL... anything in #...# is output automatically.
Has to at least support:
default tasks
svn tasks
FTP, Java* and jarlib* tasks
custom tasks for the CF Admin
The ability to add new tasks/libraries via the CF Administrator
If we can't get all or most of this, we'd be better off to drop into Java and just use the ANT libraries that are (currently) baked into CF. Hell, even cfexecute could be enough if CF can't give us all this stuff. This, THIS, is CF making hard things easy and bringing the power to the people! :D
Just my £10...
Pleeeeeeeeeez? :D
Method:
Result:
Error: I can't do what I need to (ok, fine... _want_ to) do without this bit of technology.
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3036970
External Customer Info:
External Company:
External Customer Name: Jared Rypka-Hauer
External Customer Email: 08C411A143BC38A7992016B6
External Test Config: 12/04/2008
Attachments:
Comments: