Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Subversive » Problems with PDE build using FetchFromSVN(Fetch fails due to broken fetch_xxx.xml)
Problems with PDE build using FetchFromSVN [message #815974] Thu, 08 March 2012 04:20 Go to next message
Thorsten Schlathölter is currently offline Thorsten Schlathölter
Messages: 208
Registered: February 2012
Location: Düsseldorf
Senior Member
Hi,
I have a problem fetching my feature from SVN. According to documentation I have installed the following feature in my Eclipse 3.7 Release 1:

download.eclipse.org/technology/subversive/0.7/pde-update-site/

I have a maps directory in my build directory that contains a .map file with some test entries:

feature@testFeature=SVN,url=svn://dusu9077/svn_ca,tag=C-SAR/Appli/branches/private/pdeBuildTest,path=testFeature
plugin@testA=SVN,url=svn://dusu9077/svn_ca,tag=C-SAR/Appli/branches/private/pdeBuildTest, path=testA
plugin@testB=SVN,url=svn://dusu9077/svn_ca,tag=C-SAR/Appli/branches/private/pdeBuildTest,path=testB
plugin@testC=SVN,url=svn://dusu9077/svn_ca,tag=C-SAR/Appli/branches/private/pdeBuildTest,path=testC
plugin@testBuild=SVN,url=svn://dusu9077/svn_ca,tag=C-SAR/Appli/branches/private/pdeBuildTest,path=testBuild


From the beginning that is all what resides in my build directory. When I now start the build it performs a couple of tasks and fails. Further investigation reveals that a fragment and a plugin directory have been created in my build directory. In addition I have a a directory.txt which mainly contains the maps information and two other scripts:

retrieve.xml
<?xml version="1.0" encoding="UTF-8"?>
<project name="RetrieveFeature" default="main" basedir=".">
	<target name="main">
		<svn command="cat" url="svn://dusu9077/svn_ca/C-SAR/Appli/branches/private/pdeBuildTest/testFeature/feature.xml" dest="C:/Documents and Settings/d706154/eclipse.build/tempFeature//feature.xml" force="false"		/>
		<svn command="cat" url="svn://dusu9077/svn_ca/C-SAR/Appli/branches/private/pdeBuildTest/testFeature/build.properties" dest="C:/Documents and Settings/d706154/eclipse.build/tempFeature//build.properties" force="false"		/>
	</target>
	<target name="FetchFromSVN" unless="${fileToCheck}">
		<svn command="export" url="${url}/${tagPath}/${path}" pegRev="${peg}" rev="${revision}" dest="${destinationFolder}/${elementName}" username="${username}" password="${password}" force="${force}"		/>
	</target>
</project>



and

fetch_testFeature.xml which seems to be broken since the last fetch.plugins target is not closed (and yes the posted content is all which is in that script).
<?xml version="1.0" encoding="UTF-8"?>

<!-- Fetch script for feature@testFeature -->

<project name="FetchScript" default="fetch">
	<property name="quiet" value="true"/>

	<target name="fetch">
		<antcall target="fetch.element"/>
		<antcall target="fetch.plugins"/>
		<antcall target="fetch.recursively"/>
	</target>
	<target name="fetch.element" if="featureOnly">
		<available property="${buildDirectory}/features/testFeature/feature.xml" file="${buildDirectory}/features/testFeature/feature.xml"		/>
		<antcall target="FetchFromSVN">
			<param name="revision" value="HEAD"/>
			<param name="fileToCheck" value="${buildDirectory}/features/testFeature/feature.xml"/>
			<param name="username" value=""/>
			<param name="elementName" value="testFeature"/>
			<param name="tagPath" value="C-SAR/Appli/branches/private/pdeBuildTest"/>
			<param name="tag" value=""/>
			<param name="path" value="testFeature"/>
			<param name="destinationFolder" value="${buildDirectory}/features"/>
			<param name="force" value="false"/>
			<param name="peg" value="HEAD"/>
			<param name="password" value=""/>
			<param name="url" value="svn://dusu9077/svn_ca"/>
		</antcall>
	</target>
	<target name="fetch.plugins" if="featureAndPlugins">


Needles to say that nothing is fetched at all.

Any ideas out there?

Thanks in advance
Thorsten
Re: Problems with PDE build using FetchFromSVN [message #816015 is a reply to message #815974] Thu, 08 March 2012 05:15 Go to previous messageGo to next message
Thorsten Schlathölter is currently offline Thorsten Schlathölter
Messages: 208
Registered: February 2012
Location: Düsseldorf
Senior Member
And the error message is:

C:\Programme_wa\eclipse 3.7\eclipse\plugins\org.eclipse.pde.build_3.7.0.v20110512-1320\scripts\genericTargets.xml:56: Could not retrieve feature.xml or bild.properties for feature testFeature.

On line 56 of genericTargets the eclipse.fetch task is closed. So that task does not complete correctly.
Re: Problems with PDE build using FetchFromSVN [message #816121 is a reply to message #816015] Thu, 08 March 2012 07:55 Go to previous messageGo to next message
Thorsten Schlathölter is currently offline Thorsten Schlathölter
Messages: 208
Registered: February 2012
Location: Düsseldorf
Senior Member
Ok. I was able to puzzle some of the things together. During creation of the fetch script the feature itself must be retrieved from svn. This retrieval is performed in org.eclipse.pde.internal.build.FetchScriptGenerator.retrieveFeature(). This method creates the retrieve.xml script and starts an AntRunner to execute it. This runner seems to do nothing, causing the surrounding generateFetchScript() to fail. Therefore the fetchscript itself is corrupted.
I figured that most probably the AntRunner doesn't know anything about svn tasks and dug up my old checkout script for our builds. There we used a typedef

<typedef 
resource="org/tigris/subversion/svnant/svnantlib.xml" 
classpath="svnant.jar" />


I have tried to put this into the preFetch task but now I am having trouble with the classpath. Before I go further into this I would like to ask a - maybe stupid - question: Is svnant the right ant add on to use with pde svn fetch? Do I have to install another SVN Connector? Currently we are using collabnet as teamprovider inside eclipse.

Maybe somebody out there who can help with this issue?

Thanks in advance Thorsten
Re: Problems with PDE build using FetchFromSVN [message #816143 is a reply to message #816121] Thu, 08 March 2012 08:31 Go to previous messageGo to next message
Thorsten Schlathölter is currently offline Thorsten Schlathölter
Messages: 208
Registered: February 2012
Location: Düsseldorf
Senior Member
OK. Finally I solved it. Its documented here:
wiki.eclipse.org/Subversive_PDE_Fetch

-> SVN binaries must be available in your PATH

And everything works just fine. Thanks to everyone for reading this Smile
Re: Problems with PDE build using FetchFromSVN [message #1403681 is a reply to message #816143] Fri, 25 July 2014 05:39 Go to previous message
Priya B is currently offline Priya B
Messages: 2
Registered: July 2014
Junior Member
Hi,

I too am unable to fetch the features and plug-ins from SVN and I'm in the same situation as mentioned in the first post. I'm using Eclipse 4.2 and I downloaded http://download.eclipse.org/technology/subversive/1.0/pde-update-site/ .

A part of my map file:

plugin@project1=SVN,url=svn://url,tag=folders,path=project1,username=abc,password=abc
plugin@project2=SVN,url=svn://url,tag=folders,path=project2,username=abc,password=abc
feature@project3=SVN,url=svn://url,tag=folders,path=project3,username=abc,password=abc

Is the above right? The url+tag+path will give me the exact SVN URL of the corresponding plugin/feature e.g. svn://url/folders/ is the path under which all the plugins/features exist, and svn://url/folders/project1 is the path to the first plugin.

Thorsten said "SVN binaries must be available in your PATH" worked for him. What exactly must I do for this? Because I did the following and it didn't help:

To the Path Environment Variable and also to pluginPath (build.properties) I added - D:\baseLocation\eclipse\plugins\org.eclipse.team.svn.pde.build_1.0.0.I20120601-1700.jar

Please help!
Previous Topic:Undo a ExtractMethodRefactoring
Next Topic:Merge Tracking functionality
Goto Forum:
  


Current Time: Sun Aug 31 02:34:08 EDT 2014

Powered by FUDForum. Page generated in 0.03396 seconds