Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [dash-dev] Re: AMP and FindBugs

One other you'll need as well:

http://wiki.eclipse.org/Common_Build_Infrastructure/Getting_Started/Build_In_Hudson/Ant_Job


David Carver wrote:
Try switching your build from the Bash based build, to the ANT based build. I run all the WTP CBI builds from ant, no bash script.

http://wiki.eclipse.org/Common_Build_Infrastructure/Getting_Started/Build_In_Hudson/Ant_Script

Dave

Miles Parker wrote:
Hi Dave,

Thanks again for all of your (unsolicited!) help. I hope you don't mind but I'm cc'ing to dash-dev as there may be broader interest.

I've made a bit of progress with your fix.. not actually having the findbugs target in my build script could certainly be a factor. :) I've been messing around with things for a while now, and I just don't think that the findbugs task is running.. I've changed the task a bit and thrown some echo's in there..but I don't even see the echos. So I'm at a bit of a loss.. Here's my current build.xml:

https://build.eclipse.org/hudson/view/Athena%20CBI/job/cbi-amp-nightly/ws/build/org.eclipse.amp.releng/build.xml https://build.eclipse.org/hudson/view/Athena%20CBI/job/cbi-amp-nightly/ws/build/org.eclipse.amp.releng/build.properties https://build.eclipse.org/hudson/view/Athena%20CBI/job/cbi-amp-nightly/ws/build/org.eclipse.amp.releng/findbugs.xml

Console:

https://build.eclipse.org/hudson/view/Athena%20CBI/job/cbi-amp-nightly/184/consoleText

Any ideas?

On Dec 10, 2009, at 7:10 PM, David Carver wrote:

It can't find the file so it's tossing SAX parser exceptions. I think the following changes to your build file will correct issues.

<project default="run" name="org.eclipse.amp.releng/build.xml - Run an AMP build using the Athena CBI">
<target name="run">
<!-- 1. You must check out the following projects to your workspace:

org.eclipse.releng.basebuilder
org.eclipse.dash.common.releng org.eclipse.myproject.releng

2. You must provide Ant-Contrib in one of four places:

org.eclipse.dash.common.releng/lib/ant-contrib.jar
org.eclipse.myproject.releng/lib/ant-contrib.jar
${thirdPartyJarsDir}/ant-contrib.jar (path can be customized below) /usr/share/java/ant-contrib.jar (may require a symlink)

You can install Ant-Contrib 1.0b2 via RPM, or download it here:

http://downloads.sourceforge.net/ant-contrib/ant-contrib-1.0b2-bin.zip

3. If your project's sources are in SVN, you must unpack this zip into the basebuilder project's plugins/ folder:

http://downloads.sourceforge.net/svn-pde-build/org.eclipse.pde.build.svn-1.0.1RC2.zip

4. To run automated JUnit tests headlessly, you will require Xvfb or Xvnc; without this, UI tests will be launched into your current OS session (ie., on view port :0) and you may inadvertently interact with them. (Non-UI tests can be run without fear of accidental interaction and do not have this requirement.) 5. You must also ensure that the path specified for Java, and the version of Eclipse stated in build.properties are correct for your machine. Edit these properties to suit your needs. Note that JAVA*_HOME variables are for convenience, set in common.releng/server.properties. You can override them in your build.properties, or define different defaults in server.properties, if you intend to run more than one build on this server. dependencyURLs=http://download.eclipse.org/eclipse/downloads/drops/S-3.5M5-200902021535/eclipse-SDK-3.5M5-linux-gtk.tar.gz JAVA_HOME=${JAVA14_HOME}
-->

<!-- load properties and set timestamp for the build -->
<property file="build.properties" />
<tstamp>
<format property="buildTimestamp" pattern="yyyyMMddHHmm" />
</tstamp>

<!-- to build from HEAD, uncomment these lines -->
<property name="forceContextQualifier" value="v${buildTimestamp}" />
<property name="fetchTag" value="HEAD" />

<!-- calculate workspaceDir as parent of this folder, the project's .releng folder (relengBuilderDir) -->
<property name="relengBuilderDir" value="${basedir}" />
<import file="findbugs.xml"/>
<dirname file="${relengBuilderDir}" property="workspaceDir" />


<!-- can be simple path, eg., ${writableBuildRoot}/${buildType}${buildTimestamp} or longer, eg., ${writableBuildRoot}/${topprojectName}/${projectName}/downloads/drops/${version}/${buildType}${buildTimestamp} or ${writableBuildRoot}/${topprojectName}/${projectName}/${subprojectName}/downloads/drops/${version}/${buildType}${buildTimestamp}
-->
<property name="buildDir" value="${writableBuildRoot}/${buildType}${buildTimestamp}" />

<!-- invoke a new Eclipse process and launch the build from the common.releng folder --> <property name="relengCommonBuilderDir" value="${workspaceDir}/org.eclipse.dash.common.releng" /> <ant antfile="${relengCommonBuilderDir}/buildAll.xml" target="runEclipse" dir="${relengCommonBuilderDir}" />
<ant antfile="findbugs" inheritall="true"/>
</target>

<target name="findbugs" description="Run a find bugs analysis based on a ZIP file contents.">
<patternset id="xmljars">
<include name="**/plugins/*.jar"/>
</patternset>
<getFindBugs downloadDir="${writableBuildRoot}/downloads" destDir="${writableBuildRoot}/3rdPartyJars/findbugs" /> <extractJarsForAnalysis src="${sdkzipUrl}${zipPrefix}-SDK-${buildType}${buildTimestamp}.zip" refid="xmljars" />
<findBugs outputfile="${writableBuildRoot}/athena/fb-xml.xml" />
</target>
</project>

Then in your FindBugs configuration section on your job, put the path to the findbugs generated report as:

**/athena/fb-*.xml

You can take a look at the following releng job for a working example:

https://build.eclipse.org/hudson/view/WTP/job/cbi-wtp-wst.xsl.psychopath/ws/sourceediting/development/athena/org.eclipse.wst.xml.xpath2.releng/

It also contains some new macrodefs for running PMD's duplicate code checker as well.

Dave


Miles Parker wrote:
Actually, I'm wondering if part of the issue that I'm having seems related to some kind of properties setting..any idea what the below is about?

(I haven't changed anything in findbugs.xml from your example because it looked pretty generic. )

https://build.eclipse.org/hudson/view/Athena%20CBI/job/cbi-amp-nightly/178/findbugsResult/error/

On Dec 10, 2009, at 6:17 PM, David Carver wrote:


Notice something you'll want to change in your build script to get FindBugs working. Change your patternset to:

<patternset id="xmljars">
<include name="**/plugins/*.jar"/>
</patternset>

That should get the tasks to extract the plugin jars correctly, and you should start getting results.

Dave





_______________________________________________
dash-dev mailing list
dash-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dash-dev





Back to the top