JBoss Tools SVN: r23375 - trunk/build/results.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-07-12 16:02:33 -0400 (Mon, 12 Jul 2010)
New Revision: 23375
Modified:
trunk/build/results/build.xml
Log:
fix defaults
Modified: trunk/build/results/build.xml
===================================================================
--- trunk/build/results/build.xml 2010-07-12 19:56:57 UTC (rev 23374)
+++ trunk/build/results/build.xml 2010-07-12 20:02:33 UTC (rev 23375)
@@ -1,13 +1,16 @@
<project default="build.results">
- <property name="output.dir" value="${basedir}" />
-
<!-- should be set by script or in Hudson -->
<property name="ZIPSUFFIX" value="SNAPSHOT" />
<!-- should be set by Hudson -->
<!-- <property name="JOB_NAME" value="jbosstools-3.2.0.M2.continuous" /> -->
+ <!-- if ${WORKSPACE}/site folder exists, target that folder; else generate here. -->
+ <condition property="output.dir" value="${WORKSPACE}/site" else="${basedir}">
+ <available file="${WORKSPACE}/site" />
+ </condition>
+
<condition property="WORKINGDIR" value="/home/hudson/static_build_env/jbds/tools/sources" else="${basedir}/../..">
<available file="/home/hudson/static_build_env/jbds" type="dir" />
</condition>
15 years, 9 months
JBoss Tools SVN: r23374 - trunk/build/results.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-07-12 15:56:57 -0400 (Mon, 12 Jul 2010)
New Revision: 23374
Added:
trunk/build/results/build.xml
Log:
new results page generator (tested, working)
Copied: trunk/build/results/build.xml (from rev 23373, trunk/build/results/buildResults.xml)
===================================================================
--- trunk/build/results/build.xml (rev 0)
+++ trunk/build/results/build.xml 2010-07-12 19:56:57 UTC (rev 23374)
@@ -0,0 +1,165 @@
+<project default="build.results">
+
+ <property name="output.dir" value="${basedir}" />
+
+ <!-- should be set by script or in Hudson -->
+ <property name="ZIPSUFFIX" value="SNAPSHOT" />
+
+ <!-- should be set by Hudson -->
+ <!-- <property name="JOB_NAME" value="jbosstools-3.2.0.M2.continuous" /> -->
+
+ <condition property="WORKINGDIR" value="/home/hudson/static_build_env/jbds/tools/sources" else="${basedir}/../..">
+ <available file="/home/hudson/static_build_env/jbds" type="dir" />
+ </condition>
+
+ <mkdir dir="${WORKINGDIR}" />
+ <echo level="info">WORKINGDIR = ${WORKINGDIR}</echo>
+
+ <condition property="COMMON_TOOLS" value="/home/hudson/static_build_env/jbds/tools">
+ <available file="/home/hudson/static_build_env/jbds" type="dir" />
+ </condition>
+ <condition property="COMMON_TOOLS" value="${WORKINGDIR}/../tools" else="${java.io.tmpdir}">
+ <available file="${WORKINGDIR}/../tools" type="dir" />
+ </condition>
+ <mkdir dir="${COMMON_TOOLS}" />
+ <echo level="info">COMMON_TOOLS = ${COMMON_TOOLS}</echo>
+
+ <condition property="build.xml" value="/home/hudson/static_build_env/jbds/tools/sources/build/build.xml">
+ <available file="/home/hudson/static_build_env/jbds/tools/sources/build/build.xml" type="file" />
+ </condition>
+ <condition property="build.xml" value="${basedir}/../../build/build.xml">
+ <available file="${basedir}/../../build/build.xml" type="file" />
+ </condition>
+ <condition property="build.xml" value="${basedir}/../../build.xml">
+ <available file="${basedir}/../../build.xml" type="file" />
+ </condition>
+ <!-- if can't calculate where build/build.xml is located, must pass in path from parent when calling this script -->
+
+ <target name="init">
+ <ant antfile="${build.xml}" target="init" />
+
+ <macrodef name="get.size">
+ <attribute name="file" />
+ <attribute name="property" />
+ <sequential>
+ <var name="size" unset="true" />
+ <var name="size-in-mb" unset="true" />
+ <if>
+ <available file="@{file}" />
+ <then>
+ <length file="@{file}" property="size" />
+ <math result="size-in-mb">
+ <op op="/">
+ <op op="floor">
+ <op op="*">
+ <op op="/">
+ <num value="${size}" />
+ <num value="1048576" />
+ </op>
+ <num value="100" />
+ </op>
+ </op>
+ <num value="100" />
+ </op>
+ </math>
+
+ <property name="@{property}" value="${size-in-mb}" />
+ </then>
+ <else>
+ <property name="@{property}" value="-1" />
+ </else>
+ </if>
+ </sequential>
+ </macrodef>
+ <taskdef resource="net/sf/antcontrib/antlib.xml">
+ <classpath>
+ <pathelement location="${COMMON_TOOLS}/ant-contrib.jar" />
+ </classpath>
+ </taskdef>
+ </target>
+
+ <target name="build.results" depends="init">
+ <!--
+ 1. resolve variables in download-template.xml to produce download.xml
+ 2. XSL transform download.xml to produce download.snippet.txt
+ 3. manually copy the contents of this file into a page under
+ http://www.jboss.org/tools/downloads/
+ -->
+ <for param="UPDATEZIP">
+ <path>
+ <fileset dir="${WORKINGDIR}/site">
+ <include name="*-Update-${ZIPSUFFIX}.zip" />
+ <include name="*-Sources-${ZIPSUFFIX}.zip" />
+ </fileset>
+ </path>
+ <sequential>
+ <var name="filename" unset="true" />
+ <propertyregex property="filename"
+ input="@{UPDATEZIP}"
+ defaultvalue="@{UPDATEZIP}"
+ regexp=".+/([^/]+\.zip)"
+ replace="\1"
+ casesensitive="false"
+ override="true"
+ />
+ <propertyregex property="COMPONENT"
+ input="${filename}"
+ defaultvalue="${filename}"
+ regexp="(.+)-(Update|Sources)-${ZIPSUFFIX}\.zip"
+ replace="\1"
+ casesensitive="false"
+ override="true"
+ />
+
+ <if>
+ <and>
+ <isset property="JOB_NAME" />
+ <equals arg1="${COMPONENT}" arg2="${JOB_NAME}" />
+ </and>
+ <then>
+ <if>
+ <equals arg1="${filename}" arg2="${JOB_NAME}-Sources-${ZIPSUFFIX}.zip" />
+ <then>
+ <var name="COMPONENT" unset="true" />
+ <var name="COMPONENT" value="sources" />
+ </then>
+ <elseif>
+ <equals arg1="${filename}" arg2="${JOB_NAME}-Update-${ZIPSUFFIX}.zip" />
+ <then>
+ <var name="COMPONENT" unset="true" />
+ <var name="COMPONENT" value="update" />
+ </then>
+ </elseif>
+ </if>
+ </then>
+ </if>
+
+ <echo level="verbose">UPDATEZIP = @{UPDATEZIP}
+COMPONENT = ${COMPONENT}</echo>
+ <property name="${COMPONENT}-filename" value="${filename}" />
+
+ <get.size file="@{UPDATEZIP}" property="${COMPONENT}-filesize" />
+
+ <!--
+ <var name="filesize" unset="true" />
+ <propertycopy from="${COMPONENT}-filesize" property="filesize" override="true" silent="true" />
+ <echo level="info">filesize = ${filesize}</echo>
+ <echo level="info">filename = ${filename}</echo>
+ <var name="filesize" unset="true" />
+ -->
+ <var name="filename" unset="true" />
+ </sequential>
+ </for>
+
+ <copy todir="${output.dir}" overwrite="true">
+ <fileset file="download-template.xml" />
+ <mapper type="merge" to="download.xml" />
+ <filterchain>
+ <expandproperties />
+ </filterchain>
+ </copy>
+ <xslt in="${output.dir}/download.xml" out="${output.dir}/download-snippet.txt" style="download.xsl" />
+ <delete file="${output.dir}/download.xml" />
+ </target>
+
+</project>
Property changes on: trunk/build/results/build.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 9 months
JBoss Tools SVN: r23373 - in trunk/build: results and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-07-12 15:19:43 -0400 (Mon, 12 Jul 2010)
New Revision: 23373
Added:
trunk/build/results/
trunk/build/results/buildResults.xml
trunk/build/results/download-template.xml
trunk/build/results/download.xsl
Log:
new results page generator (first draft)
Added: trunk/build/results/buildResults.xml
===================================================================
--- trunk/build/results/buildResults.xml (rev 0)
+++ trunk/build/results/buildResults.xml 2010-07-12 19:19:43 UTC (rev 23373)
@@ -0,0 +1,88 @@
+<project default="build.results">
+
+ <property name="ZIPSUFFIX" value="SNAPSHOT" />
+
+ <condition property="WORKINGDIR" value="/home/hudson/static_build_env/jbds/tools/sources" else="${basedir}/../..">
+ <available file="/home/hudson/static_build_env/jbds" type="dir" />
+ </condition>
+
+ <mkdir dir="${WORKINGDIR}" />
+ <echo level="info">WORKINGDIR = ${WORKINGDIR}</echo>
+
+ <condition property="COMMON_TOOLS" value="/home/hudson/static_build_env/jbds/tools">
+ <available file="/home/hudson/static_build_env/jbds" type="dir" />
+ </condition>
+ <condition property="COMMON_TOOLS" value="${WORKINGDIR}/../tools" else="${java.io.tmpdir}">
+ <available file="${WORKINGDIR}/../tools" type="dir" />
+ </condition>
+ <mkdir dir="${COMMON_TOOLS}" />
+ <echo level="info">COMMON_TOOLS = ${COMMON_TOOLS}</echo>
+
+ <target name="init">
+ <ant antfile="${build.xml}" target="init" />
+ <taskdef resource="net/sf/antcontrib/antlib.xml">
+ <classpath>
+ <pathelement location="${COMMON_TOOLS}/ant-contrib.jar" />
+ </classpath>
+ </taskdef>
+ </target>
+
+ <target name="build.results" depends="init">
+ <!--
+ 1. resolve variables in download-template.xml to produce download.xml
+ 2. XSL transform download.xml to produce download.snippet.txt
+ 3. manually copy the contents of this file into
+ http://www.jboss.org/tools/downloads/stable.html or
+ http://www.jboss.org/tools/downloads/dev.html, as applicable
+ -->
+
+ <!-- TODO: resolve variables for ZIPSUFFIX and *-filename, *-filesize, where * = component names -->
+ <for param="UPDATEZIP">
+ <path>
+ <fileset dir="${WORKINGDIR}">
+ <include name="*-Update-${ZIPSUFFIX}.zip" />
+ <include name="*-Sources-${ZIPSUFFIX}.zip" />
+ </fileset>
+ </path>
+ <sequential>
+ <propertyregex property="COMPONENT"
+ input="@{UPDATEZIP}"
+ defaultvalue="@{UPDATEZIP}"
+ regexp=".+/([^/]+\.zip)"
+ replace="\1"
+ casesensitive="false"
+ override="true"
+ />
+ <propertyregex property="COMPONENT"
+ input="@{COMPONENT}"
+ defaultvalue="@{COMPONENT}"
+ regexp="(.+)-(Update|Sources)-${ZIPSUFFIX}\.zip)"
+ replace="\1"
+ casesensitive="false"
+ override="true"
+ />
+ <echo level="info">UPDATEZIP = @{UPDATEZIP}
+COMPONENT = ${COMPONENT}</echo>
+ <var name="filesize" unset="true" />
+ <get.size file="@{UPDATEZIP}" property="${COMPONENT}-filesize" />
+ <propertycopy from="${repoFilename}.features" property="filesize" override="true" silent="true" />
+ <echo level="info">filesize = ${filesize}</echo>
+ <var name="filesize" unset="true" />
+ </sequential>
+ </for>
+
+ <copy todir="${product.build.directory}" overwrite="true">
+ <fileset file="download-template.xml" />
+ <mapper type="merge" to="download.xml" />
+ <filterchain>
+ <expandproperties />
+ </filterchain>
+ </copy>
+ <xslt in="${product.build.directory}/download.xml"
+ out="${product.build.directory}/download-snippet.txt"
+ style="download.xsl"
+ />
+ <delete file="${product.build.directory}/download.xml" />
+ </target>
+
+</project>
Property changes on: trunk/build/results/buildResults.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/build/results/download-template.xml
===================================================================
--- trunk/build/results/download-template.xml (rev 0)
+++ trunk/build/results/download-template.xml 2010-07-12 19:19:43 UTC (rev 23373)
@@ -0,0 +1,153 @@
+<projects baseurl="http://downloads.sourceforge.net/jboss/">
+<project name="All Plugins (repo)" version="${ZIPSUFFIX}">
+ <description>A p2 repo (update site) bundle of all JBoss Tools plugins - </description>
+ <a href="http://www.jboss.org/tools/download/update.html#fromzip">install instructions</a>
+ <download os="All platforms" url="${update-filename}" size="${update-filesize} MB"/>
+</project>
+
+<project name="JBoss Archive Tools" version="${ZIPSUFFIX}">
+ <description>For incremental archiving and packaging</description>
+ <download os="All platforms" url="${archives-filename}" size="${archives-filesize} MB"/>
+</project>
+
+<project name="JBoss AS Tools" version="${ZIPSUFFIX}">
+ <description>For running deploying to, and configuring JBoss AS</description>
+ <download os="All platforms" url="${as-filename}" size="${as-filesize} MB"/>
+</project>
+
+<project name="JBoss BIRT Tools" version="${ZIPSUFFIX}">
+ <description>Hibernate and Seam extensions for Eclipse BIRT</description>
+ <download os="All platforms" url="${birt-filename}" size="${birt-filesize} MB"/>
+</project>
+
+<project name="JBoss BPEL Editor" version="${ZIPSUFFIX}">
+ <description>JBoss BPEL Editor</description>
+ <download os="All platforms" url="${bpel-filename}" size="${bpel-filesize} MB"/>
+</project>
+
+<project name="Context and Dependency Injection Tools" version="${ZIPSUFFIX}">
+ <description>Context and Dependency Injection Tools</description>
+ <download os="All platforms" url="${cdi-filename}" size="${cdi-filesize} MB"/>
+</project>
+
+<project name="Common Frameworks" version="${ZIPSUFFIX}">
+ <description>Common JBoss Tools Frameworks, used by several JBoss Tools components</description>
+ <download os="All platforms" url="${common-filename}" size="${common-filesize} MB"/>
+</project>
+
+<project name="Drools IDE" version="${ZIPSUFFIX}">
+ <description>For Drools Rules and Drools Ruleflow</description>
+ <download os="All platforms" url="${drools-filename}" size="${drools-filesize} MB"/>
+</project>
+
+<project name="JBoss ESB Tools" version="${ZIPSUFFIX}" >
+ <description>Project wizards, editors and deployment JBoss's Enterprise Service Bus</description>
+ <download os="All platforms" url="${esb-filename}" size="${esb-filesize} MB"/>
+</project>
+
+<project name="Project Examples" version="${ZIPSUFFIX}">
+ <description>Tooling for easy installation of Examples + Project Examples from the JBoss Community</description>
+ <download os="All platforms" url="${examples-filename}" size="${examples-filesize} MB"/>
+</project>
+
+<project name="Flow Languages Common Tools" version="${ZIPSUFFIX}">
+ <description>Flow Languages Common Tools, used by jBPM component</description>
+ <download os="All platforms" url="${jbpm-filename}" size="${jbpm-filesize} MB"/>
+</project>
+
+<project name="FreeMarker IDE" version="${ZIPSUFFIX}" >
+ <description>Syntax highlighting Editor for Freemarker files</description>
+ <download os="All platforms" url="${freemarker-filename}" size="${freemarker-filesize} MB"/>
+</project>
+
+<project name="Hibernate Tools" version="${ZIPSUFFIX}" >
+ <description>Hibernate wizards, query editor, reverse engineering and more</description>
+ <download os="All platforms" url="${hibernatetools-filename}" size="${hibernatetools-filesize} MB"/>
+</project>
+
+<project name="jBPM + jBPM Convert" version="${ZIPSUFFIX}">
+ <description>Support for jBPM, including conversion from BPMN files</description>
+ <download os="All platforms" url="${jbpm-filename}" size="${jbpm-filesize} MB"/>
+</project>
+
+<project name="JMX Tools" version="${ZIPSUFFIX}">
+ <description>Java Management Extensions (JMX) Console in Eclipse</description>
+ <download os="All platforms" url="${jmx-filename}" size="${jmx-filesize} MB"/>
+</project>
+
+<project name="JBoss Tools JSF" version="${ZIPSUFFIX}">
+ <description>JBoss Tools JSF - see also JST and VPE components</description>
+ <download os="All platforms" url="${jsf-filename}" size="${jsf-filesize} MB"/>
+</project>
+
+<project name="JBoss Tools Java Standard Tools" version="${ZIPSUFFIX}">
+ <description>JBoss Tools Java Standard Tools - see also JSF and VPE components</description>
+ <download os="All platforms" url="${jst-filename}" size="${jst-filesize} MB"/>
+</project>
+
+<project name="JBoss Maven Tools" version="${ZIPSUFFIX}">
+ <description>Maven support in Eclipse (m2eclipse)</description>
+ <download os="All platforms" url="${maven-filename}" size="${maven-filesize} MB"/>
+</project>
+
+<project name="ModeShape JCR REST Tools" version="${ZIPSUFFIX}">
+ <description>Provides a resource publishing and unpublishing capability to ModeShape repositories</description>
+ <download os="All platforms" url="${modeshape-filename}" size="${modeshape-filesize} MB"/>
+</project>
+
+<project name="Portlet Tools" version="${ZIPSUFFIX}">
+ <description>For supporting JBoss Portal and JSR-286 portlets</description>
+ <download os="All platforms" url="${portlet-filename}" size="${portlet-filesize} MB"/>
+</project>
+
+<project name="JBoss Profiler" version="${ZIPSUFFIX}">
+ <description>Provides profiling for JBoss</description>
+ <download os="All platforms" url="${profiler-filename}" size="${profiler-filesize} MB"/>
+</project>
+
+<project name="Seam Tools" version="${ZIPSUFFIX}" >
+ <description>For creating Seam Components and Projects</description>
+ <download os="All platforms" url="${seam-filename}" size="${seam-filesize} MB"/>
+</project>
+
+<project name="Smooks Tools" version="${ZIPSUFFIX}" >
+ <description>transformation editor</description>
+ <download os="All platforms" url="${smooks-filename}" size="${smooks-filesize} MB"/>
+</project>
+
+<project name="Struts Tools" version="${ZIPSUFFIX}">
+ <description>For Struts 1.x framework</description>
+ <download os="All platforms" url="${struts-filename}" size="${struts-filesize} MB"/>
+</project>
+
+<project name="Teiid Designer" version="${ZIPSUFFIX}">
+ <description>To create metadata models that describe your enterprise information systems</description>
+ <download os="All platforms" url="${teiid-filename}" size="${teiid-filesize} MB"/>
+</project>
+
+<project name="JBoss AS TPTP Tools" version="${ZIPSUFFIX}" >
+ <description>TPTP support for JBoss AS servers</description>
+ <download os="All platforms" url="${tptp-filename}" size="${tptp-filesize} MB"/>
+</project>
+
+<project name="Visual Page Editor" version="${ZIPSUFFIX}">
+ <description>Visual Page Editor - see also JST and JSF components</description>
+ <download os="All platforms" url="${vpe-filename}" size="${vpe-filesize} MB"/>
+</project>
+
+<project name="JBoss WS Tools" version="${ZIPSUFFIX}">
+ <description>Enables Web Services support in Eclipse for JBoss WS</description>
+ <download os="All platforms" url="${ws-filename}" size="${ws-filesize} MB"/>
+</project>
+
+<project name="XulRunner" version="${ZIPSUFFIX}">
+ <description>Provides a common back-end for XUL applications</description>
+ <download os="All platforms" url="${xulrunner-filename}" size="${xulrunner-filesize} MB"/>
+</project>
+
+<project name="Sources" version="${ZIPSUFFIX}">
+ <description>JBoss Tools - all sources (excluding tests)</description>
+ <download os="All platforms" url="${sources-filename}" size="${sources-filesize} MB"/>
+</project>
+
+</projects>
\ No newline at end of file
Property changes on: trunk/build/results/download-template.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/build/results/download.xsl
===================================================================
--- trunk/build/results/download.xsl (rev 0)
+++ trunk/build/results/download.xsl 2010-07-12 19:19:43 UTC (rev 23373)
@@ -0,0 +1,47 @@
+<xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xalan="http://xml.apache.org/xalan">
+<xsl:output method="html" indent="yes" xalan:indent-amount="4"/>
+<xsl:template match="/projects">
+
+<xsl:variable name="baseurl"><xsl:value-of select="@baseurl"/></xsl:variable>
+
+<table cellspacing="1" cellpadding="0" border="0" align="left"
+style="width: 100%;" class="simpletablestyle">
+ <thead>
+ <tr class="header">
+ <th>Description</th>
+ <th>Version</th>
+ <th>Download</th>
+ </tr>
+ </thead>
+ <tbody>
+ <xsl:for-each select="project">
+ <xsl:variable name="rowClass">
+ <xsl:if test="position() mod 2 = 1">oddRow</xsl:if>
+ <xsl:if test="position() mod 2 = 0">evenRow</xsl:if>
+ </xsl:variable>
+
+ <tr>
+ <xsl:attribute name="class">
+ <xsl:value-of select="$rowClass"/>
+ </xsl:attribute>
+ <td class="rowLine"><xsl:value-of select="@name"/> - <xsl:value-of select="description"/><xsl:if test="string(a) != ''"><xsl:copy-of select="a"/></xsl:if></td>
+ <td class="rowLine"><xsl:value-of select="substring-before(@version,'-')"/></td>
+ <td class="rowLine">
+ <xsl:for-each select="download">
+ <b><a>
+ <xsl:attribute name="href"><xsl:value-of select="$baseurl"/><xsl:value-of select="@url"/></xsl:attribute>
+ <xsl:attribute name="onclick">javascript:pageTracker._trackPageview('/downloads/<xsl:value-of select="@url"/>');turnOnModal(this); return false;</xsl:attribute>
+ <xsl:value-of select="@os"/>
+ </a>
+ (<xsl:value-of select="@size"/>)
+ </b>
+ <br/>
+ </xsl:for-each>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </tbody>
+</table>
+
+</xsl:template>
+</xsl:transform>
\ No newline at end of file
Property changes on: trunk/build/results/download.xsl
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 9 months
JBoss Tools SVN: r23372 - trunk/build.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-07-12 14:24:31 -0400 (Mon, 12 Jul 2010)
New Revision: 23372
Modified:
trunk/build/publish.sh
Log:
parameterize zip suffix so a RELEASE can be named uniquely instead of self-replacing SNAPSHOTs; support optional sources zip
Modified: trunk/build/publish.sh
===================================================================
--- trunk/build/publish.sh 2010-07-12 12:25:33 UTC (rev 23371)
+++ trunk/build/publish.sh 2010-07-12 18:24:31 UTC (rev 23372)
@@ -1,11 +1,21 @@
#!/bin/bash
# Hudson script used to publish Tycho-built p2 update sites
-
# NOTE: sources MUST be checked out into ${WORKSPACE}/sources
-# define target zip filename for inclusion in uberbuilder's bucky aggregator
-SNAPNAME=${JOB_NAME}-Update-SNAPSHOT.zip
+# releases get named differently than snapshots
+if [[ ${RELEASE} == "Yes" ]]; then
+ ZIPSUFFIX="${BUILD_ID}-H${BUILD_NUMBER}"
+else
+ ZIPSUFFIX="SNAPSHOT"
+fi
+# define target update zip filename
+SNAPNAME="${JOB_NAME}-Update-${ZIPSUFFIX}.zip"
+# define target sources zip filename
+SRCSNAME="${JOB_NAME}-Sources-${ZIPSUFFIX}.zip"
+# define suffix to use for additional update sites
+SUFFNAME="-Update-${ZIPSUFFIX}.zip"
+
if [[ $DESTINATION == "" ]]; then DESTINATION="tools@filemgmt.jboss.org:/downloads_htdocs/tools/builds/nightly/3.2.helios"; fi
# cleanup from last time
@@ -51,7 +61,7 @@
mkdir -p ${WORKSPACE}/site/${JOB_NAME}/$y
unzip -u -o -q -d ${WORKSPACE}/site/${JOB_NAME}/$y $z
# copy into workspace for access by bucky aggregator (same name every time)
- rsync -aq $z ${WORKSPACE}/site/${JOB_NAME}/${y}-Update-SNAPSHOT.zip
+ rsync -aq $z ${WORKSPACE}/site/${JOB_NAME}/${y}${SUFFNAME}
fi
done
@@ -64,6 +74,11 @@
done
fi
+# get sources zip
+if [[ ! -f ${WORKSPACE}/sources/build/sources/target/sources.zip ]]; then
+ rsync -aq ${WORKSPACE}/sources/build/sources/target/sources.zip ${WORKSPACE}/site/${JOB_NAME}/${SRCSNAME}
+fi
+
# get full build log and filter out Maven test failures
bl=${WORKSPACE}/site/${JOB_NAME}/BUILDLOG.txt
wget -q http://hudson.qa.jboss.com/hudson/job/${JOB_NAME}/${BUILD_NUMBER}/console... -O ${bl}
@@ -94,11 +109,12 @@
# publish to download.jboss.org, unless errors found - avoid destroying last-good update site
if [[ $ec == "0" ]] && [[ $fc == "0" ]]; then
date
+ # publish update site dir
if [[ -d ${WORKSPACE}/site/${JOB_NAME} ]]; then
rsync -arzq --delete ${WORKSPACE}/site/${JOB_NAME} $DESTINATION/
fi
+ # publish update site zip
if [[ -f ${WORKSPACE}/site/${SNAPNAME} ]]; then
- # publish snapshot zip
rsync -arzq --delete ${WORKSPACE}/site/${SNAPNAME} $DESTINATION/
fi
fi
15 years, 9 months
JBoss Tools SVN: r23371 - in trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi: internal/core/impl and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-07-12 08:25:33 -0400 (Mon, 12 Jul 2010)
New Revision: 23371
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIUtil.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IInterceptorBinded.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/AbstractBeanElement.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/BeanMethod.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ClassBean.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/InterceptorBindingElement.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/StereotypeElement.java
Log:
https://jira.jboss.org/browse/JBIDE-6566
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIUtil.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIUtil.java 2010-07-12 12:19:05 UTC (rev 23370)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIUtil.java 2010-07-12 12:25:33 UTC (rev 23371)
@@ -780,7 +780,7 @@
}
public static Set<IInterceptorBinding> getAllInterceptorBindings(IInterceptorBinded binded) {
- Set<IInterceptorBindingDeclaration> ds = collectInheritedInterceptorBindingDeclaratios(binded, new HashSet<IInterceptorBindingDeclaration>());
+ Set<IInterceptorBindingDeclaration> ds = collectAdditionalInterceptorBindingDeclaratios(binded, new HashSet<IInterceptorBindingDeclaration>());
Set<IInterceptorBinding> result = new HashSet<IInterceptorBinding>();
for (IInterceptorBindingDeclaration d: ds) {
IInterceptorBinding b = d.getInterceptorBinding();
@@ -797,34 +797,34 @@
* @return
*/
public static Set<IInterceptorBindingDeclaration> getAllInterceptorBindingDeclaratios(IInterceptorBinded binded) {
- return collectInheritedInterceptorBindingDeclaratios(binded, new HashSet<IInterceptorBindingDeclaration>());
+ return collectAdditionalInterceptorBindingDeclaratios(binded, new HashSet<IInterceptorBindingDeclaration>());
}
- private static Set<IInterceptorBindingDeclaration> collectInheritedInterceptorBindingDeclaratios(IInterceptorBinded binded, Set<IInterceptorBindingDeclaration> result) {
- Set<IInterceptorBindingDeclaration> declarations = binded.getInterceptorBindingDeclarations();
+ private static Set<IInterceptorBindingDeclaration> collectAdditionalInterceptorBindingDeclaratios(IInterceptorBinded binded, Set<IInterceptorBindingDeclaration> result) {
+ Set<IInterceptorBindingDeclaration> declarations = binded.getInterceptorBindingDeclarations(true);
for (IInterceptorBindingDeclaration declaration : declarations) {
if(!result.contains(declaration)) {
result.add(declaration);
IInterceptorBinding binding = declaration.getInterceptorBinding();
- collectInheritedInterceptorBindingDeclaratios(binding, result);
+ collectAdditionalInterceptorBindingDeclaratios(binding, result);
if(binding instanceof IStereotyped) {
- collectInheritedInterceptorBindingDeclaratiosFromStereotyps((IStereotyped)binding, result);
+ collectAdditionalInterceptorBindingDeclaratiosFromStereotyps((IStereotyped)binding, result);
}
}
}
if(binded instanceof IStereotyped) {
- collectInheritedInterceptorBindingDeclaratiosFromStereotyps((IStereotyped)binded, result);
+ collectAdditionalInterceptorBindingDeclaratiosFromStereotyps((IStereotyped)binded, result);
}
return result;
}
- private static Set<IInterceptorBindingDeclaration> collectInheritedInterceptorBindingDeclaratiosFromStereotyps(IStereotyped stereotyped, Set<IInterceptorBindingDeclaration> result) {
+ private static Set<IInterceptorBindingDeclaration> collectAdditionalInterceptorBindingDeclaratiosFromStereotyps(IStereotyped stereotyped, Set<IInterceptorBindingDeclaration> result) {
Set<IStereotypeDeclaration> stereotypeDeclarations = collectInheritedStereotypDeclarations(stereotyped, new HashSet<IStereotypeDeclaration>());
if(stereotyped instanceof ClassBean) {
stereotypeDeclarations.addAll(((ClassBean)stereotyped).getInheritedStereotypDeclarations());
}
for (IStereotypeDeclaration stereotypeDeclaration : stereotypeDeclarations) {
- collectInheritedInterceptorBindingDeclaratios(stereotypeDeclaration.getStereotype(), result);
+ collectAdditionalInterceptorBindingDeclaratios(stereotypeDeclaration.getStereotype(), result);
}
return result;
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IInterceptorBinded.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IInterceptorBinded.java 2010-07-12 12:19:05 UTC (rev 23370)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IInterceptorBinded.java 2010-07-12 12:25:33 UTC (rev 23371)
@@ -26,7 +26,7 @@
*
* @return the set of interceptor binding declarations
*/
- Set<IInterceptorBindingDeclaration> getInterceptorBindingDeclarations();
+ Set<IInterceptorBindingDeclaration> getInterceptorBindingDeclarations(boolean includeInherited);
/**
* Obtains the interceptor bindings of the bean class or method or stereotype or interceptor binding type.
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/AbstractBeanElement.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/AbstractBeanElement.java 2010-07-12 12:19:05 UTC (rev 23370)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/AbstractBeanElement.java 2010-07-12 12:25:33 UTC (rev 23371)
@@ -32,6 +32,8 @@
import org.jboss.tools.cdi.core.IAnnotationDeclaration;
import org.jboss.tools.cdi.core.IBean;
import org.jboss.tools.cdi.core.IInjectionPoint;
+import org.jboss.tools.cdi.core.IInterceptorBinding;
+import org.jboss.tools.cdi.core.IInterceptorBindingDeclaration;
import org.jboss.tools.cdi.core.IParametedType;
import org.jboss.tools.cdi.core.IQualifier;
import org.jboss.tools.cdi.core.IQualifierDeclaration;
@@ -189,6 +191,10 @@
return Collections.emptySet();
}
+ protected Set<IInterceptorBindingDeclaration> getInheritedInterceptorBindingDeclarations() {
+ return Collections.emptySet();
+ }
+
public Set<IQualifier> getQualifiers() {
IQualifier any = getCDIProject().getQualifier(CDIConstants.ANY_QUALIFIER_TYPE_NAME);
IQualifier def = getCDIProject().getQualifier(CDIConstants.DEFAULT_QUALIFIER_TYPE_NAME);
@@ -215,6 +221,27 @@
return result;
}
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.cdi.core.IClassBean#getInterceptorBindingDeclarations()
+ */
+ public Set<IInterceptorBindingDeclaration> getInterceptorBindingDeclarations(boolean includeInherited) {
+ Set<IInterceptorBindingDeclaration> result = ClassBean.getInterceptorBindingDeclarations(definition);
+ if(includeInherited) {
+ Set<IInterceptorBinding> qs = new HashSet<IInterceptorBinding>();
+ for (IInterceptorBindingDeclaration d: result) {
+ if(d.getInterceptorBinding() != null) qs.add(d.getInterceptorBinding());
+ }
+ Set<IInterceptorBindingDeclaration> ds = getInheritedInterceptorBindingDeclarations();
+ for (IInterceptorBindingDeclaration d : ds) {
+ if (d.getInterceptorBinding() != null && !qs.contains(d.getInterceptorBinding())) {
+ result.add(d);
+ }
+ }
+ }
+ return result;
+ }
+
public Set<IScopeDeclaration> getScopeDeclarations() {
return getScopeDeclarations(getCDIProject().getNature(), definition.getAnnotations());
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/BeanMethod.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/BeanMethod.java 2010-07-12 12:19:05 UTC (rev 23370)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/BeanMethod.java 2010-07-12 12:25:33 UTC (rev 23371)
@@ -102,14 +102,6 @@
/*
* (non-Javadoc)
- * @see org.jboss.tools.cdi.core.IInterceptorBinded#getInterceptorBindingDeclarations()
- */
- public Set<IInterceptorBindingDeclaration> getInterceptorBindingDeclarations() {
- return ClassBean.getInterceptorBindingDeclarations(definition);
- }
-
- /*
- * (non-Javadoc)
* @see org.jboss.tools.cdi.core.IInterceptorBinded#getInterceptorBindings()
*/
public Set<IInterceptorBinding> getInterceptorBindings() {
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ClassBean.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ClassBean.java 2010-07-12 12:19:05 UTC (rev 23370)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ClassBean.java 2010-07-12 12:25:33 UTC (rev 23371)
@@ -176,14 +176,6 @@
return result;
}
- /*
- * (non-Javadoc)
- * @see org.jboss.tools.cdi.core.IClassBean#getInterceptorBindingDeclarations()
- */
- public Set<IInterceptorBindingDeclaration> getInterceptorBindingDeclarations() {
- return getInterceptorBindingDeclarations(definition);
- }
-
public static Set<IInterceptorBindingDeclaration> getInterceptorBindingDeclarations(AbstractMemberDefinition definition) {
Set<IInterceptorBindingDeclaration> result = new HashSet<IInterceptorBindingDeclaration>();
List<IAnnotationDeclaration> as = definition.getAnnotations();
@@ -468,6 +460,20 @@
return result;
}
+ protected Set<IInterceptorBindingDeclaration> getInheritedInterceptorBindingDeclarations() {
+ if(superClassBean == null) return Collections.emptySet();
+ Set<IInterceptorBindingDeclaration> result = new HashSet<IInterceptorBindingDeclaration>();
+ Set<IInterceptorBindingDeclaration> ds = superClassBean.getInterceptorBindingDeclarations(true);
+ for (IInterceptorBindingDeclaration d: ds) {
+ if(d.getInterceptorBinding() != null && d.getInterceptorBinding().getInheritedDeclaration() != null) {
+ result.add(d);
+ } else if(isSpecializing()) {
+ result.add(d);
+ }
+ }
+ return result;
+ }
+
public Set<IStereotypeDeclaration> getInheritedStereotypDeclarations() {
if(superClassBean == null) return Collections.emptySet();
Set<IStereotypeDeclaration> result = new HashSet<IStereotypeDeclaration>();
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/InterceptorBindingElement.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/InterceptorBindingElement.java 2010-07-12 12:19:05 UTC (rev 23370)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/InterceptorBindingElement.java 2010-07-12 12:25:33 UTC (rev 23371)
@@ -27,17 +27,13 @@
/*
* (non-Javadoc)
- * @see org.jboss.tools.cdi.core.IInterceptorBinded#getInterceptorBindingDeclarations()
- */
- public Set<IInterceptorBindingDeclaration> getInterceptorBindingDeclarations() {
- return ClassBean.getInterceptorBindingDeclarations(definition);
- }
-
- /*
- * (non-Javadoc)
* @see org.jboss.tools.cdi.core.IInterceptorBinded#getInterceptorBindings()
*/
public Set<IInterceptorBinding> getInterceptorBindings() {
return CDIUtil.getAllInterceptorBindings(this);
}
+
+ public Set<IInterceptorBindingDeclaration> getInterceptorBindingDeclarations(boolean includeInherited) {
+ return ClassBean.getInterceptorBindingDeclarations(definition);
+ }
}
\ No newline at end of file
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/StereotypeElement.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/StereotypeElement.java 2010-07-12 12:19:05 UTC (rev 23370)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/StereotypeElement.java 2010-07-12 12:25:33 UTC (rev 23371)
@@ -55,7 +55,7 @@
* (non-Javadoc)
* @see org.jboss.tools.cdi.core.IInterceptorBinded#getInterceptorBindingDeclarations()
*/
- public Set<IInterceptorBindingDeclaration> getInterceptorBindingDeclarations() {
+ public Set<IInterceptorBindingDeclaration> getInterceptorBindingDeclarations(boolean includeInherited) {
return ClassBean.getInterceptorBindingDeclarations(definition);
}
15 years, 9 months
JBoss Tools SVN: r23370 - in branches/smooks-dmb/plugins/org.jboss.tools.smooks.model: META-INF and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2010-07-12 08:19:05 -0400 (Mon, 12 Jul 2010)
New Revision: 23370
Added:
branches/smooks-dmb/plugins/org.jboss.tools.smooks.model/libs/commons-beanutils-1.8.3.jar
branches/smooks-dmb/plugins/org.jboss.tools.smooks.model/libs/commons-beanutils-bean-collections-1.8.3.jar
branches/smooks-dmb/plugins/org.jboss.tools.smooks.model/libs/commons-beanutils-core-1.8.3.jar
branches/smooks-dmb/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/command/
branches/smooks-dmb/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/command/AddCommand.java
branches/smooks-dmb/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/command/Command.java
branches/smooks-dmb/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/command/ICommand.java
branches/smooks-dmb/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/command/RemoveCommand.java
branches/smooks-dmb/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/command/SetCommand.java
branches/smooks-dmb/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/command/SmooksCommandStack.java
Modified:
branches/smooks-dmb/plugins/org.jboss.tools.smooks.model/.classpath
branches/smooks-dmb/plugins/org.jboss.tools.smooks.model/META-INF/MANIFEST.MF
branches/smooks-dmb/plugins/org.jboss.tools.smooks.model/build.properties
Log:
Modified: branches/smooks-dmb/plugins/org.jboss.tools.smooks.model/.classpath
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.model/.classpath 2010-07-12 12:17:53 UTC (rev 23369)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.model/.classpath 2010-07-12 12:19:05 UTC (rev 23370)
@@ -1,7 +1,10 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="lib" path="libs/commons-beanutils-1.8.3.jar"/>
+ <classpathentry kind="lib" path="libs/commons-beanutils-bean-collections-1.8.3.jar"/>
+ <classpathentry kind="lib" path="libs/commons-beanutils-core-1.8.3.jar"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Modified: branches/smooks-dmb/plugins/org.jboss.tools.smooks.model/META-INF/MANIFEST.MF
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.model/META-INF/MANIFEST.MF 2010-07-12 12:17:53 UTC (rev 23369)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.model/META-INF/MANIFEST.MF 2010-07-12 12:19:05 UTC (rev 23370)
@@ -11,6 +11,7 @@
org.jboss.tools.smooks.runtime
Bundle-Activator: org.jboss.tools.smooks.model.plugin.SmooksModelActivator
Export-Package: org.jboss.tools.smooks.model,
+ org.jboss.tools.smooks.model.command,
org.jboss.tools.smooks.model.core,
org.jboss.tools.smooks.model.csv,
org.jboss.tools.smooks.model.edi,
@@ -18,4 +19,7 @@
org.jboss.tools.smooks.model.javabean,
org.jboss.tools.smooks.model.json,
org.jboss.tools.smooks.model.plugin
-Bundle-ClassPath: .
+Bundle-ClassPath: .,
+ libs/commons-beanutils-1.8.3.jar,
+ libs/commons-beanutils-bean-collections-1.8.3.jar,
+ libs/commons-beanutils-core-1.8.3.jar
Modified: branches/smooks-dmb/plugins/org.jboss.tools.smooks.model/build.properties
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.model/build.properties 2010-07-12 12:17:53 UTC (rev 23369)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.model/build.properties 2010-07-12 12:19:05 UTC (rev 23370)
@@ -2,7 +2,10 @@
bin.includes = META-INF/,\
.,\
about.html,\
- plugin.properties
+ plugin.properties,\
+ libs/commons-beanutils-1.8.3.jar,\
+ libs/commons-beanutils-bean-collections-1.8.3.jar,\
+ libs/commons-beanutils-core-1.8.3.jar
jars.compile.order = .
source.. = src/
source.. = src/
Added: branches/smooks-dmb/plugins/org.jboss.tools.smooks.model/libs/commons-beanutils-1.8.3.jar
===================================================================
(Binary files differ)
Property changes on: branches/smooks-dmb/plugins/org.jboss.tools.smooks.model/libs/commons-beanutils-1.8.3.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: branches/smooks-dmb/plugins/org.jboss.tools.smooks.model/libs/commons-beanutils-bean-collections-1.8.3.jar
===================================================================
(Binary files differ)
Property changes on: branches/smooks-dmb/plugins/org.jboss.tools.smooks.model/libs/commons-beanutils-bean-collections-1.8.3.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: branches/smooks-dmb/plugins/org.jboss.tools.smooks.model/libs/commons-beanutils-core-1.8.3.jar
===================================================================
(Binary files differ)
Property changes on: branches/smooks-dmb/plugins/org.jboss.tools.smooks.model/libs/commons-beanutils-core-1.8.3.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: branches/smooks-dmb/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/command/AddCommand.java
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/command/AddCommand.java (rev 0)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/command/AddCommand.java 2010-07-12 12:19:05 UTC (rev 23370)
@@ -0,0 +1,68 @@
+/**
+ *
+ */
+package org.jboss.tools.smooks.model.command;
+
+import java.util.Collection;
+
+/**
+ * @author Dart
+ *
+ */
+public class AddCommand extends Command {
+
+ private boolean added = false;
+
+ public AddCommand() {
+ super();
+ // TODO Auto-generated constructor stub
+ }
+
+ public AddCommand(Object host, Object value, String propertyName) {
+ super(host, value, propertyName);
+ // TODO Auto-generated constructor stub
+ }
+
+ @Override
+ public void execute() {
+ try {
+ Object v = getPropertyValue();
+ if(!(v instanceof Collection)){
+ throw new RuntimeException("Value's type isn't Collection , please check the " + "'" + propertyName + "'");
+ }
+ ((Collection)v).add(value);
+ added = true;
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ @Override
+ public boolean canExecute() {
+ return ( host!=null && value!=null && !added && propertyName != null);
+ }
+
+ @Override
+ public boolean canRedo() {
+ return super.canRedo();
+ }
+
+ @Override
+ public boolean canUndo() {
+ return ( host!=null && value!=null && added && propertyName != null);
+ }
+
+ @Override
+ public void undo() {
+ try {
+ Object v = getPropertyValue();
+ if(!(v instanceof Collection)){
+ throw new RuntimeException("Value's type isn't Collection , please check the " + "'" + propertyName + "'");
+ }
+ ((Collection)v).remove(value);
+ added = false;
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
\ No newline at end of file
Property changes on: branches/smooks-dmb/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/command/AddCommand.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/smooks-dmb/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/command/Command.java
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/command/Command.java (rev 0)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/command/Command.java 2010-07-12 12:19:05 UTC (rev 23370)
@@ -0,0 +1,144 @@
+/**
+ *
+ */
+package org.jboss.tools.smooks.model.command;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import org.apache.commons.beanutils.PropertyUtils;
+
+/**
+ * @author Dart
+ *
+ */
+public class Command implements ICommand {
+
+ protected Object host;
+
+ protected String propertyName;
+
+ protected Object value;
+
+ protected Object oldValue;
+
+ protected boolean execued = false;
+
+ protected boolean redoed = false;
+
+ protected boolean undoed = false;
+
+ public Command(){
+
+ }
+
+ public Command(Object host , Object value , String propertyName ){
+ this.host = host;
+ this.propertyName = propertyName;
+ this.value = value;
+ }
+
+ public Object getValue() {
+ return value;
+ }
+
+ public void setValue(Object value) {
+ this.value = value;
+ }
+
+ public Object getHost() {
+ return host;
+ }
+
+ public void setHost(Object host) {
+ this.host = host;
+ }
+
+ public String getPropertyName() {
+ return propertyName;
+ }
+
+ public void setPropertyName(String propertyName) {
+ this.propertyName = propertyName;
+ }
+
+
+ protected Object getPropertyValue() throws IllegalAccessException, InvocationTargetException, NoSuchMethodException{
+ return PropertyUtils.getProperty(host, propertyName);
+ }
+
+ protected Method getSetterMethod() throws SecurityException, NoSuchMethodException{
+ char sc = propertyName.toCharArray()[0];
+ String us = new String(new char[]{sc});
+ us = us.toUpperCase();
+ String n = propertyName.substring(1);
+ n = ("set" +us + n);
+ return host.getClass().getMethod(n, value.getClass());
+ }
+
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.tools.smooks.model.command.ICommand#execute()
+ */
+ public void execute() {
+// if(!canExecute()) return;
+ try {
+ oldValue = getPropertyValue();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.tools.smooks.model.command.ICommand#canExecute()
+ */
+ public boolean canExecute() {
+ return ( host!=null && value!=null && !execued && propertyName != null);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.tools.smooks.model.command.ICommand#canRedo()
+ */
+ public boolean canRedo() {
+ return ( host!=null && value!=null && execued && propertyName != null);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.tools.smooks.model.command.ICommand#canUndo()
+ */
+ public boolean canUndo() {
+ return ( host!=null && execued && propertyName != null);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.tools.smooks.model.command.ICommand#redo()
+ */
+ public void redo() {
+ this.execute();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.tools.smooks.model.command.ICommand#undo()
+ */
+ public void undo() {
+// if(!canUndo()) return;
+ try {
+ value = getPropertyValue();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+}
Property changes on: branches/smooks-dmb/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/command/Command.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/smooks-dmb/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/command/ICommand.java
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/command/ICommand.java (rev 0)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/command/ICommand.java 2010-07-12 12:19:05 UTC (rev 23370)
@@ -0,0 +1,15 @@
+package org.jboss.tools.smooks.model.command;
+
+public interface ICommand {
+ void execute();
+
+ boolean canExecute();
+
+ boolean canRedo();
+
+ boolean canUndo();
+
+ void redo();
+
+ void undo();
+}
Property changes on: branches/smooks-dmb/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/command/ICommand.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/smooks-dmb/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/command/RemoveCommand.java
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/command/RemoveCommand.java (rev 0)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/command/RemoveCommand.java 2010-07-12 12:19:05 UTC (rev 23370)
@@ -0,0 +1,22 @@
+/**
+ *
+ */
+package org.jboss.tools.smooks.model.command;
+
+/**
+ * @author Dart
+ *
+ */
+public class RemoveCommand extends Command {
+
+ public RemoveCommand() {
+ super();
+ // TODO Auto-generated constructor stub
+ }
+
+ public RemoveCommand(Object host, Object value, String propertyName) {
+ super(host, value, propertyName);
+ // TODO Auto-generated constructor stub
+ }
+
+}
Property changes on: branches/smooks-dmb/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/command/RemoveCommand.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/smooks-dmb/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/command/SetCommand.java
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/command/SetCommand.java (rev 0)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/command/SetCommand.java 2010-07-12 12:19:05 UTC (rev 23370)
@@ -0,0 +1,59 @@
+/**
+ *
+ */
+package org.jboss.tools.smooks.model.command;
+
+import java.lang.reflect.Method;
+
+/**
+ * @author Dart
+ *
+ */
+public class SetCommand extends Command {
+
+ public SetCommand() {
+ super();
+ // TODO Auto-generated constructor stub
+ }
+
+ public SetCommand(Object host, Object value, String propertyName) {
+ super(host, value, propertyName);
+ // TODO Auto-generated constructor stub
+ }
+
+ public void execute(Object host , Object value , String propertyName){
+ this.host = host;
+ this.value = value;
+ this.propertyName = propertyName;
+ execute();
+ }
+
+ @Override
+ public void execute() {
+ super.execute();
+ try {
+ Method setter = getSetterMethod();
+ setter.invoke(host, value);
+// PropertyDescriptor pd = PropertyUtils.getPropertyDescriptor(host, propertyName);
+// pd.getWriteMethod().invoke(host, value);
+ value = null;
+ execued = true;
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ @Override
+ public void undo() {
+ super.undo();
+ try {
+ Method setter = getSetterMethod();
+ setter.invoke(host, oldValue);
+// PropertyDescriptor pd = PropertyUtils.getPropertyDescriptor(host, propertyName);
+// pd.setValue(propertyName, oldValue);
+ oldValue = null;
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
Property changes on: branches/smooks-dmb/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/command/SetCommand.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/smooks-dmb/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/command/SmooksCommandStack.java
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/command/SmooksCommandStack.java (rev 0)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/command/SmooksCommandStack.java 2010-07-12 12:19:05 UTC (rev 23370)
@@ -0,0 +1,65 @@
+/**
+ *
+ */
+package org.jboss.tools.smooks.model.command;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+
+/**
+ * @author Dart
+ *
+ */
+public class SmooksCommandStack {
+ private List<ICommand> executedCommands = null;
+
+ private List<ICommand> undoedCommands = null;
+
+ private ICommand currentExecuteCommand = null;
+
+ public List<ICommand> getExecutedCommands() {
+
+ if(executedCommands == null){
+ executedCommands = new ArrayList<ICommand>();
+ }
+ return executedCommands;
+ }
+
+
+ public List<ICommand> getUndoedCommands() {
+ if(undoedCommands == null){
+ undoedCommands = new ArrayList<ICommand>();
+ }
+ return undoedCommands;
+ }
+
+
+ public void execute(ICommand c){
+ c.execute();
+ addExecutedCommand(c);
+ }
+
+ public void undo(){
+ if(getExecutedCommands().size() > 0){
+
+ }
+ }
+
+ public void addExecutedCommand(ICommand c){
+ getExecutedCommands().add(c);
+ }
+
+ public void removeCommand(ICommand c){
+ getExecutedCommands().remove(c);
+ }
+
+// public boolean isDirty(){
+//
+// }
+
+ public void cleanStack(){
+ getExecutedCommands().clear();
+ currentExecuteCommand = null;
+ }
+}
Property changes on: branches/smooks-dmb/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/command/SmooksCommandStack.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 9 months
JBoss Tools SVN: r23369 - in branches/smooks-dmb/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model: command and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2010-07-12 08:17:53 -0400 (Mon, 12 Jul 2010)
New Revision: 23369
Added:
branches/smooks-dmb/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/command/
branches/smooks-dmb/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/command/SetCommandTest.java
Log:
Added: branches/smooks-dmb/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/command/SetCommandTest.java
===================================================================
--- branches/smooks-dmb/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/command/SetCommandTest.java (rev 0)
+++ branches/smooks-dmb/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/command/SetCommandTest.java 2010-07-12 12:17:53 UTC (rev 23369)
@@ -0,0 +1,63 @@
+/**
+ *
+ */
+package org.jboss.tools.smooks.model.command;
+
+import junit.framework.TestCase;
+
+import org.jboss.tools.smooks.model.csv.CSVReader;
+import org.junit.Assert;
+
+/**
+ * @author Dart
+ *
+ */
+public class SetCommandTest extends TestCase {
+ public void testCSVReaderSet() {
+ CSVReader reader = new CSVReader();
+
+ SetCommand command1 = new SetCommand(reader, "name,address,age", "fields");
+ SetCommand command2 = new SetCommand(reader, "people", "rootElementName");
+ SetCommand command3 = new SetCommand(reader, "person", "recordElementName");
+ SetCommand command4 = new SetCommand(reader, true, "indent");
+
+
+ command1.execute();
+ command2.execute();
+ command3.execute();
+ command4.execute();
+
+ Assert.assertSame(reader.getFields(), "name,address,age");
+ Assert.assertSame(reader.getRecordElementName(), "person");
+ Assert.assertSame(reader.getRootElementName(), "people");
+ Assert.assertSame(reader.getIndent(),true);
+
+
+
+ command1.undo();
+ command2.undo();
+ command3.undo();
+ command4.undo();
+
+ Assert.assertSame(reader.getFields(), null);
+ Assert.assertSame(reader.getRecordElementName(), null);
+ Assert.assertSame(reader.getRootElementName(),null);
+// Assert.assertSame(reader.getIndent(),true);
+
+ command1.redo();
+ command2.redo();
+ command3.redo();
+ command4.redo();
+
+ Assert.assertSame(reader.getFields(), "name,address,age");
+ Assert.assertSame(reader.getRecordElementName(), "person");
+ Assert.assertSame(reader.getRootElementName(), "people");
+ Assert.assertSame(reader.getIndent(),true);
+
+// reader.setFields("name,address,age");
+// reader.setRootElementName("people");
+// reader.setRecordElementName("person");
+// reader.setIndent(true);
+
+ }
+}
Property changes on: branches/smooks-dmb/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/command/SetCommandTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 9 months
JBoss Tools SVN: r23368 - workspace/dgolovin/experimental-build.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-07-09 20:03:05 -0400 (Fri, 09 Jul 2010)
New Revision: 23368
Modified:
workspace/dgolovin/experimental-build/parent-pom.xml
Log:
extension is fixed for html coverage report
Modified: workspace/dgolovin/experimental-build/parent-pom.xml
===================================================================
--- workspace/dgolovin/experimental-build/parent-pom.xml 2010-07-09 23:41:43 UTC (rev 23367)
+++ workspace/dgolovin/experimental-build/parent-pom.xml 2010-07-10 00:03:05 UTC (rev 23368)
@@ -561,7 +561,7 @@
<infileset dir="${project.build.directory}/emma" includes="*.es,*.em" />
<txt outfile="${project.build.directory}/emma/coverage.txt" />
<xml outfile="${project.build.directory}/emma/coverage.xml" />
- <html outfile="${project.build.directory}/emma/coverage.xml" />
+ <html outfile="${project.build.directory}/emma/coverage.html" />
</report>
</emma>
<loadfile property="emma.txt"
15 years, 9 months
JBoss Tools SVN: r23367 - in trunk/build: reports and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-07-09 19:41:43 -0400 (Fri, 09 Jul 2010)
New Revision: 23367
Added:
trunk/build/reports/
trunk/build/reports/emma-coverage/
trunk/build/reports/emma-coverage/pom.xml
Log:
aggregated emma coverage report
Added: trunk/build/reports/emma-coverage/pom.xml
===================================================================
--- trunk/build/reports/emma-coverage/pom.xml (rev 0)
+++ trunk/build/reports/emma-coverage/pom.xml 2010-07-09 23:41:43 UTC (rev 23367)
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.jboss.tools.build.reports</groupId>
+ <artifactId>emma-coverage</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.3</version>
+ <dependencies>
+ <dependency>
+ <groupId>emma</groupId>
+ <artifactId>emma_ant</artifactId>
+ <version>2.0.5312</version>
+ </dependency>
+ <dependency>
+ <groupId>emma</groupId>
+ <artifactId>emma</artifactId>
+ <version>2.0.5312</version>
+ </dependency>
+ <dependency>
+ <groupId>ant-contrib</groupId>
+ <artifactId>ant-contrib</artifactId>
+ <version>1.0b3</version>
+ </dependency>
+ </dependencies>
+ <executions>
+ <execution>
+ <id>emma-report</id>
+ <phase>post-integration-test</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <taskdef resource="emma_ant.properties" />
+ <taskdef resource="net/sf/antcontrib/antcontrib.properties" />
+
+ <echo>Process emma report...</echo>
+ <emma enabled="true">
+ <report>
+ <infileset dir="${basedir}/../../.." includes="*/tests/*/target/emma/*.es" />
+ <txt outfile="${project.build.directory}/coverage.txt" />
+ <xml outfile="${project.build.directory}/coverage.xml" />
+ <html outfile="${project.build.directory}/coverage.html" />
+ </report>
+ </emma>
+ <loadfile property="emma.txt"
+ srcFile="${project.build.directory}/coverage.txt"
+ failonerror="false" />
+ <echo>${emma.txt}</echo>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
+
15 years, 9 months
JBoss Tools SVN: r23366 - workspace/dgolovin/experimental-build.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-07-09 19:39:56 -0400 (Fri, 09 Jul 2010)
New Revision: 23366
Modified:
workspace/dgolovin/experimental-build/parent-pom.xml
workspace/dgolovin/experimental-build/pom.xml
Log:
module added to aggregate all *.es files generated during JUnit tests execution
Modified: workspace/dgolovin/experimental-build/parent-pom.xml
===================================================================
--- workspace/dgolovin/experimental-build/parent-pom.xml 2010-07-09 23:00:58 UTC (rev 23365)
+++ workspace/dgolovin/experimental-build/parent-pom.xml 2010-07-09 23:39:56 UTC (rev 23366)
@@ -561,6 +561,7 @@
<infileset dir="${project.build.directory}/emma" includes="*.es,*.em" />
<txt outfile="${project.build.directory}/emma/coverage.txt" />
<xml outfile="${project.build.directory}/emma/coverage.xml" />
+ <html outfile="${project.build.directory}/emma/coverage.xml" />
</report>
</emma>
<loadfile property="emma.txt"
Modified: workspace/dgolovin/experimental-build/pom.xml
===================================================================
--- workspace/dgolovin/experimental-build/pom.xml 2010-07-09 23:00:58 UTC (rev 23365)
+++ workspace/dgolovin/experimental-build/pom.xml 2010-07-09 23:39:56 UTC (rev 23366)
@@ -10,11 +10,10 @@
</properties>
<profiles>
-
<profile>
<id>libs</id>
<activation>
- <activeByDefault>false</activeByDefault>
+ <activeByDefault>true</activeByDefault>
</activation>
<modules>
<module>${workspace.root.path}/build/libs</module>
@@ -57,6 +56,7 @@
<activeByDefault>true</activeByDefault>
</activation>
<modules>
+ <module>${workspace.root.path}/build/libs</module>
<module>${workspace.root.path}/tests</module>
<module>${workspace.root.path}/jmx</module>
</modules>
@@ -68,6 +68,7 @@
<activeByDefault>true</activeByDefault>
</activation>
<modules>
+ <module>${workspace.root.path}/build/libs</module>
<module>${workspace.root.path}/tests</module>
<module>${workspace.root.path}/archives</module>
</modules>
@@ -79,13 +80,26 @@
<activeByDefault>true</activeByDefault>
</activation>
<modules>
+ <module>${workspace.root.path}/build/libs</module>
<module>${workspace.root.path}/tests</module>
<module>${workspace.root.path}/jmx</module>
<module>${workspace.root.path}/archives</module>
- <module>${workspace.root.path}/as</module>
+ <module>${workspace.root.path}/as</module>
</modules>
</profile>
+ <profile>
+ <id>emma-coverage</id>
+ <activation>
+ <property>
+ <name>coverage</name>
+ </property>
+ </activation>
+ <modules>
+ <module>${workspace.root.path}/build/reports/emma-coverage</module>
+ </modules>
+ </profile>
+
</profiles>
</project>
15 years, 9 months