JBoss Portal SVN: r7850 - in branches/JBoss_Portal_Branch_2_6/widget/src: main/org/jboss/portal/widget and 6 other directories.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2007-07-31 15:05:35 -0400 (Tue, 31 Jul 2007)
New Revision: 7850
Added:
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/directory/
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/directory/GGWidgetDirecotoryFactory.java
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/info/
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/info/GGPreferenceInfo.java
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/info/GGPreferencesInfo.java
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/info/GGWidgetCategoryInfo.java
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/info/GGWidgetInfo.java
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/metadata/
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/metadata/GGWidgetMetaData.java
Removed:
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/GGPreferenceInfo.java
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/GGPreferencesInfo.java
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/GGWidgetCategoryInfo.java
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/GGWidgetInfo.java
Modified:
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/test/widget/google/PreferencesTestCase.java
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/Widget.java
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/WidgetPortlet.java
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/GGWidget.java
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/provider/GGProvider.java
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/provider/GGQuery.java
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/provider/GGQueryResultBuilder.java
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/provider/GGQueryResultEntry.java
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/provider/GGWidgetInfoBuilder.java
branches/JBoss_Portal_Branch_2_6/widget/src/resources/widget-war/WEB-INF/jsp/edit.jsp
Log:
- improve internationalizations in google gadgets
- rewrite gadgets directory rss parse to JBossXB
- small refactoring
Modified: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/test/widget/google/PreferencesTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/test/widget/google/PreferencesTestCase.java 2007-07-31 14:16:32 UTC (rev 7849)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/test/widget/google/PreferencesTestCase.java 2007-07-31 19:05:35 UTC (rev 7850)
@@ -24,9 +24,9 @@
import junit.framework.TestCase;
import org.jboss.portal.widget.google.provider.GGWidgetInfoBuilder;
-import org.jboss.portal.widget.google.GGPreferencesInfo;
-import org.jboss.portal.widget.google.GGPreferenceInfo;
-import org.jboss.portal.widget.google.GGWidgetInfo;
+import org.jboss.portal.widget.google.info.GGPreferencesInfo;
+import org.jboss.portal.widget.google.info.GGPreferenceInfo;
+import org.jboss.portal.widget.google.info.GGWidgetInfo;
import org.jboss.portal.widget.google.type.DataType;
import org.jboss.portal.widget.google.type.EnumType;
import org.jboss.portal.common.io.IOTools;
Modified: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/Widget.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/Widget.java 2007-07-31 14:16:32 UTC (rev 7849)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/Widget.java 2007-07-31 19:05:35 UTC (rev 7850)
@@ -25,6 +25,7 @@
import org.jboss.portal.common.i18n.LocalizedString;
import java.util.Map;
+import java.util.Locale;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -41,4 +42,6 @@
String render(Map parameters);
+ String render(Map parameters, Locale locale);
+
}
Modified: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/WidgetPortlet.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/WidgetPortlet.java 2007-07-31 14:16:32 UTC (rev 7849)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/WidgetPortlet.java 2007-07-31 19:05:35 UTC (rev 7850)
@@ -120,7 +120,7 @@
Widget widget = provider.getWidget(uri);
if (widget != null)
{
- writer.print(widget.render(req.getParameterMap()));
+ writer.print(widget.render(req.getParameterMap(), req.getLocale()));
}
else
{
Deleted: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/GGPreferenceInfo.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/GGPreferenceInfo.java 2007-07-31 14:16:32 UTC (rev 7849)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/GGPreferenceInfo.java 2007-07-31 19:05:35 UTC (rev 7850)
@@ -1,82 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.widget.google;
-
-import org.jboss.portal.widget.google.type.DataType;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public final class GGPreferenceInfo
-{
-
- /** . */
- private final String name;
-
- /** . */
- private final DataType type;
-
- /** . */
- private final String displayName;
-
- /** . */
- private final boolean required;
-
- /** . */
- private final String defaultValue;
-
- public GGPreferenceInfo(String name, DataType type, String displayName, boolean required, String defaultValue)
- {
- this.name = name;
- this.type = type;
- this.displayName = displayName;
- this.required = required;
- this.defaultValue = defaultValue;
- }
-
- public String getName()
- {
- return name;
- }
-
- public DataType getType()
- {
- return type;
- }
-
- public String getDefaultValue()
- {
- return defaultValue;
- }
-
- public String getDisplayName()
- {
- return displayName;
- }
-
- public boolean isRequired()
- {
- return required;
- }
-}
Deleted: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/GGPreferencesInfo.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/GGPreferencesInfo.java 2007-07-31 14:16:32 UTC (rev 7849)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/GGPreferencesInfo.java 2007-07-31 19:05:35 UTC (rev 7850)
@@ -1,76 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.widget.google;
-
-import java.util.Map;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.HashMap;
-import java.util.Collections;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public final class GGPreferencesInfo
-{
-
- /** . */
- public static final GGPreferencesInfo EMPTY_PREFS = new GGPreferencesInfo();
-
- /** . */
- private final Map content;
-
- public GGPreferencesInfo(Collection prefInfos)
- {
- if (prefInfos == null)
- {
- throw new IllegalArgumentException();
- }
- content = new HashMap(prefInfos.size());
- for (Iterator i = prefInfos.iterator();i.hasNext();)
- {
- GGPreferenceInfo prefInfo = (GGPreferenceInfo)i.next();
- content.put(prefInfo.getName(), prefInfo);
- }
- }
-
- private GGPreferencesInfo()
- {
- content = null;
- }
-
- public Collection getPreferences()
- {
- return content == null ? Collections.EMPTY_SET : content.values();
- }
-
- public GGPreferenceInfo getPreference(String name)
- {
- if (name == null)
- {
- throw new IllegalArgumentException();
- }
- return content == null ? null : (GGPreferenceInfo)content.get(name);
- }
-}
Modified: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/GGWidget.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/GGWidget.java 2007-07-31 14:16:32 UTC (rev 7849)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/GGWidget.java 2007-07-31 19:05:35 UTC (rev 7850)
@@ -26,9 +26,13 @@
import org.jboss.portal.common.util.UUIDGenerator;
import org.jboss.portal.common.text.FastURLEncoder;
import org.jboss.portal.widget.Widget;
+import org.jboss.portal.widget.google.info.GGWidgetInfo;
+import org.jboss.portal.widget.google.info.GGPreferenceInfo;
+import org.jboss.portal.widget.google.info.GGPreferencesInfo;
import java.util.Iterator;
import java.util.Map;
+import java.util.Locale;
import java.net.URL;
/**
@@ -90,6 +94,11 @@
public String render(Map parameters)
{
+ return render(parameters, null);
+ }
+
+ public String render(Map parameters, Locale locale)
+ {
String id = generator.generateKey();
StringBuffer tmp = new StringBuffer("http://gmodules.com/ig/ifr?url=").append(url);
@@ -107,6 +116,12 @@
//tmp.append("&title=").append(FastURLEncoder.DEFAULT_ENCODER.encode(info.getTitle().getDefaultString()));
tmp.append("&border=%23ffffff%7C3px%2C1px+none+%23999999"); // "&border=%23ffffff%7C3px%2C1px+solid+%23999999"
tmp.append("&output=js");
+ //pass locale information
+ if (locale != null)
+ {
+ tmp.append("&lang=").append(locale.getLanguage());
+ tmp.append("&country=").append(locale.getCountry());
+ }
//
GGPreferencesInfo prefsInfo = info.getPreferences();
Deleted: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/GGWidgetCategoryInfo.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/GGWidgetCategoryInfo.java 2007-07-31 14:16:32 UTC (rev 7849)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/GGWidgetCategoryInfo.java 2007-07-31 19:05:35 UTC (rev 7850)
@@ -1,62 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.widget.google;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public class GGWidgetCategoryInfo
-{
-
- /** . */
- private final String name;
-
- /** . */
- private final String displayName;
-
-
- public GGWidgetCategoryInfo(String name, String displayName)
- {
- if (name == null)
- {
- throw new IllegalArgumentException();
- }
- if (displayName == null)
- {
- throw new IllegalArgumentException();
- }
- this.name = name;
- this.displayName = displayName;
- }
-
- public String getName()
- {
- return name;
- }
-
- public String getDisplayName()
- {
- return displayName;
- }
-}
Deleted: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/GGWidgetInfo.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/GGWidgetInfo.java 2007-07-31 14:16:32 UTC (rev 7849)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/GGWidgetInfo.java 2007-07-31 19:05:35 UTC (rev 7850)
@@ -1,100 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.widget.google;
-
-import org.jboss.portal.common.i18n.LocalizedString;
-
-/**
- * Meta data retrieved from the XML file.
- *
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public class GGWidgetInfo
-{
-
- /** . */
- private final LocalizedString title;
-
- /** . */
- private final LocalizedString directoryTitle;
-
- /** . */
- private final LocalizedString description;
-
- /** . */
- private final int width;
-
- /** . */
- private final int height;
-
- /** . */
- private final GGPreferencesInfo preferences;
-
- public GGWidgetInfo(
- LocalizedString title,
- LocalizedString directoryTitle,
- LocalizedString description,
- int width,
- int height,
- GGPreferencesInfo preferences)
- {
- this.title = title;
- this.directoryTitle = directoryTitle;
- this.description = description;
- this.width = width;
- this.height = height;
- this.preferences = preferences;
- }
-
- public GGPreferencesInfo getPreferences()
- {
- return preferences;
- }
-
- public LocalizedString getTitle()
- {
- return title;
- }
-
- public LocalizedString getDescription()
- {
- return description;
- }
-
- public int getWidth()
- {
- return width;
- }
-
- public int getHeight()
- {
- return height;
- }
-
-
- public LocalizedString getDirectoryTitle()
- {
- return directoryTitle;
- }
-}
Added: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/directory/GGWidgetDirecotoryFactory.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/directory/GGWidgetDirecotoryFactory.java (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/directory/GGWidgetDirecotoryFactory.java 2007-07-31 19:05:35 UTC (rev 7850)
@@ -0,0 +1,173 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+
+package org.jboss.portal.widget.google.directory;
+
+import org.jboss.xb.binding.GenericObjectModelFactory;
+import org.jboss.xb.binding.UnmarshallingContext;
+import org.jboss.portal.widget.google.metadata.GGWidgetMetaData;
+import org.xml.sax.Attributes;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot com">Boleslaw Dawidowicz</a>
+ * @version $Revision: 0.1 $
+ */
+public class GGWidgetDirecotoryFactory implements GenericObjectModelFactory
+{
+
+ public static final String GHAPI_URI = "http://www.google.com/apis/homepage";
+
+ public Object newRoot(Object root, UnmarshallingContext unmarshallingContext, String namespaceURI, String localname, Attributes attributes)
+ {
+ return new ArrayList();
+ }
+
+ public Object completeRoot(Object root, UnmarshallingContext unmarshallingContext, String namespaceURI, String localname)
+ {
+ return root;
+ }
+
+
+ public Object newChild(Object parent, UnmarshallingContext unmarshallingContext, String namespaceURI, String localName, Attributes attributes)
+ {
+ if ("channel".equals(localName))
+ {
+ return parent;
+ }
+ if ("item".equals(localName))
+ {
+ return new GGWidgetMetaData();
+ }
+ return null;
+ }
+
+ public void addChild(Object parent, Object child, UnmarshallingContext unmarshallingContext, String namespaceURI, String localname)
+ {
+ if (child instanceof GGWidgetMetaData)
+ {
+ ((List)parent).add(child);
+ }
+ }
+
+ public void setValue(Object object, UnmarshallingContext unmarshallingContext, String namespaceURI, String localName, String value)
+ {
+ if (object instanceof GGWidgetMetaData)
+ {
+ GGWidgetMetaData widget = (GGWidgetMetaData)object;
+ if (GHAPI_URI.equals(namespaceURI))
+ {
+ if ("author_email".equals(localName))
+ {
+ widget.setAuthorEmail(value);
+ }
+ else
+ if ("screenshot".equals(localName))
+ {
+ widget.setScreenshot(value);
+ }
+ else
+ if ("thumbnail".equals(localName))
+ {
+ widget.setThumbnail(value);
+ }
+ else
+ if ("author_location".equals(localName))
+ {
+ widget.setAuthorLocaltion(value);
+ }
+ else
+ if ("author_affiliation".equals(localName))
+ {
+ widget.setAuthorAffiliation(value);
+ }
+ else
+ if ("title_url".equals(localName))
+ {
+ widget.setTitleURL(value);
+ }
+ else
+ if ("directory_title".equals(localName))
+ {
+ widget.setDirectoryTitle(value);
+ }
+ else
+ if ("author_photo".equals(localName))
+ {
+ widget.setAuthorPhoto(value);
+ }
+ else
+ if ("author_aboutme".equals(localName))
+ {
+ widget.setAuthorAboutme(value);
+ }
+ else
+ if ("author_link".equals(localName))
+ {
+ widget.setAuthorLink(value);
+ }
+ else
+ if ("author_quote".equals(localName))
+ {
+ widget.setAuthorQuote(value);
+ }
+ if ("width".equals(localName))
+ {
+ widget.setWidth(value);
+ }
+ if ("height".equals(localName))
+ {
+ widget.setHeight(value);
+ }
+ }
+ else
+ {
+ if ("title".equals(localName))
+ {
+ widget.setTitle(value);
+ }
+ else
+ if ("link".equals(localName))
+ {
+ widget.setLink(value);
+ }
+ else
+ if ("guid".equals(localName))
+ {
+ //doubles 'link' tag
+ }
+ else
+ if ("description".equals(localName))
+ {
+ widget.setDescription(value);
+ }
+ else
+ if ("author".equals(localName))
+ {
+ widget.setAuthor(value);
+ }
+ }
+ }
+ }
+}
Copied: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/info/GGPreferenceInfo.java (from rev 7840, branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/GGPreferenceInfo.java)
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/info/GGPreferenceInfo.java (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/info/GGPreferenceInfo.java 2007-07-31 19:05:35 UTC (rev 7850)
@@ -0,0 +1,82 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.widget.google.info;
+
+import org.jboss.portal.widget.google.type.DataType;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public final class GGPreferenceInfo
+{
+
+ /** . */
+ private final String name;
+
+ /** . */
+ private final DataType type;
+
+ /** . */
+ private final String displayName;
+
+ /** . */
+ private final boolean required;
+
+ /** . */
+ private final String defaultValue;
+
+ public GGPreferenceInfo(String name, DataType type, String displayName, boolean required, String defaultValue)
+ {
+ this.name = name;
+ this.type = type;
+ this.displayName = displayName;
+ this.required = required;
+ this.defaultValue = defaultValue;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public DataType getType()
+ {
+ return type;
+ }
+
+ public String getDefaultValue()
+ {
+ return defaultValue;
+ }
+
+ public String getDisplayName()
+ {
+ return displayName;
+ }
+
+ public boolean isRequired()
+ {
+ return required;
+ }
+}
Copied: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/info/GGPreferencesInfo.java (from rev 7840, branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/GGPreferencesInfo.java)
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/info/GGPreferencesInfo.java (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/info/GGPreferencesInfo.java 2007-07-31 19:05:35 UTC (rev 7850)
@@ -0,0 +1,78 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.widget.google.info;
+
+import org.jboss.portal.widget.google.info.GGPreferenceInfo;
+
+import java.util.Map;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.HashMap;
+import java.util.Collections;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public final class GGPreferencesInfo
+{
+
+ /** . */
+ public static final GGPreferencesInfo EMPTY_PREFS = new GGPreferencesInfo();
+
+ /** . */
+ private final Map content;
+
+ public GGPreferencesInfo(Collection prefInfos)
+ {
+ if (prefInfos == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ content = new HashMap(prefInfos.size());
+ for (Iterator i = prefInfos.iterator();i.hasNext();)
+ {
+ GGPreferenceInfo prefInfo = (GGPreferenceInfo)i.next();
+ content.put(prefInfo.getName(), prefInfo);
+ }
+ }
+
+ private GGPreferencesInfo()
+ {
+ content = null;
+ }
+
+ public Collection getPreferences()
+ {
+ return content == null ? Collections.EMPTY_SET : content.values();
+ }
+
+ public GGPreferenceInfo getPreference(String name)
+ {
+ if (name == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ return content == null ? null : (GGPreferenceInfo)content.get(name);
+ }
+}
Copied: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/info/GGWidgetCategoryInfo.java (from rev 7840, branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/GGWidgetCategoryInfo.java)
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/info/GGWidgetCategoryInfo.java (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/info/GGWidgetCategoryInfo.java 2007-07-31 19:05:35 UTC (rev 7850)
@@ -0,0 +1,62 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.widget.google.info;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class GGWidgetCategoryInfo
+{
+
+ /** . */
+ private final String name;
+
+ /** . */
+ private final String displayName;
+
+
+ public GGWidgetCategoryInfo(String name, String displayName)
+ {
+ if (name == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ if (displayName == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ this.name = name;
+ this.displayName = displayName;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public String getDisplayName()
+ {
+ return displayName;
+ }
+}
Copied: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/info/GGWidgetInfo.java (from rev 7840, branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/GGWidgetInfo.java)
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/info/GGWidgetInfo.java (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/info/GGWidgetInfo.java 2007-07-31 19:05:35 UTC (rev 7850)
@@ -0,0 +1,101 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.widget.google.info;
+
+import org.jboss.portal.common.i18n.LocalizedString;
+import org.jboss.portal.widget.google.info.GGPreferencesInfo;
+
+/**
+ * Meta data retrieved from the XML file.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class GGWidgetInfo
+{
+
+ /** . */
+ private final LocalizedString title;
+
+ /** . */
+ private final LocalizedString directoryTitle;
+
+ /** . */
+ private final LocalizedString description;
+
+ /** . */
+ private final int width;
+
+ /** . */
+ private final int height;
+
+ /** . */
+ private final GGPreferencesInfo preferences;
+
+ public GGWidgetInfo(
+ LocalizedString title,
+ LocalizedString directoryTitle,
+ LocalizedString description,
+ int width,
+ int height,
+ GGPreferencesInfo preferences)
+ {
+ this.title = title;
+ this.directoryTitle = directoryTitle;
+ this.description = description;
+ this.width = width;
+ this.height = height;
+ this.preferences = preferences;
+ }
+
+ public GGPreferencesInfo getPreferences()
+ {
+ return preferences;
+ }
+
+ public LocalizedString getTitle()
+ {
+ return title;
+ }
+
+ public LocalizedString getDescription()
+ {
+ return description;
+ }
+
+ public int getWidth()
+ {
+ return width;
+ }
+
+ public int getHeight()
+ {
+ return height;
+ }
+
+
+ public LocalizedString getDirectoryTitle()
+ {
+ return directoryTitle;
+ }
+}
Added: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/metadata/GGWidgetMetaData.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/metadata/GGWidgetMetaData.java (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/metadata/GGWidgetMetaData.java 2007-07-31 19:05:35 UTC (rev 7850)
@@ -0,0 +1,261 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+
+package org.jboss.portal.widget.google.metadata;
+
+/**
+ * @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot com">Boleslaw Dawidowicz</a>
+ * @version $Revision: 0.1 $
+ */
+public class GGWidgetMetaData
+{
+ private String title;
+
+ private String link;
+
+ private String guid;
+
+ private String description;
+
+ private String author;
+
+ private String authorEmail;
+
+ private String screenshot;
+
+ private String thumbnail;
+
+ private String authorLocaltion;
+
+ private String authorAffiliation;
+
+ private String titleURL;
+
+ private String directoryTitle;
+
+ private String authorPhoto;
+
+ private String authorAboutme;
+
+ private String authorLink;
+
+ private String authorQuote;
+
+ private String width;
+
+ private String height;
+
+
+ public GGWidgetMetaData()
+ {
+ }
+
+ public String getTitle()
+ {
+ return title;
+ }
+
+ public void setTitle(String title)
+ {
+ this.title = title;
+ }
+
+ public String getLink()
+ {
+ return link;
+ }
+
+ public void setLink(String link)
+ {
+ this.link = link;
+ }
+
+ public String getGuid()
+ {
+ return guid;
+ }
+
+ public void setGuid(String guid)
+ {
+ this.guid = guid;
+ }
+
+ public String getDescription()
+ {
+ return description;
+ }
+
+ public void setDescription(String description)
+ {
+ this.description = description;
+ }
+
+ public String getAuthor()
+ {
+ return author;
+ }
+
+ public void setAuthor(String author)
+ {
+ this.author = author;
+ }
+
+ public String getAuthorEmail()
+ {
+ return authorEmail;
+ }
+
+ public void setAuthorEmail(String authorEmail)
+ {
+ this.authorEmail = authorEmail;
+ }
+
+ public String getScreenshot()
+ {
+ return screenshot;
+ }
+
+ public void setScreenshot(String screenshot)
+ {
+ this.screenshot = screenshot;
+ }
+
+ public String getThumbnail()
+ {
+ return thumbnail;
+ }
+
+ public void setThumbnail(String thumbnail)
+ {
+ this.thumbnail = thumbnail;
+ }
+
+ public String getAuthorLocaltion()
+ {
+ return authorLocaltion;
+ }
+
+ public void setAuthorLocaltion(String authorLocaltion)
+ {
+ this.authorLocaltion = authorLocaltion;
+ }
+
+ public String getAuthorAffiliation()
+ {
+ return authorAffiliation;
+ }
+
+ public void setAuthorAffiliation(String authorAffiliation)
+ {
+ this.authorAffiliation = authorAffiliation;
+ }
+
+ public String getTitleURL()
+ {
+ return titleURL;
+ }
+
+ public void setTitleURL(String titleURL)
+ {
+ this.titleURL = titleURL;
+ }
+
+ public String getDirectoryTitle()
+ {
+ return directoryTitle;
+ }
+
+ public void setDirectoryTitle(String directoryTitle)
+ {
+ this.directoryTitle = directoryTitle;
+ }
+
+ public String getAuthorPhoto()
+ {
+ return authorPhoto;
+ }
+
+ public void setAuthorPhoto(String authorPhoto)
+ {
+ this.authorPhoto = authorPhoto;
+ }
+
+ public String getAuthorAboutme()
+ {
+ return authorAboutme;
+ }
+
+ public void setAuthorAboutme(String authorAboutme)
+ {
+ this.authorAboutme = authorAboutme;
+ }
+
+ public String getAuthorLink()
+ {
+ return authorLink;
+ }
+
+ public void setAuthorLink(String authorLink)
+ {
+ this.authorLink = authorLink;
+ }
+
+ public String getAuthorQuote()
+ {
+ return authorQuote;
+ }
+
+ public void setAuthorQuote(String authorQuote)
+ {
+ this.authorQuote = authorQuote;
+ }
+
+ public String getWidth()
+ {
+ return width;
+ }
+
+ public void setWidth(String width)
+ {
+ this.width = width;
+ }
+
+ public String getHeight()
+ {
+ return height;
+ }
+
+ public void setHeight(String height)
+ {
+ this.height = height;
+ }
+
+
+ public String toString()
+ {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append("Title: ").append(getTitle());
+ buffer.append("Link: ").append(getLink());
+
+ return buffer.toString();
+ }
+}
Modified: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/provider/GGProvider.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/provider/GGProvider.java 2007-07-31 14:16:32 UTC (rev 7849)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/provider/GGProvider.java 2007-07-31 19:05:35 UTC (rev 7850)
@@ -39,8 +39,8 @@
import java.util.ArrayList;
import org.jboss.portal.widget.google.GGWidget;
-import org.jboss.portal.widget.google.GGWidgetCategoryInfo;
-import org.jboss.portal.widget.google.GGWidgetInfo;
+import org.jboss.portal.widget.google.info.GGWidgetCategoryInfo;
+import org.jboss.portal.widget.google.info.GGWidgetInfo;
import org.jboss.portal.common.util.CollectionBuilder;
/**
@@ -51,7 +51,7 @@
{
/** . */
- public static final GGQuery INITIAL_QUERY = new GGQuery(0, null, null);
+ public static final GGQuery INITIAL_QUERY = new GGQuery(0, null, null, null);
/** The different descriptors. */
private final ConcurrentMap entries = new ConcurrentHashMap();
@@ -91,6 +91,8 @@
return CATEGORIES;
}
+
+
/**
* Returns a specified widget.
*/
Modified: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/provider/GGQuery.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/provider/GGQuery.java 2007-07-31 14:16:32 UTC (rev 7849)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/provider/GGQuery.java 2007-07-31 19:05:35 UTC (rev 7850)
@@ -24,6 +24,7 @@
import java.net.URL;
import java.net.MalformedURLException;
+import java.util.Locale;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -32,6 +33,8 @@
public final class GGQuery
{
+ private static final org.jboss.logging.Logger log = org.jboss.logging.Logger.getLogger(GGQuery.class);
+
/** . */
private int start;
@@ -47,7 +50,10 @@
/** . */
private int hashCode;
- public GGQuery(int start, String cat, String q)
+ /** . */
+ private Locale locale;
+
+ public GGQuery(int start, String cat, String q, Locale locale)
{
if (start < 0)
{
@@ -67,7 +73,8 @@
this.num = 10;
this.cat = cat;
this.q = q;
- this.hashCode = start + (cat == null ? 0 : 1 + cat.hashCode()) + (q == null ? 0 : 1 + q.hashCode());
+ this.locale = locale;
+ this.hashCode = start + (cat == null ? 0 : 1 + cat.hashCode()) + (q == null ? 0 : 1 + q.hashCode()) + (locale == null ? 0 : 1 + locale.hashCode());
}
@@ -132,6 +139,24 @@
{
buffer.append("&q=").append(q);
}
+ if (locale != null && locale.getLanguage().length() > 0)
+ {
+ buffer.append("&lang=").append(locale.getLanguage());
+ }
+ // if country info is not provided use the lang code
+ // its because Google assumes that country is US
+ if (locale != null && locale.getCountry().length() > 0)
+ {
+ buffer.append("&country=").append(locale.getCountry());
+ }
+ else if(locale != null && locale.getLanguage().length() > 0 )
+ {
+ buffer.append("&country=").append(locale.getLanguage());
+ }
+
+
+ log.debug("Google Gadgets Directory query URL: " + buffer.toString());
+
return new URL(buffer.toString());
}
}
Modified: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/provider/GGQueryResultBuilder.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/provider/GGQueryResultBuilder.java 2007-07-31 14:16:32 UTC (rev 7849)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/provider/GGQueryResultBuilder.java 2007-07-31 19:05:35 UTC (rev 7850)
@@ -25,16 +25,26 @@
import org.jboss.portal.common.net.URLTools;
import org.jboss.portal.common.xml.XMLTools;
import org.jboss.portal.common.io.IOTools;
+import org.jboss.portal.widget.google.directory.GGWidgetDirecotoryFactory;
+import org.jboss.portal.widget.google.metadata.GGWidgetMetaData;
+import org.jboss.xb.binding.Unmarshaller;
+import org.jboss.xb.binding.UnmarshallerFactory;
+import org.jboss.xb.binding.ObjectModelFactory;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
+import org.xml.sax.ErrorHandler;
+import org.xml.sax.SAXParseException;
+import org.xml.sax.SAXException;
import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.DocumentBuilder;
import java.net.URL;
import java.net.MalformedURLException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.Collections;
import java.util.List;
+import java.util.Map;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
@@ -47,6 +57,8 @@
public class GGQueryResultBuilder
{
+ private static final org.jboss.logging.Logger log = org.jboss.logging.Logger.getLogger(GGQueryResultBuilder.class);
+
/** . */
public static final String GHAPI_URI = "http://www.google.com/apis/homepage";
@@ -84,6 +96,7 @@
}
else
{
+
InputStream in = url.openStream();
try
{
@@ -101,45 +114,25 @@
throw new Exception("Cannot retrieve " + url);
}
- //
- DocumentBuilderFactory factory = XMLTools.getDocumentBuilderFactory();
- factory.setNamespaceAware(true);
+ List data = null;
- //
- Document doc = factory.newDocumentBuilder().parse(new ByteArrayInputStream(bytes));
+ Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
- //
- Element rssElt = doc.getDocumentElement();
- Element channelElt = XMLTools.getUniqueChild(rssElt, "channel", true);
+ // create an instance of ObjectModelFactory
+ ObjectModelFactory factory = new GGWidgetDirecotoryFactory();
- //
+ // let the object model factory to create an instance of List and populate it with data from XML
+ data = (List)unmarshaller.unmarshal(new ByteArrayInputStream(bytes), factory, null);
+
List entries = new ArrayList();
- for (Iterator i = XMLTools.getChildrenIterator(channelElt, "item");i.hasNext();)
+
+ for (Iterator iterator = data.iterator(); iterator.hasNext();)
{
- Element itemElt = (Element)i.next();
+ GGWidgetMetaData md = (GGWidgetMetaData)iterator.next();
- //
- Element titleElt = XMLTools.getUniqueChild(itemElt, "title", true);
- Element linkElt = XMLTools.getUniqueChild(itemElt, "link", true);
- Element descriptionElt = XMLTools.getUniqueChild(itemElt, "description", true);
- Element authorElt = XMLTools.getUniqueChild(itemElt, "author", false);
- Element screenshotElt = XMLTools.getUniqueChild(itemElt, GHAPI_URI, "screenshot", true);
- Element thumbnailElt = XMLTools.getUniqueChild(itemElt, GHAPI_URI, "thumbnail", true);
- Element widthElt = XMLTools.getUniqueChild(itemElt, GHAPI_URI, "width", true);
- Element heightElt = XMLTools.getUniqueChild(itemElt, GHAPI_URI, "height", true);
-
- //
- String title = XMLTools.asString(titleElt);
- URL link = new URL(XMLTools.asString(linkElt));
- String description = XMLTools.asString(descriptionElt);
- String screenshot = XMLTools.asString(screenshotElt);
- String thumbnail = XMLTools.asString(thumbnailElt);
- String author = authorElt != null ? XMLTools.asString(authorElt) : "";
- int width = Integer.parseInt(XMLTools.asString(widthElt));
- int height = Integer.parseInt(XMLTools.asString(heightElt));
-
- //
- GGQueryResultEntry entry = new GGQueryResultEntry(link, title, description, screenshot, thumbnail, author, width, height);
+ log.debug("Adding gadget: " + md);
+
+ GGQueryResultEntry entry = new GGQueryResultEntry(md);
entries.add(entry);
}
Modified: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/provider/GGQueryResultEntry.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/provider/GGQueryResultEntry.java 2007-07-31 14:16:32 UTC (rev 7849)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/provider/GGQueryResultEntry.java 2007-07-31 19:05:35 UTC (rev 7850)
@@ -22,6 +22,8 @@
******************************************************************************/
package org.jboss.portal.widget.google.provider;
+import org.jboss.portal.widget.google.metadata.GGWidgetMetaData;
+
import java.net.URL;
/**
@@ -77,6 +79,34 @@
this.height = height;
}
+ public GGQueryResultEntry(GGWidgetMetaData metadata) throws Exception
+ {
+ this.url = new URL(metadata.getLink());
+ this.title = metadata.getTitle();
+ this.description = metadata.getDescription();
+ this.screenshot = metadata.getScreenshot();
+ this.thumbnail = metadata.getThumbnail();
+ this.author = metadata.getAuthor();
+ if (metadata.getWidth() != null)
+ {
+ this.width = Integer.parseInt(metadata.getWidth());
+ }
+ else
+ {
+ this.width = 0;
+ }
+ if (metadata.getHeight() != null)
+ {
+ this.height = Integer.parseInt(metadata.getHeight());
+ }
+ else
+ {
+ this.height = 0;
+ }
+
+
+ }
+
public URL getURL()
{
return url;
Modified: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/provider/GGWidgetInfoBuilder.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/provider/GGWidgetInfoBuilder.java 2007-07-31 14:16:32 UTC (rev 7849)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/provider/GGWidgetInfoBuilder.java 2007-07-31 19:05:35 UTC (rev 7850)
@@ -32,9 +32,9 @@
import org.jboss.portal.widget.google.type.BoolType;
import org.jboss.portal.widget.google.type.ListType;
import org.jboss.portal.widget.google.type.EnumType;
-import org.jboss.portal.widget.google.GGPreferenceInfo;
-import org.jboss.portal.widget.google.GGPreferencesInfo;
-import org.jboss.portal.widget.google.GGWidgetInfo;
+import org.jboss.portal.widget.google.info.GGPreferenceInfo;
+import org.jboss.portal.widget.google.info.GGPreferencesInfo;
+import org.jboss.portal.widget.google.info.GGWidgetInfo;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
Modified: branches/JBoss_Portal_Branch_2_6/widget/src/resources/widget-war/WEB-INF/jsp/edit.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/resources/widget-war/WEB-INF/jsp/edit.jsp 2007-07-31 14:16:32 UTC (rev 7849)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/resources/widget-war/WEB-INF/jsp/edit.jsp 2007-07-31 19:05:35 UTC (rev 7850)
@@ -2,9 +2,9 @@
<%@ page import="org.jboss.portal.widget.google.provider.GGProvider" %>
<%@ page import="java.util.Iterator" %>
<%@ page import="org.jboss.portal.widget.google.GGWidget" %>
-<%@ page import="org.jboss.portal.widget.google.GGPreferenceInfo" %>
+<%@ page import="org.jboss.portal.widget.google.info.GGPreferenceInfo" %>
<%@ page import="org.jboss.portal.widget.google.type.DataType" %>
-<%@ page import="org.jboss.portal.widget.google.GGWidgetCategoryInfo" %>
+<%@ page import="org.jboss.portal.widget.google.info.GGWidgetCategoryInfo" %>
<%@ page import="org.jboss.portal.widget.google.provider.GGQuery" %>
<%@ page import="org.jboss.portal.widget.google.type.EnumType" %>
<%@ page import="javax.portlet.PortletURL" %>
@@ -44,7 +44,7 @@
}
// Compute query
- GGQuery query = new GGQuery(0, catTerm, queryTerm);
+ GGQuery query = new GGQuery(0, catTerm, queryTerm, request.getLocale());
Collection widgets = provider.search(query);
String ggPickMethod = request.getParameter("gg_pick_method");
16 years, 9 months
JBoss Portal SVN: r7849 - docs/trunk/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2007-07-31 10:16:32 -0400 (Tue, 31 Jul 2007)
New Revision: 7849
Modified:
docs/trunk/referenceGuide/en/modules/tutorials.xml
docs/trunk/referenceGuide/en/modules/wsrp.xml
Log:
- Started fixing tutorials problems.
- Improved content.
Modified: docs/trunk/referenceGuide/en/modules/tutorials.xml
===================================================================
--- docs/trunk/referenceGuide/en/modules/tutorials.xml 2007-07-31 14:07:17 UTC (rev 7848)
+++ docs/trunk/referenceGuide/en/modules/tutorials.xml 2007-07-31 14:16:32 UTC (rev 7849)
@@ -139,23 +139,32 @@
<listitem>
<para>
<programlisting>public class HelloWorldPortlet extends GenericPortlet</programlisting>
- All Portlets MUST implement the javax.portlet.GenericPortlet Interface.
+ All Portlets MUST implement the <literal>javax.portlet.Portlet</literal> interface. The Portlet
+ API also provides a convenience implementation of this interface in the form of the
+ <literal>javax.portlet.GenericPortlet</literal> class which, among other things, implements
+ the <literal>Portlet render</literal> method to dispatch to abstract mode-specific methods to
+ make it easier to support the standard portlet modes. It also provides
+ a default implementation for <literal>processAction</literal>, <literal>init</literal> and
+ <literal>destory</literal> methods. It is recommended to extend <literal>GenericPortlet</literal>
+ for most cases.
</para>
</listitem>
<listitem>
<para>
<programlisting>protected void doView(RenderRequest rRequest, RenderResponse rResponse) throws
PortletException, IOException, UnavailableException</programlisting>
- In this case, our
- <emphasis>doView</emphasis>
- will be called when the portlet is asked to render output in VIEW Mode.
+ As we extend from <literal>GenericPortlet</literal> and we are only interested in supported the
+ <emphasis>VIEW</emphasis> mode, we only need to implement the <literal>doView</literal> method,
+ and <literal>GenericPortlet</literal>'s <literal>render</literal> implementation will call our
+ implementation when the <emphasis>VIEW</emphasis> mode is requested.
</para>
</listitem>
<listitem>
<para>
<programlisting>rResponse.setContentType("text/html");</programlisting>
Just like in the servlet-world, you must declare what content-type the portlet will be
- responding in.
+ responding in. You need to do this before starting to write content or the portlet will throw
+ an exception.
</para>
</listitem>
<listitem>
@@ -169,7 +178,8 @@
in our portlet window.
<note>
Portlets are responsible for generating markup fragments, as they are included on a page and
- surrounded by other portlets.
+ surrounded by other portlets. In particular, this means that a portlet outputting HTML MUST
+ not output any markup that cannot be found in a <literal>body</literal> element.
</note>
</para>
</listitem>
@@ -230,15 +240,17 @@
<mime-type>text/html</mime-type>
<portlet-mode>VIEW</portlet-mode>
</supports>]]></programlisting>
- The supports attributes allow you to declare extra vital information about the portlet.
- In this case, we are letting the portal know that it will be outputting text/html and
+ The <literal>supports</literal> element allows you to declare all the markup types your
+ portlet supports in the <literal>render</literal> method. This is accomplish via the
+ <literal>mime-type</literal> element, which is <emphasis>required</emphasis> for every
+ portlet. Of course, the declared MIME types must match the capability of the portlet.
+
+ It also allows you to pair
+ which modes and window states are supported for each markup type. In out case, as all
+ portlets must support the VIEW portlet mode, we didn't have to declare it. We did need
+ to declare that our portlet supports the <literal>text/html</literal> markup type.
+ Hence, we are letting the portal know that it will be outputting text/html and
only support a VIEW mode.
- <note>
- A content-type must be declared here for every portlet, and it must match with how
- the portlet is programmatically responding. Likewise, a portlet mode must be
- declared here and have a corresponding method in its class. In our case, the VIEW
- mode will map to the doView() in our class.
- </note>
</para>
</listitem>
<listitem>
@@ -269,18 +281,10 @@
</deployment>
</deployments>]]></programlisting>
This is a JBoss Portal specific descriptor that allows you create an instance of a portlet. The
- <emphasis>portlet-ref</emphasis>
- value must match the
- <emphasis>portlet-name</emphasis>
- value given in the packaged
- <emphasis>portlet.xml</emphasis>
- . The
- <emphasis>instance-id</emphasis>
- value can be named anything, but it must match the
- <emphasis>instance-ref</emphasis>
- value given in the
- <emphasis>*-object.xml</emphasis>
- file we will explore below.
+ <literal>portlet-ref</literal> value must match the <literal>portlet-name</literal> value
+ given in the packaged <literal>portlet.xml</literal>. The <literal>instance-id</literal>
+ value can be named anything, but it must match the <literal>instance-ref</literal> value given
+ in the <literal>*-object.xml</literal> file we will explore below.
</para>
</listitem>
<listitem>
@@ -302,27 +306,12 @@
</deployment>
</deployments>]]></programlisting>
- The *-object.xml is responsible for creating/configuring windows, pages, and even portal
- objects. In our example, we are creating a portlet window, assigning it to a page, and
- specifying where it should appear on that page. This is a specific descriptor to JBoss Portal.
- Since 2.6 we can replace also the window section by the following which will do exactly the same.
-
- <programlisting><![CDATA[<window>
- <window-name>HelloWorldPortletWindow</window-name>
- <content>
- <content-type>portlet</content-type>
- <content-uri>HelloWorldPortletInstance</content-uri>
- </content>
- <region>center</region>
- <height>1</height>
-</window>
-]]></programlisting>
- The kind of declaration allows to declare for a window different kind of content types. You can see
- that as a generic way to declare content for a window. In our case the type of content is portlet
- and the content uri declares the HelloWorldPortletInstance. The content uri value is the identifier of
- the content. It is possible to declare windows with content type cms and use directly the path
- to the file in the CMS to make the window show cms content. That behavior is pluggable and it
- is virtually possible to plug in any kind of content.
+ <literal>*-object.xml</literal> files are JBoss Portal specific descriptors and allow users to
+ define the structure of their portal instances as well as create/configure thier windows and
+ pages. In our example, we create a portlet window, specify that it will display the markup
+ generated by the <literal>HelloWorldPortletInstance</literal> portlet instance, assign it to the
+ <literal>default.default</literal> page, and specify where it should appear on that page.
+
<itemizedlist>
<listitem>
<para>
@@ -394,6 +383,38 @@
</imageobject>
</mediaobject>
</para>
+
+ <para>
+ Portal 2.6 introduces the notion of <emphasis>content type</emphasis>, which is a generic mechanism to
+ specify which content will be displayed by a given portlet window. The <literal>window</literal> section
+ of the previous example can be re-written as follows to take advantage of the new content framework:
+ <programlisting><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE deployments PUBLIC
+ "-//JBoss Portal//DTD Portal Object 2.6//EN"
+ "http://www.jboss.org/portal/dtd/portal-object_2_6.dtd">
+<deployments>
+ <deployment>
+ <parent-ref>default.default</parent-ref>
+ <if-exists>overwrite</if-exists>
+ <window>
+ <window-name>HelloWorldPortletWindow</window-name>
+ <content>
+ <content-type>portlet</content-type>
+ <content-uri>HelloWorldPortletInstance</content-uri>
+ </content>
+ <region>center</region>
+ <height>1</height>
+ </window>
+ </deployment>
+</deployments>]]></programlisting>
+
+ This declaration is equivalent to the previous example. We specify that the content being displayed by
+ the <literal>HelloWorldPortletWindow</literal> is a <literal>portlet</literal> content. The content URI
+ identifies which content to be displayed, in this case, the <literal>HelloWorldPortletInstance</literal>.
+ It is possible to declare windows with a <literal>cms</literal> content type and use directly the path to
+ the file in the CMS to make the window show the content of the associated file. That behavior is
+ pluggable and it is possible to plug virtually any kind of content.
+ </para>
</sect3>
<sect3>
<title>Building your portlet</title>
Modified: docs/trunk/referenceGuide/en/modules/wsrp.xml
===================================================================
--- docs/trunk/referenceGuide/en/modules/wsrp.xml 2007-07-31 14:07:17 UTC (rev 7848)
+++ docs/trunk/referenceGuide/en/modules/wsrp.xml 2007-07-31 14:16:32 UTC (rev 7849)
@@ -53,26 +53,27 @@
HTML markup (as Portal itself doesn't handle other markup types). We do support explicit portlet cloning and
we fully support the PortletManagement interface.</para>
- <para>As far as caching goes, we have Level 1 Producer and Consumer. We support Cookie handling properly on the
- Consumer and our Producer requires initialization of cookies (as we have found that it improved
- interoperabilty with some consumers). We don't support custom window states or modes, as Portal doesn't either.
- We do, however, support CSS on both the Producer (though it's more a function of the portlets than
- inherent Producer capability) and Consumer.</para>
+ <para>As far as caching goes, we have Level 1 Producer and Consumer. We support Cookie handling properly on the
+ Consumer and our Producer requires initialization of cookies (as we have found that it improved interoperabilty
+ with some consumers). We don't support custom window states or modes, as Portal doesn't either. We do, however,
+ support CSS on both the Producer (though it's more a function of the portlets than inherent Producer
+ capability) and Consumer.</para>
- <para>While we provide a complete implementation of WSRP 1.0, we do need to go through the
- <ulink url="http://www.oasis-open.org/committees/download.php/6018">Conformance statements</ulink> and
- perform more interoperability testing (an area that needs to be better supported by the WSRP Technical
- Committee and Community at large).</para>
+ <para>While we provide a complete implementation of WSRP 1.0, we do need to go through the
+ <ulink url="http://www.oasis-open.org/committees/download.php/6018">Conformance statements</ulink> and
+ perform more interoperability testing (an area that needs to be better supported by the WSRP Technical
+ Committee and Community at large).</para>
</sect1>
<sect1>
<title>Deploying JBoss Portal's WSRP services</title>
- <para>JBoss Portal provides a complete support of WSRP 1.0 standard interfaces and offers
- both consumer and producer services. WSRP support is provided by the <emphasis>portal-wsrp.sar</emphasis>
- service archive, included in the main <emphasis>jboss-portal.sar</emphasis> service archive, if
- you've obtained JBoss Portal from a binary distribution. If you don't intend on using WSRP, we
- recommend that you remove the <emphasis>portal-wspr.sar</emphasis> from the main
- <emphasis>jboss-portal.sar</emphasis> service archive.</para>
+ <para>
+ JBoss Portal provides a complete support of WSRP 1.0 standard interfaces and offers
+ both consumer and producer services. WSRP support is provided by the <emphasis>portal-wsrp.sar</emphasis>
+ service archive, included in the main <emphasis>jboss-portal.sar</emphasis> service archive, if you've
+ obtained JBoss Portal from a binary distribution. If you don't intend on using WSRP, we recommend that you
+ remove the <emphasis>portal-wspr.sar</emphasis> from the main <emphasis>jboss-portal.sar</emphasis> service
+ archive.</para>
<para>If you've obtained the source distribution of JBoss Portal, you need to build and deploy the WSRP service
separately. Please follow the instructions on how to install
<ulink url="http://docs.jboss.com/jbportal/v2.6/reference-guide/en/html/installation....">JBoss Portal
@@ -186,7 +187,7 @@
refer to <xref linkend="consumer_configuration"/>.
</para>
<para>
- JBoss Portal's Producer is automatically set up when you deploy a portal instance with the WSRP service.
+ JBoss Portal's Producer is automatically set up when you deploy a portal instance with the WSRP service.
You can access the WSDL file at
<literal>http://{hostname}:{port}/portal-wsrp/MarkupService?wsdl</literal>. You can access the endpoint URLs at:
<itemizedlist>
@@ -491,7 +492,7 @@
<deployment>
<wsrp-producer id="self" expiration-cache="300">
<!--
- we need to use the individual endpoint configuration because the configuration via
+ we need to use the individual endpoint configuration because the configuration via
wsdl forces an immediate attempt to access the web service description which is not
available yet at this point of deployment
-->
@@ -582,7 +583,7 @@
<title>Default configuration</title>
<para>
Let's look at the default configuration:
- <programlisting><![CDATA[<!DOCTYPE producer-configuration PUBLIC
+ <programlisting><![CDATA[<!DOCTYPE producer-configuration PUBLIC
"-//JBoss Portal//DTD WSRP Local Producer Configuration 2.6//EN"
"http://www.jboss.org/portal/dtd/jboss-wsrp-producer_2_6.dtd">
<?xml version="1.0" encoding="UTF-8"?>
@@ -648,7 +649,7 @@
</para>
<para>Please refer to the Javadoc for <literal>org.jboss.portal.registration.RegistrationPolicy</literal>
and <literal>org.jboss.portal.Registration.policies.RegistrationPropertyValidator</literal> for more details
- on what is expected of each method.
+ on what is expected of each method.
</para>
<para>Defining a registration policy is required for the producer to be correctly configured. This is accomplished
by specifying the qualified class name of the registration policy via the
@@ -688,11 +689,11 @@
complete service description until they are correctly registered and requires consumers to provide acceptable
values for two String registration properties named "name1" and "name2" respectively. The registration
service will use the <literal>com.example.portal.SomeCustomRegistrationPolicy</literal> class for its
- registration policy.
+ registration policy.
<programlisting><![CDATA[<!DOCTYPE producer-configuration PUBLIC
"-//JBoss Portal//DTD WSRP Local Producer Configuration 2.6//EN"
"http://www.jboss.org/portal/dtd/jboss-wsrp-producer_2_6.dtd">
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="UTF-8"?>
<producer-configuration>
<registration-configuration fullServiceDescriptionRequiresRegistration="true">
<registration-policy>com.example.portal.SomeCustomRegistrationPolicy</registration-policy>
16 years, 9 months
JBoss Portal SVN: r7848 - in branches/JBoss_Portal_2_4_1_SP1_CMSPatch: core/src/main/org/jboss/portal/core/portlet/cms/admin and 1 other directory.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2007-07-31 10:07:17 -0400 (Tue, 31 Jul 2007)
New Revision: 7848
Modified:
branches/JBoss_Portal_2_4_1_SP1_CMSPatch/
branches/JBoss_Portal_2_4_1_SP1_CMSPatch/core/src/main/org/jboss/portal/core/portlet/cms/admin/CMSAdminPortlet.java
Log:
Patch to fix issue with accented characters in CMS Tool - JBPORTAL-1550
Property changes on: branches/JBoss_Portal_2_4_1_SP1_CMSPatch
___________________________________________________________________
Name: svn:ignore
- *.classpath
*.project
eclipseBin
thirdparty
+ *.classpath
*.project
eclipseBin
thirdparty
bin
Modified: branches/JBoss_Portal_2_4_1_SP1_CMSPatch/core/src/main/org/jboss/portal/core/portlet/cms/admin/CMSAdminPortlet.java
===================================================================
--- branches/JBoss_Portal_2_4_1_SP1_CMSPatch/core/src/main/org/jboss/portal/core/portlet/cms/admin/CMSAdminPortlet.java 2007-07-31 13:22:43 UTC (rev 7847)
+++ branches/JBoss_Portal_2_4_1_SP1_CMSPatch/core/src/main/org/jboss/portal/core/portlet/cms/admin/CMSAdminPortlet.java 2007-07-31 14:07:17 UTC (rev 7848)
@@ -461,19 +461,19 @@
String fieldName = item.getFieldName();
if ("destination".equals(fieldName))
{
- sPath = item.getString();
+ sPath = item.getString(aReq.getCharacterEncoding());
}
else if ("description".equals(fieldName))
{
- sDescription = item.getString();
+ sDescription = item.getString(aReq.getCharacterEncoding());
}
else if ("title".equals(fieldName))
{
- sTitle = item.getString();
+ sTitle = item.getString(aReq.getCharacterEncoding());
}
else if ("language".equals(fieldName))
{
- sLanguage = item.getString();
+ sLanguage = item.getString(aReq.getCharacterEncoding());
}
}
}
@@ -515,11 +515,11 @@
String fieldName = item.getFieldName();
if ("destination".equals(fieldName))
{
- sPath = item.getString();
+ sPath = item.getString(aReq.getCharacterEncoding());
}
else if ("language".equals(fieldName))
{
- sLanguage = item.getString();
+ sLanguage = item.getString(aReq.getCharacterEncoding());
}
}
}
@@ -665,23 +665,23 @@
String fieldName = item.getFieldName();
if ("destination".equals(fieldName))
{
- sPath = item.getString();
+ sPath = item.getString(aReq.getCharacterEncoding());
}
else if ("description".equals(fieldName))
{
- sDescription = item.getString();
+ sDescription = item.getString(aReq.getCharacterEncoding());
}
else if ("makelive".equals(fieldName))
{
- sMakeLive = item.getString();
+ sMakeLive = item.getString(aReq.getCharacterEncoding());
}
else if ("title".equals(fieldName))
{
- sTitle = item.getString();
+ sTitle = item.getString(aReq.getCharacterEncoding());
}
else if ("language".equals(fieldName))
{
- sLanguage = item.getString();
+ sLanguage = item.getString(aReq.getCharacterEncoding());
}
}
}
16 years, 9 months
JBoss Portal SVN: r7847 - branches.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2007-07-31 09:22:43 -0400 (Tue, 31 Jul 2007)
New Revision: 7847
Added:
branches/JBoss_Portal_2_4_1_SP1_CMSPatch/
Log:
includes the fix for accented characters
Copied: branches/JBoss_Portal_2_4_1_SP1_CMSPatch (from rev 7846, tags/JBoss_Portal_2_4_1_SP1)
16 years, 9 months
JBoss Portal SVN: r7846 - in demo/trunk: conf and 1 other directory.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-07-31 04:21:55 -0400 (Tue, 31 Jul 2007)
New Revision: 7846
Added:
demo/trunk/conf/jboss-service.xml.diff
demo/trunk/conf/jboss-web.xml.diff
demo/trunk/conf/log4j.xml
demo/trunk/conf/server.xml.diff
Removed:
demo/trunk/conf/jboss-web.xml
Modified:
demo/trunk/build.properties
demo/trunk/build.xml
demo/trunk/conf/default-object.xml
Log:
Move to JBoss AS 4.2.1
Missing Forums, removed flickr
Modified: demo/trunk/build.properties
===================================================================
--- demo/trunk/build.properties 2007-07-30 16:17:26 UTC (rev 7845)
+++ demo/trunk/build.properties 2007-07-31 08:21:55 UTC (rev 7846)
@@ -1,7 +1,7 @@
# Location of the JBoss Portal + 4.0.5 AS bundle
-portal.bundle.url=/home/theute/Portal/Demo/jboss-portal-2.6/build/output/jboss-portal-2.6-bundled.zip
+portal.bundle.url=/home/theute/Downloads/jboss-portal-2.6.1.GA-bundled.zip
# Name used as top directory in the bundle
-portal.name.dir=jboss-portal-2.6
+portal.name.dir=jboss-portal-2.6.1.GA
# Where to create the demo website and associated tgz file
destination.dir=/home/theute/Portal/demoWebsite
# Which WS to use. (keep this to use the one embedded here)
Modified: demo/trunk/build.xml
===================================================================
--- demo/trunk/build.xml 2007-07-30 16:17:26 UTC (rev 7845)
+++ demo/trunk/build.xml 2007-07-31 08:21:55 UTC (rev 7846)
@@ -1,103 +1,110 @@
<?xml version="1.0" encoding="UTF-8"?>
<project default="main" name="JBoss Portal">
- <property file="build.properties"/>
-
- <target name="init">
- <mkdir dir="${destination.dir}"/>
- </target>
-
- <target name="unzip-bundle" depends="init">
- <unzip src="${portal.bundle.url}" dest="${destination.dir}"/>
- </target>
-
- <target name="delete-jmxconsole">
- <delete dir="${destination.dir}/${portal.name.dir}/server/default/deploy/jmx-console.war"/>
- </target>
+ <property file="build.properties"/>
- <target name="delete-docs">
- <delete dir="${destination.dir}/${portal.name.dir}/docs"/>
- </target>
+ <target name="init">
+ <mkdir dir="${destination.dir}"/>
+ </target>
- <target name="delete-objectsdescriptors">
- <delete>
- <fileset dir="${destination.dir}/${portal.name.dir}/server/default/deploy/jboss-portal.sar"
+ <target name="unzip-bundle" depends="init">
+ <unzip src="${portal.bundle.url}" dest="${destination.dir}"/>
+ </target>
+
+ <target name="configure-jboss" depends="delete-jmxconsole">
+ <!-- Modify logging -->
+ <copy overwrite="true" file="conf/log4j.xml" todir="${destination.dir}/${portal.name.dir}/server/default/conf"/>
+ <!-- Modify access-log for portal.demo.jboss.com -->
+ <patch patchfile="conf/server.xml.diff" originalfile="${destination.dir}/${portal.name.dir}/server/default/deploy/jboss-web.deployer/server.xml"/>
+ <!-- Add deploy directory -->
+ <patch patchfile="conf/jboss-service.xml.diff" originalfile="${destination.dir}/${portal.name.dir}/server/default/conf/jboss-service.xml"/>
+ </target>
+
+ <target name="delete-jmxconsole">
+ <delete dir="${destination.dir}/${portal.name.dir}/server/default/deploy/jmx-console.war"/>
+ </target>
+
+ <target name="delete-docs">
+ <delete dir="${destination.dir}/${portal.name.dir}/docs"/>
+ </target>
+
+ <target name="delete-objectsdescriptors">
+ <delete>
+ <fileset dir="${destination.dir}/${portal.name.dir}/server/default/deploy/jboss-portal.sar"
includes="**/*-object.xml"/>
- </delete>
- </target>
+ </delete>
+ </target>
- <target name="install-objectsdescriptor">
- <copy file="conf/default-object.xml"
+ <target name="install-objectsdescriptor">
+ <copy file="conf/default-object.xml"
todir="${destination.dir}/${portal.name.dir}/server/default/deploy/jboss-portal.sar/conf/data"/>
- </target>
+ </target>
- <target name="install-wsrpdescriptor">
- <copy file="conf/demo-wsrp.xml" todir="${destination.dir}/${portal.name.dir}/server/default/deploy"/>
- </target>
+ <target name="install-wsrpdescriptor">
+ <copy file="conf/demo-wsrp.xml" todir="${destination.dir}/${portal.name.dir}/server/default/deploy"/>
+ </target>
- <target name="delete-wsrpdescriptors">
- <!--
+ <target name="delete-wsrpdescriptors">
+ <!--
Would that delete default-wsrp.xml in jboss-portal.sar/portal-wspr.sar/? This would be nice so that we can
override the self definition with the one that's in demo-wsrp.xml.
-->
- <delete dir="${destination.dir}/${portal.name.dir}/server/default/deploy" includes="**/*-wsrp.xml"/>
- </target>
+ <delete dir="${destination.dir}/${portal.name.dir}/server/default/deploy" includes="**/*-wsrp.xml"/>
+ </target>
-
- <target name="clean">
- <delete dir="${destination.dir}/${portal.name.dir}"/>
- <delete dir="${tmp.dir}/flickrportlet"/>
- <delete dir="${tmp.dir}/jbossws"/>
- <delete file="${destination.dir}/${portal.name.dir}.tgz"/>
- </target>
-
- <target name="update-context">
- <delete dir="${destination.dir}/${portal.name.dir}/server/default/deploy/jbossweb-tomcat55.sar/ROOT.war"/>
- <copy overwrite="true" file="conf/jboss-web.xml"
- todir="${destination.dir}/${portal.name.dir}/server/default/deploy/jboss-portal.sar/portal-server.war/WEB-INF"/>
- </target>
-
- <target name="install-flickrportlet">
- <unwar src="portlets/flickrportlet/flickrportlet.war" dest="${tmp.dir}/flickrportlet"/>
- <delete file="${tmp.dir}/flickrportlet/WEB-INF/sun-web.xml"/>
- <delete file="${tmp.dir}/flickrportlet/WEB-INF/lib/log4j-1.2.13.jar"/>
- <copy todir="${tmp.dir}/flickrportlet">
- <fileset dir="portlets/flickrportlet/resources"/>
- </copy>
- <copy todir="${destination.dir}/jboss-portal-2.6/server/default/deploy/jboss-portal.sar/flickrportlet.war">
- <fileset dir="${tmp.dir}/flickrportlet"/>
- </copy>
- </target>
- <target name="install-jbossforums">
- <copy todir="${destination.dir}/jboss-portal-2.6/server/default/deploy">
- <fileset dir="portlets/jbossforums"/>
- </copy>
- </target>
+ <target name="clean">
+ <delete dir="${destination.dir}/${portal.name.dir}"/>
+ <delete dir="${tmp.dir}/flickrportlet"/>
+ <delete dir="${tmp.dir}/jbossws"/>
+ <delete file="${destination.dir}/${portal.name.dir}.tgz"/>
+ </target>
- <!-- Fix WS issues on JBoss 4.0.x -->
- <target name="update-ws">
- <unzip src="${jbossws.location}" dest="${tmp.dir}/jbossws"/>
- <ant inheritAll="false" dir="${tmp.dir}/jbossws" antfile="build.xml" target="deploy-jboss40-jdk14">
- <property name="jboss40.home" value="${destination.dir}/${portal.name.dir}"/>
- <property name="jboss.server.instance" value="default"/>
- </ant>
- </target>
+ <target name="update-context">
+ <delete dir="${destination.dir}/${portal.name.dir}/server/default/deploy/jbossweb-tomcat55.sar/ROOT.war"/>
+ <patch patchfile="conf/jboss-web.xml.diff" originalfile="${destination.dir}/${portal.name.dir}/server/default/deploy/jboss-portal.sar/portal-server.war/WEB-INF/jboss-web.xml"/>
+ </target>
- <target name="activate-workflow">
- <copy todir="${destination.dir}/jboss-portal-2.6/server/default/deploy/jboss-portal.sar/portal-cms.sar/META-INF">
- <fileset file="conf/core-cms/jboss-service.xml"/>
- </copy>
- </target>
-
- <target name="main"
- depends="unzip-bundle, delete-docs, delete-jmxconsole, delete-objectsdescriptors, delete-wsrpdescriptors,
- update-context, update-ws, install-objectsdescriptor, install-wsrpdescriptor, install-jbossforums, activate-workflow,
- install-flickrportlet">
- <tar destfile="${destination.dir}/${portal.name.dir}.tar" basedir="${destination.dir}/${portal.name.dir}"
+ <target name="install-flickrportlet">
+ <unwar src="portlets/flickrportlet/flickrportlet.war" dest="${tmp.dir}/flickrportlet"/>
+ <delete file="${tmp.dir}/flickrportlet/WEB-INF/sun-web.xml"/>
+ <delete file="${tmp.dir}/flickrportlet/WEB-INF/lib/log4j-1.2.13.jar"/>
+ <copy todir="${tmp.dir}/flickrportlet">
+ <fileset dir="portlets/flickrportlet/resources"/>
+ </copy>
+ <copy todir="${destination.dir}/jboss-portal-2.6/server/default/deploy/jboss-portal.sar/flickrportlet.war">
+ <fileset dir="${tmp.dir}/flickrportlet"/>
+ </copy>
+ </target>
+
+ <target name="install-jbossforums">
+ <copy todir="${destination.dir}/jboss-portal-2.6/server/default/deploy">
+ <fileset dir="portlets/jbossforums"/>
+ </copy>
+ </target>
+
+ <!-- Fix WS issues on JBoss 4.0.x -->
+ <!--target name="update-ws">
+ <unzip src="${jbossws.location}" dest="${tmp.dir}/jbossws"/>
+ <ant inheritAll="false" dir="${tmp.dir}/jbossws" antfile="build.xml" target="deploy-jboss40-jdk14">
+ <property name="jboss40.home" value="${destination.dir}/${portal.name.dir}"/>
+ <property name="jboss.server.instance" value="default"/>
+ </ant>
+ </target-->
+
+ <target name="activate-workflow">
+ <copy todir="${destination.dir}/jboss-portal-2.6/server/default/deploy/jboss-portal.sar/portal-cms.sar/META-INF">
+ <fileset file="conf/core-cms/jboss-service.xml"/>
+ </copy>
+ </target>
+
+ <target name="main"
+ depends="unzip-bundle, delete-docs, configure-jboss, delete-objectsdescriptors, delete-wsrpdescriptors,
+ update-context,install-objectsdescriptor, install-wsrpdescriptor, install-jbossforums, activate-workflow">
+ <tar destfile="${destination.dir}/${portal.name.dir}.tar" basedir="${destination.dir}/${portal.name.dir}"
longfile="gnu"/>
- <gzip zipfile="${destination.dir}/${portal.name.dir}.tgz" src="${destination.dir}/${portal.name.dir}.tar"/>
- <delete file="${destination.dir}/${portal.name.dir}.tar"/>
- </target>
-
+ <gzip zipfile="${destination.dir}/${portal.name.dir}.tgz" src="${destination.dir}/${portal.name.dir}.tar"/>
+ <delete file="${destination.dir}/${portal.name.dir}.tar"/>
+ </target>
+
</project>
\ No newline at end of file
Modified: demo/trunk/conf/default-object.xml
===================================================================
--- demo/trunk/conf/default-object.xml 2007-07-30 16:17:26 UTC (rev 7845)
+++ demo/trunk/conf/default-object.xml 2007-07-31 08:21:55 UTC (rev 7846)
@@ -392,6 +392,15 @@
<height>0</height>
</window>
</page>
+ <page>
+ <page-name>WSRP</page-name>
+ <window>
+ <window-name>WSRPConsumersConfigurationPortletWindow</window-name>
+ <instance-ref>WSRPConsumersConfigurationPortletInstance</instance-ref>
+ <region>center</region>
+ <height>0</height>
+ </window>
+ </page>
</portal>
</deployment>
</deployments>
Added: demo/trunk/conf/jboss-service.xml.diff
===================================================================
--- demo/trunk/conf/jboss-service.xml.diff (rev 0)
+++ demo/trunk/conf/jboss-service.xml.diff 2007-07-31 08:21:55 UTC (rev 7846)
@@ -0,0 +1,11 @@
+--- jboss-service.xml 2007-07-09 09:54:01.000000000 +0200
++++ jboss-service.xml 2007-07-13 16:08:12.000000000 +0200
+@@ -511,7 +678,7 @@
+ scans the specified WebDAV location
+ -->
+ <attribute name="URLs">
++ deploy/, ../../../deploy
+- deploy/
+ </attribute>
+
+ <!-- Indicates if the scanner should recursively scan directories that
Deleted: demo/trunk/conf/jboss-web.xml
===================================================================
--- demo/trunk/conf/jboss-web.xml 2007-07-30 16:17:26 UTC (rev 7845)
+++ demo/trunk/conf/jboss-web.xml 2007-07-31 08:21:55 UTC (rev 7846)
@@ -1,35 +0,0 @@
-<?xml version="1.0"?>
-<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- ~ JBoss, a division of Red Hat ~
- ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
- ~ contributors as indicated by the @authors tag. See the ~
- ~ copyright.txt in the distribution for a full listing of ~
- ~ individual contributors. ~
- ~ ~
- ~ This is free software; you can redistribute it and/or modify it ~
- ~ under the terms of the GNU Lesser General Public License as ~
- ~ published by the Free Software Foundation; either version 2.1 of ~
- ~ the License, or (at your option) any later version. ~
- ~ ~
- ~ This software is distributed in the hope that it will be useful, ~
- ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
- ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
- ~ Lesser General Public License for more details. ~
- ~ ~
- ~ You should have received a copy of the GNU Lesser General Public ~
- ~ License along with this software; if not, write to the Free ~
- ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
- ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
-
-<jboss-web>
- <security-domain>java:jaas/portal</security-domain>
- <context-root>/</context-root>
- <replication-config>
- <replication-trigger>SET</replication-trigger>
- </replication-config>
- <resource-ref>
- <res-ref-name>jdbc/PortalDS</res-ref-name>
- <jndi-name>java:PortalDS</jndi-name>
- </resource-ref>
-</jboss-web>
Added: demo/trunk/conf/jboss-web.xml.diff
===================================================================
--- demo/trunk/conf/jboss-web.xml.diff (rev 0)
+++ demo/trunk/conf/jboss-web.xml.diff 2007-07-31 08:21:55 UTC (rev 7846)
@@ -0,0 +1,11 @@
+--- jboss-web.xml 2007-07-08 16:57:03.000000000 +0200
++++ jboss-web.xml 2007-07-06 13:39:20.000000000 +0200
+@@ -24,7 +24,7 @@
+
+ <jboss-web>
+ <security-domain>java:jaas/portal</security-domain>
++ <context-root>/</context-root>
+- <context-root>/portal</context-root>
+ <replication-config>
+ <replication-trigger>SET</replication-trigger>
+ </replication-config>
Added: demo/trunk/conf/log4j.xml
===================================================================
--- demo/trunk/conf/log4j.xml (rev 0)
+++ demo/trunk/conf/log4j.xml 2007-07-31 08:21:55 UTC (rev 7846)
@@ -0,0 +1,314 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<!-- ===================================================================== -->
+<!-- -->
+<!-- Log4j Configuration -->
+<!-- -->
+<!-- ===================================================================== -->
+
+<!-- $Id: log4j.xml 56612 2006-09-07 15:12:39Z thomas.diesler(a)jboss.com $ -->
+
+<!--
+ | For more configuration infromation and examples see the Jakarta Log4j
+ | owebsite: http://jakarta.apache.org/log4j
+ -->
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+
+ <!-- ================================= -->
+ <!-- Preserve messages in a local file -->
+ <!-- ================================= -->
+
+ <!-- A time/date based rolling appender -->
+ <appender name="FILE" class="org.jboss.logging.appender.DailyRollingFileAppender">
+ <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+ <param name="File" value="${jboss.server.log.dir}/server.log"/>
+ <param name="Append" value="false"/>
+
+ <!-- Rollover at midnight each day -->
+ <param name="DatePattern" value="'.'yyyy-MM-dd"/>
+
+ <!-- Rollover at the top of each hour
+ <param name="DatePattern" value="'.'yyyy-MM-dd-HH"/>
+ -->
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <!-- The default pattern: Date Priority [Category] Message\n -->
+ <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
+
+ <!-- The full pattern: Date MS Priority [Category] (Thread:NDC) Message\n
+ <param name="ConversionPattern" value="%d %-5r %-5p [%c] (%t:%x) %m%n"/>
+ -->
+ </layout>
+ </appender>
+
+ <!-- A size based file rolling appender
+ <appender name="FILE" class="org.jboss.logging.appender.RollingFileAppender">
+ <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+ <param name="File" value="${jboss.server.log.dir}/server.log"/>
+ <param name="Append" value="false"/>
+ <param name="MaxFileSize" value="500KB"/>
+ <param name="MaxBackupIndex" value="1"/>
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
+ </layout>
+ </appender>
+ -->
+
+ <!-- ============================== -->
+ <!-- Append messages to the console -->
+ <!-- ============================== -->
+
+ <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+ <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+ <param name="Target" value="System.out"/>
+ <param name="Threshold" value="INFO"/>
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <!-- The default pattern: Date Priority [Category] Message\n -->
+ <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
+ </layout>
+ </appender>
+
+ <!-- ====================== -->
+ <!-- More Appender examples -->
+ <!-- ====================== -->
+
+ <!-- Buffer events and log them asynchronously
+ <appender name="ASYNC" class="org.apache.log4j.AsyncAppender">
+ <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+ <appender-ref ref="FILE"/>
+ <appender-ref ref="CONSOLE"/>
+ <appender-ref ref="SMTP"/>
+ </appender>
+ -->
+
+ <!-- EMail events to an administrator
+ <appender name="SMTP" class="org.apache.log4j.net.SMTPAppender">
+ <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+ <param name="Threshold" value="ERROR"/>
+ <param name="To" value="admin(a)myhost.domain.com"/>
+ <param name="From" value="nobody(a)myhost.domain.com"/>
+ <param name="Subject" value="JBoss Sever Errors"/>
+ <param name="SMTPHost" value="localhost"/>
+ <param name="BufferSize" value="10"/>
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="[%d{ABSOLUTE},%c{1}] %m%n"/>
+ </layout>
+ </appender>
+ -->
+
+ <!-- Syslog events
+ <appender name="SYSLOG" class="org.apache.log4j.net.SyslogAppender">
+ <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+ <param name="Facility" value="LOCAL7"/>
+ <param name="FacilityPrinting" value="true"/>
+ <param name="SyslogHost" value="localhost"/>
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="[%d{ABSOLUTE},%c{1}] %m%n"/>
+ </layout>
+ </appender>
+ -->
+
+ <!-- Log events to JMS (requires a topic to be created)
+ <appender name="JMS" class="org.apache.log4j.net.JMSAppender">
+ <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+ <param name="Threshold" value="ERROR"/>
+ <param name="TopicConnectionFactoryBindingName" value="java:/ConnectionFactory"/>
+ <param name="TopicBindingName" value="topic/MyErrorsTopic"/>
+ </appender>
+ -->
+
+ <!-- Log events through SNMP
+ <appender name="TRAP_LOG" class="org.apache.log4j.ext.SNMPTrapAppender">
+ <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+ <param name="ImplementationClassName" value="org.apache.log4j.ext.JoeSNMPTrapSender"/>
+ <param name="ManagementHost" value="127.0.0.1"/>
+ <param name="ManagementHostTrapListenPort" value="162"/>
+ <param name="EnterpriseOID" value="1.3.6.1.4.1.24.0"/>
+ <param name="LocalIPAddress" value="127.0.0.1"/>
+ <param name="LocalTrapSendPort" value="161"/>
+ <param name="GenericTrapType" value="6"/>
+ <param name="SpecificTrapType" value="12345678"/>
+ <param name="CommunityString" value="public"/>
+ <param name="ForwardStackTraceWithTrap" value="true"/>
+ <param name="Threshold" value="DEBUG"/>
+ <param name="ApplicationTrapOID" value="1.3.6.1.4.1.24.12.10.22.64"/>
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%d,%p,[%t],[%c],%m%n"/>
+ </layout>
+ </appender>
+ -->
+
+ <!-- Emit events as JMX notifications
+ <appender name="JMX" class="org.jboss.monitor.services.JMXNotificationAppender">
+ <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+
+ <param name="Threshold" value="WARN"/>
+ <param name="ObjectName" value="jboss.system:service=Logging,type=JMXNotificationAppender"/>
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%d %-5p [%c] %m"/>
+ </layout>
+ </appender>
+ -->
+
+ <!-- ================ -->
+ <!-- Limit categories -->
+ <!-- ================ -->
+
+ <!-- Limit the org.apache category to INFO as its DEBUG is verbose -->
+ <category name="org.apache">
+ <priority value="INFO"/>
+ </category>
+
+ <!-- Limit the org.jboss.serial (jboss-serialization) to INFO as its DEBUG is verbose -->
+ <category name="org.jboss.serial">
+ <priority value="INFO"/>
+ </category>
+
+ <!-- Limit the org.jgroups category to WARN as its INFO is verbose -->
+ <category name="org.jgroups">
+ <priority value="WARN"/>
+ </category>
+
+ <!-- Limit the jacorb category to WARN as its INFO is verbose -->
+ <category name="jacorb">
+ <priority value="WARN"/>
+ </category>
+
+ <!-- Limit other crap categories -->
+ <category name="org.jtb">
+ <priority value="INFO"/>
+ </category>
+ <category name="httpclient">
+ <priority value="INFO"/>
+ </category>
+
+ <!-- Limit Hibernate categories -->
+ <category name="org.hibernate">
+ <priority value="INFO"/>
+ </category>
+
+ <!-- Limit JBoss categories -->
+ <category name="org.jboss">
+ <priority value="INFO"/>
+ </category>
+
+ <!-- Limit ehcache categories -->
+ <category name="net.sf.ehcache">
+ <priority value="INFO"/>
+ </category>
+
+ <!-- Limit JBPM categories -->
+ <category name="org.jbpm">
+ <priority value="INFO"/>
+ </category>
+
+ <!-- Limit the JSR77 categories -->
+ <category name="org.jboss.management">
+ <priority value="INFO"/>
+ </category>
+
+ <!-- Enable JBossWS message tracing
+ <category name="jbossws.SOAPMessage">
+ <priority value="TRACE" class="org.jboss.logging.XLevel"/>
+ </category>
+ -->
+
+ <!-- Decrease the priority threshold for the org.jboss.varia category
+ <category name="org.jboss.varia">
+ <priority value="DEBUG"/>
+ </category>
+ -->
+
+ <!-- Show the evolution of the DataSource pool in the logs [inUse/Available/Max]
+ <category name="org.jboss.resource.connectionmanager.JBossManagedConnectionPool">
+ <priority value="TRACE" class="org.jboss.logging.XLevel"/>
+ </category>
+ -->
+
+ <!--
+ | An example of enabling the custom TRACE level priority that is used
+ | by the JBoss internals to diagnose low level details. This example
+ | turns on TRACE level msgs for the org.jboss.ejb.plugins package and its
+ | subpackages. This will produce A LOT of logging output.
+ <category name="org.jboss.system">
+ <priority value="TRACE" class="org.jboss.logging.XLevel"/>
+ </category>
+ <category name="org.jboss.ejb.plugins">
+ <priority value="TRACE" class="org.jboss.logging.XLevel"/>
+ </category>
+ -->
+
+ <!--
+ | Logs these events to SNMP:
+ - server starts/stops
+ - cluster evolution (node death/startup)
+ - When an EJB archive is deployed (and associated verified messages)
+ - When an EAR archive is deployed
+
+ <category name="org.jboss.system.server.Server">
+ <priority value="INFO" />
+ <appender-ref ref="TRAP_LOG"/>
+ </category>
+
+ <category name="org.jboss.ha.framework.interfaces.HAPartition.lifecycle">
+ <priority value="INFO" />
+ <appender-ref ref="TRAP_LOG"/>
+ </category>
+
+ <category name="org.jboss.deployment.MainDeployer">
+ <priority value="ERROR" />
+ <appender-ref ref="TRAP_LOG"/>
+ </category>
+
+ <category name="org.jboss.ejb.EJBDeployer">
+ <priority value="INFO" />
+ <appender-ref ref="TRAP_LOG"/>
+ </category>
+
+ <category name="org.jboss.deployment.EARDeployer">
+ <priority value="INFO" />
+ <appender-ref ref="TRAP_LOG"/>
+ </category>
+
+ -->
+
+ <!-- ======================= -->
+ <!-- Setup the Root category -->
+ <!-- ======================= -->
+
+ <root>
+ <appender-ref ref="CONSOLE"/>
+ <appender-ref ref="FILE"/>
+ </root>
+
+ <!-- Clustering logging -->
+ <!-- Uncomment the following to redirect the org.jgroups and
+ org.jboss.ha categories to a cluster.log file.
+
+ <appender name="CLUSTER" class="org.jboss.logging.appender.RollingFileAppender">
+ <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+ <param name="File" value="${jboss.server.log.dir}/cluster.log"/>
+ <param name="Append" value="false"/>
+ <param name="MaxFileSize" value="500KB"/>
+ <param name="MaxBackupIndex" value="1"/>
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
+ </layout>
+ </appender>
+ <category name="org.jgroups">
+ <priority value="DEBUG" />
+ <appender-ref ref="CLUSTER"/>
+ </category>
+ <category name="org.jboss.ha">
+ <priority value="DEBUG" />
+ <appender-ref ref="CLUSTER"/>
+ </category>
+ -->
+
+</log4j:configuration>
Added: demo/trunk/conf/server.xml.diff
===================================================================
--- demo/trunk/conf/server.xml.diff (rev 0)
+++ demo/trunk/conf/server.xml.diff 2007-07-31 08:21:55 UTC (rev 7846)
@@ -0,0 +1,19 @@
+--- /home/theute/Portal/jboss-4.2.1.GA/server/default/deploy/jboss-web.deployer/server.xml 2007-07-13 16:08:14.000000000 +0200
++++ server.xml 2007-07-09 09:54:01.000000000 +0200
+@@ -90,12 +85,10 @@
+ -->
+
+ <!-- Access logger -->
+- <!--
+- <Valve className="org.apache.catalina.valves.AccessLogValve"
+- prefix="localhost_access_log." suffix=".log"
+- pattern="common" directory="${jboss.server.home.dir}/log"
++ <Valve className="org.apache.catalina.valves.FastCommonAccessLogValve"
++ prefix="portal.demo.jboss.com_access_log." suffix=".log"
++ pattern="common" directory="${jboss.server.home.dir}/../../../log"
+ resolveHosts="false" />
+- -->
+
+ <!-- Uncomment to enable single sign-on across web apps
+ deployed to this host. Does not provide SSO across a cluster.
+
16 years, 9 months
JBoss Portal SVN: r7845 - trunk/core/src/main/org/jboss/portal/core/controller/classic.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-07-30 12:17:26 -0400 (Mon, 30 Jul 2007)
New Revision: 7845
Modified:
trunk/core/src/main/org/jboss/portal/core/controller/classic/OtherResponseHandler.java
Log:
JBPORTAL-1617: sendRedirect() not working (leading to a blank page)
Modified: trunk/core/src/main/org/jboss/portal/core/controller/classic/OtherResponseHandler.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/controller/classic/OtherResponseHandler.java 2007-07-30 16:15:30 UTC (rev 7844)
+++ trunk/core/src/main/org/jboss/portal/core/controller/classic/OtherResponseHandler.java 2007-07-30 16:17:26 UTC (rev 7845)
@@ -29,6 +29,7 @@
import org.jboss.portal.core.controller.ControllerContext;
import org.jboss.portal.core.controller.ControllerCommand;
import org.jboss.portal.core.controller.ControllerResponse;
+import org.jboss.portal.core.controller.command.response.RedirectionResponse;
import org.jboss.portal.core.controller.command.response.SignOutResponse;
import org.jboss.portal.core.controller.command.response.StreamContentResponse;
import org.jboss.portal.core.controller.command.response.ErrorResponse;
@@ -105,6 +106,24 @@
//
return HTTPResponse.sendRedirect(location);
}
+ else if (controllerResponse instanceof RedirectionResponse)
+ {
+ // Get the optional signout location
+ String location = ((RedirectionResponse)controllerResponse).getLocation();
+
+ //
+ if (location == null)
+ {
+ PortalObjectContainer portalObjectContainer = controllerContext.getController().getPortalObjectContainer();
+ Portal portal = (Portal)portalObjectContainer.getObject(DEFAULT_PORTAL_PATH);
+ ViewPageCommand renderCmd = new ViewPageCommand(portal.getId());
+ URLContext urlContext = invocation.getServerContext().getURLContext();
+ location = controllerContext.renderURL(renderCmd, urlContext, null);
+ }
+
+ //
+ return HTTPResponse.sendRedirect(location);
+ }
else if (controllerResponse instanceof StreamContentResponse)
{
StreamContentResponse scr = (StreamContentResponse)controllerResponse;
16 years, 9 months
JBoss Portal SVN: r7844 - branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/controller/classic.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-07-30 12:15:30 -0400 (Mon, 30 Jul 2007)
New Revision: 7844
Modified:
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/controller/classic/OtherResponseHandler.java
Log:
JBPORTAL-1617: sendRedirect() not working (leading to a blank page)
Modified: branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/controller/classic/OtherResponseHandler.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/controller/classic/OtherResponseHandler.java 2007-07-30 13:17:03 UTC (rev 7843)
+++ branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/controller/classic/OtherResponseHandler.java 2007-07-30 16:15:30 UTC (rev 7844)
@@ -29,6 +29,7 @@
import org.jboss.portal.core.controller.ControllerContext;
import org.jboss.portal.core.controller.ControllerCommand;
import org.jboss.portal.core.controller.ControllerResponse;
+import org.jboss.portal.core.controller.command.response.RedirectionResponse;
import org.jboss.portal.core.controller.command.response.SignOutResponse;
import org.jboss.portal.core.controller.command.response.StreamContentResponse;
import org.jboss.portal.core.controller.command.response.ErrorResponse;
@@ -105,6 +106,24 @@
//
return HTTPResponse.sendRedirect(location);
}
+ else if (controllerResponse instanceof RedirectionResponse)
+ {
+ // Get the optional signout location
+ String location = ((RedirectionResponse)controllerResponse).getLocation();
+
+ //
+ if (location == null)
+ {
+ PortalObjectContainer portalObjectContainer = controllerContext.getController().getPortalObjectContainer();
+ Portal portal = (Portal)portalObjectContainer.getObject(DEFAULT_PORTAL_PATH);
+ ViewPageCommand renderCmd = new ViewPageCommand(portal.getId());
+ URLContext urlContext = invocation.getServerContext().getURLContext();
+ location = controllerContext.renderURL(renderCmd, urlContext, null);
+ }
+
+ //
+ return HTTPResponse.sendRedirect(location);
+ }
else if (controllerResponse instanceof StreamContentResponse)
{
StreamContentResponse scr = (StreamContentResponse)controllerResponse;
16 years, 9 months
JBoss Portal SVN: r7843 - in branches/JBoss_Portal_Branch_2_6/widget/src: resources/widget-war/WEB-INF/jsp and 1 other directory.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2007-07-30 09:17:03 -0400 (Mon, 30 Jul 2007)
New Revision: 7843
Modified:
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/WidgetPortlet.java
branches/JBoss_Portal_Branch_2_6/widget/src/resources/widget-war/WEB-INF/jsp/edit.jsp
Log:
JBPORTAL-1376 - enable to choose google widget by providing URL explicitly
Modified: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/WidgetPortlet.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/WidgetPortlet.java 2007-07-30 12:59:36 UTC (rev 7842)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/WidgetPortlet.java 2007-07-30 13:17:03 UTC (rev 7843)
@@ -100,6 +100,12 @@
params.put("query", new String[]{queryParam});
}
+ String pickMethod = req.getParameter("gg_pick_method");
+ if (pickMethod != null)
+ {
+ params.put("gg_pick_method", new String[]{pickMethod});
+ }
+
//
resp.setRenderParameters(params);
}
Modified: branches/JBoss_Portal_Branch_2_6/widget/src/resources/widget-war/WEB-INF/jsp/edit.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/resources/widget-war/WEB-INF/jsp/edit.jsp 2007-07-30 12:59:36 UTC (rev 7842)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/resources/widget-war/WEB-INF/jsp/edit.jsp 2007-07-30 13:17:03 UTC (rev 7843)
@@ -18,7 +18,7 @@
<div>
<%
- // Get useful request attributes
+ // Get useful request attributes
GGProvider provider = (GGProvider)request.getAttribute("provider");
// Get the selected widget if any
@@ -46,156 +46,217 @@
// Compute query
GGQuery query = new GGQuery(0, catTerm, queryTerm);
Collection widgets = provider.search(query);
+
+ String ggPickMethod = request.getParameter("gg_pick_method");
+ boolean uriPickMethod = false;
+ if (ggPickMethod != null && ggPickMethod.equals("uri"))
+ {
+ uriPickMethod = true;
+ }
+ else
+ {
+ }
%>
+<div id="<p:namespace/>selection">
+ <input type="RADIO" name="gg_pick_method" value="directory" <%= !uriPickMethod ? "CHECKED" : "" %> onclick="document.getElementById('<p:namespace/>directory_search_div').style.display = 'block'; document.getElementById('<p:namespace/>gadget_url_div').style.display = 'none'; "> Gadget Directory
+ <input type="RADIO" name="gg_pick_method" value="uri" <%= uriPickMethod ? "CHECKED" : "" %> onclick="document.getElementById('<p:namespace/>directory_search_div').style.display = 'none'; document.getElementById('<p:namespace/>gadget_url_div').style.display = 'block'; "> Gadget URI
+ <br>
+ <hr>
+</div>
+<div id="<p:namespace/>gadget_url_div" style="display: <%= uriPickMethod ? "block" : "none" %>;">
+ <%
+ PortletURL contentURL = renderResponse.createActionURL();
+ contentURL.setParameter("content.action.select","content.action.select");
+ contentURL.setParameter("gg_pick_method", "uri");
+ %>
+ <form action="<%= contentURL %>" method="post">
-<form action="<p:renderURL></p:renderURL>" method="post">
- <input type="text" name="query" class="portlet-form-field"/>
- <select name="cat" class="portlet-form-field">
- <option value=""> </option>
- <%
- for (Iterator i = provider.getCategories().iterator(); i.hasNext();)
- {
- GGWidgetCategoryInfo cat = (GGWidgetCategoryInfo)i.next();
- boolean selected = cat.getName().equals(catTerm);
+ <%
+ if (uri != null && selWidget == null)
+ {
+
%>
- <option value="<%= cat.getName() %>" <%= selected ? "selected=\"selected\"" : "" %>><%= cat.getDisplayName() %></option>
+ <p style="color: red;">
+ <%
+ out.println("Failed to obtain widget with URI: " + uri);
+ %>
+ </p>
<%
- }
- %>
- </select>
- <input type="submit" value="Search Gadgets" class="portlet-form-button"/>
-</form>
+ }
+ else if (selWidget != null)
+ {
+ %>
+ <p style="color: blue;">
+ Selected Widget: <%= selWidget.getDirectoryTitle().getDefaultString().length() > 0 ? selWidget.getDirectoryTitle().getDefaultString() : selWidget.getTitle().getDefaultString() %>
+ </p>
+ <%
+ }
+ %>
-<p>
-<table style="width:100%;border:1px solid" cellspacing="0" cellpadding="0">
+ <input type="text" name="content.uri" value="<%= uri != null ? uri : "" %>" class="portlet-form-field"/>
+ <input type="submit" value="Select Gadget" class="portlet-form-button"/>
+ </form>
+</div>
+
+<div id="<p:namespace/>directory_search_div" style="display: <%= !uriPickMethod ? "block" : "none" %>;">
+
+ <form action="<p:renderURL></p:renderURL>" method="post">
+ <input type="text" name="query" class="portlet-form-field"/>
+ <select name="cat" class="portlet-form-field">
+ <option value=""> </option>
+ <%
+ for (Iterator i = provider.getCategories().iterator(); i.hasNext();)
+ {
+ GGWidgetCategoryInfo cat = (GGWidgetCategoryInfo)i.next();
+ boolean selected = cat.getName().equals(catTerm);
+ %>
+ <option value="<%= cat.getName() %>" <%= selected ? "selected=\"selected\"" : "" %>><%= cat.getDisplayName() %></option>
+ <%
+ }
+ %>
+ </select>
+ <input type="submit" value="Search Gadgets" class="portlet-form-button"/>
+ </form>
+
+ <p>
+ <table style="width:100%;border:1px solid" cellspacing="0" cellpadding="0">
+ <%
+ for (IteratorStatus i = new IteratorStatus(widgets.iterator()); i.hasNext();)
+ {
+ GGWidget widget = (GGWidget)i.next();
+ boolean selected = selWidget != null && selWidget.getId().equals(widget.getId());
+ PortletURL selectURL = renderResponse.createActionURL();
+
+ // Set parameters for selection
+ selectURL.setParameter("content.action.select", "content.action.select");
+ selectURL.setParameter("content.uri", widget.getId());
+
+ // Set default parametrization state
+ for (Iterator j = widget.getInfo().getPreferences().getPreferences().iterator(); j.hasNext();)
+ {
+ GGPreferenceInfo prefInfo = (GGPreferenceInfo)j.next();
+ String paramName = "content.param." + prefInfo.getName();
+ String defaultValue = prefInfo.getDefaultValue() != null ? prefInfo.getDefaultValue() : "";
+ selectURL.setParameter(paramName, defaultValue);
+ }
+
+ // Propagage search nav state
+ selectURL.setParameter("cat", catTerm);
+ selectURL.setParameter("query", queryTerm);
+
+ //
+ String rowClass = selected ? "portlet-section-selected" : (i.getIndex() % 2 == 0 ? "portlet-section-body" : "portlet-section-alternate");
+ %>
+ <tr class="<%= rowClass %>">
+ <td><a href="<%= selectURL %>"><%= widget.getDirectoryTitle().getDefaultString().length() > 0 ? widget.getDirectoryTitle().getDefaultString() : widget.getTitle().getDefaultString() %></a></td>
+ </tr>
+ <%
+ }
+ %>
+ </table>
+ </p>
+
+</div>
+<div>
<%
- for (IteratorStatus i = new IteratorStatus(widgets.iterator()); i.hasNext();)
+ if (selWidget != null && !selWidget.getInfo().getPreferences().getPreferences().isEmpty())
{
- GGWidget widget = (GGWidget)i.next();
- boolean selected = selWidget != null && selWidget.getId().equals(widget.getId());
PortletURL selectURL = renderResponse.createActionURL();
// Set parameters for selection
selectURL.setParameter("content.action.select", "content.action.select");
- selectURL.setParameter("content.uri", widget.getId());
+ selectURL.setParameter("content.uri", selWidget.getId());
- // Set default parametrization state
- for (Iterator j = widget.getInfo().getPreferences().getPreferences().iterator(); j.hasNext();)
- {
- GGPreferenceInfo prefInfo = (GGPreferenceInfo)j.next();
- String paramName = "content.param." + prefInfo.getName();
- String defaultValue = prefInfo.getDefaultValue() != null ? prefInfo.getDefaultValue() : "";
- selectURL.setParameter(paramName, defaultValue);
- }
-
// Propagage search nav state
selectURL.setParameter("cat", catTerm);
selectURL.setParameter("query", queryTerm);
- //
- String rowClass = selected ? "portlet-section-selected" : (i.getIndex() % 2 == 0 ? "portlet-section-body" : "portlet-section-alternate");
+ //propagate visable div
+ if (uriPickMethod)
+ {
+ selectURL.setParameter("gg_pick_method", "uri");
+ }
%>
- <tr class="<%= rowClass %>">
- <td><a href="<%= selectURL %>"><%= widget.getTitle().getDefaultString() %></a></td>
- </tr>
- <%
- }
- %>
-</table>
-</p>
-
-<%
- if (selWidget != null && !selWidget.getInfo().getPreferences().getPreferences().isEmpty())
- {
- PortletURL selectURL = renderResponse.createActionURL();
-
- // Set parameters for selection
- selectURL.setParameter("content.action.select", "content.action.select");
- selectURL.setParameter("content.uri", selWidget.getId());
-
- // Propagage search nav state
- selectURL.setParameter("cat", catTerm);
- selectURL.setParameter("query", queryTerm);
-%>
-<p>
- <form action="<%= selectURL %>" method="post">
- <%
- for (Iterator i = selWidget.getInfo().getPreferences().getPreferences().iterator(); i.hasNext();)
- {
- GGPreferenceInfo prefInfo = (GGPreferenceInfo)i.next();
- if (prefInfo.getType().getOrdinal() == DataType.HIDDEN)
+ <p>
+ <form action="<%= selectURL %>" method="post">
+ <%
+ for (Iterator i = selWidget.getInfo().getPreferences().getPreferences().iterator(); i.hasNext();)
{
+ GGPreferenceInfo prefInfo = (GGPreferenceInfo)i.next();
+ if (prefInfo.getType().getOrdinal() == DataType.HIDDEN)
+ {
- %>
- <input type="hidden" name="content.param.<%= prefInfo.getName() %>" value="<%= prefInfo.getDefaultValue() != null ? prefInfo.getDefaultValue() : "" %>"/>
- <%
+ %>
+ <input type="hidden" name="content.param.<%= prefInfo.getName() %>" value="<%= prefInfo.getDefaultValue() != null ? prefInfo.getDefaultValue() : "" %>"/>
+ <%
+ }
}
- }
- %>
- <table>
- <tbody>
- <%
- for (Iterator i = selWidget.getInfo().getPreferences().getPreferences().iterator(); i.hasNext();)
- {
- GGPreferenceInfo prefInfo = (GGPreferenceInfo)i.next();
+ %>
+ <table>
+ <tbody>
+ <%
+ for (Iterator i = selWidget.getInfo().getPreferences().getPreferences().iterator(); i.hasNext();)
+ {
+ GGPreferenceInfo prefInfo = (GGPreferenceInfo)i.next();
- // Get param value from nav state otherwise we use the default value
- String prefValue = request.getParameter("content.param." + prefInfo.getName());
- if (prefValue == null)
- {
- prefInfo.getDefaultValue();
- }
- if (prefValue == null)
- {
- prefValue = "";
- }
- %>
- <tr>
- <td><%= prefInfo.getDisplayName() != null ? prefInfo.getDisplayName() : prefInfo.getName() %>:</td>
- <%
- switch (prefInfo.getType().getOrdinal())
- {
- case DataType.HIDDEN:
- break;
- case DataType.ENUM:
- %>
- <td><select name="content.param.<%= prefInfo.getName() %>" class="portlet-form-field">
- <%
- EnumType e = (EnumType)prefInfo.getType();
- for (int j = 0;j < e.getSize();j++)
- {
- EnumType.Value value = e.getValue(j);
- boolean selected = value.getValue().equals(prefValue);
+ // Get param value from nav state otherwise we use the default value
+ String prefValue = request.getParameter("content.param." + prefInfo.getName());
+ if (prefValue == null)
+ {
+ prefInfo.getDefaultValue();
+ }
+ if (prefValue == null)
+ {
+ prefValue = "";
+ }
+ %>
+ <tr>
+ <td><%= prefInfo.getDisplayName() != null ? prefInfo.getDisplayName() : prefInfo.getName() %>:</td>
+ <%
+ switch (prefInfo.getType().getOrdinal())
+ {
+ case DataType.HIDDEN:
+ break;
+ case DataType.ENUM:
%>
- <option <%= selected ? "selected=\"selected\"" : "" %> value="<%= value.getValue() %>"><%= value.getDisplayValue() != null ? value.getDisplayValue() : value.getValue() %></option>
+ <td><select name="content.param.<%= prefInfo.getName() %>" class="portlet-form-field">
+ <%
+ EnumType e = (EnumType)prefInfo.getType();
+ for (int j = 0;j < e.getSize();j++)
+ {
+ EnumType.Value value = e.getValue(j);
+ boolean selected = value.getValue().equals(prefValue);
+ %>
+ <option <%= selected ? "selected=\"selected\"" : "" %> value="<%= value.getValue() %>"><%= value.getDisplayValue() != null ? value.getDisplayValue() : value.getValue() %></option>
+ <%
+ }
+ %>
+ </select></td>
<%
- }
- %>
- </select></td>
- <%
- break;
- default:
- %>
- <td><input type="text" name="content.param.<%= prefInfo.getName() %>" class="portlet-form-field" value="<%= prefValue %>"/></td>
- <%
- break;
- }
- %>
- </tr>
- <%
- }
- %>
- <tr>
- <td colspan="2"><input type="submit" value="Update" class="portlet-form-button"/></td>
- </tr>
- </tbody>
- </table>
- </form>
-</p>
-<%
- }
-%>
-
+ break;
+ default:
+ %>
+ <td><input type="text" name="content.param.<%= prefInfo.getName() %>" class="portlet-form-field" value="<%= prefValue %>"/></td>
+ <%
+ break;
+ }
+ %>
+ </tr>
+ <%
+ }
+ %>
+ <tr>
+ <td colspan="2"><input type="submit" value="Update" class="portlet-form-button"/></td>
+ </tr>
+ </tbody>
+ </table>
+ </form>
+ </p>
+ <%
+ }
+ %>
</div>
+
+</div>
\ No newline at end of file
16 years, 9 months
JBoss Portal SVN: r7842 - in trunk: core-admin and 5 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-07-30 08:59:36 -0400 (Mon, 30 Jul 2007)
New Revision: 7842
Added:
trunk/tools/etc/checkstyle/
trunk/tools/etc/checkstyle/checkstyle-frames.xsl
trunk/tools/etc/checkstyle/checkstyle-text.xsl
trunk/tools/etc/checkstyle/checkstyle-xdoc.xsl
Removed:
trunk/tools/etc/checkstyle/checkstyle-frames.xsl
trunk/tools/etc/checkstyle/checkstyle-text.xsl
trunk/tools/etc/checkstyle/checkstyle-xdoc.xsl
Modified:
trunk/build/build-thirdparty.xml
trunk/core-admin/build.xml
trunk/core-wsrp/build.xml
trunk/tools/bin/ant
trunk/tools/bin/ant.bat
trunk/tools/bin/antRun
trunk/tools/bin/antRun.bat
trunk/tools/bin/antRun.pl
trunk/tools/bin/complete-ant-cmd.pl
trunk/tools/bin/lcp.bat
trunk/tools/bin/runant.pl
trunk/tools/bin/runant.py
trunk/tools/etc/changelog.xsl
trunk/tools/etc/coverage-frames.xsl
trunk/tools/etc/jdepend-frames.xsl
trunk/tools/etc/jdepend.xsl
trunk/tools/etc/junit-frames.xsl
trunk/tools/etc/junit-noframes.xsl
trunk/tools/etc/log.xsl
trunk/tools/etc/maudit-frames.xsl
trunk/tools/etc/mmetrics-frames.xsl
trunk/tools/etc/tagdiff.xsl
trunk/tools/lib/ant-junit.jar
trunk/tools/lib/ant-launcher.jar
trunk/tools/lib/ant-nodeps.jar
trunk/tools/lib/ant.jar
trunk/tools/lib/xercesImpl.jar
trunk/tools/lib/xml-apis.jar
Log:
- ant upgrade
- Removed Sun RI JSF portlet bridge
Modified: trunk/build/build-thirdparty.xml
===================================================================
--- trunk/build/build-thirdparty.xml 2007-07-30 12:43:44 UTC (rev 7841)
+++ trunk/build/build-thirdparty.xml 2007-07-30 12:59:36 UTC (rev 7842)
@@ -114,8 +114,6 @@
<componentref name="freemarker" version="2.3.9"/>
<componentref name="wutka-dtdparser" version="1.2.1"/>
<componentref name="portals-bridges" version="1.0"/>
- <!-- patched jsf-portlet bridge -->
- <componentref name="portals-bridges/jsf-portlet" version="1.2-patched"/>
</build>
<synchronizeinfo/>
Modified: trunk/core-admin/build.xml
===================================================================
--- trunk/core-admin/build.xml 2007-07-30 12:43:44 UTC (rev 7841)
+++ trunk/core-admin/build.xml 2007-07-30 12:59:36 UTC (rev 7842)
@@ -196,8 +196,10 @@
<fileset dir="${jboss.portal-faces.root}/lib" includes="portal-faces-lib.jar"/>
<fileset dir="../core-admin/src/etc/sun-jsf" includes="jsf-example.jar"/>
<fileset dir="${facelets.facelets.lib}" includes="jsf-facelets.jar"/>
- <fileset dir="${el.el.lib}" includes="el-api.jar,el-ri.jar"/>
- <fileset dir="${portals.bridges/jsf.portlet.lib}" includes="jsf-portlet.jar"/>
+ <fileset dir="${el.el.lib}" includes="el-api.jar,el-ri.jar"/>
+ <fileset dir="${commons.el.lib}" includes="commons-el.jar"/>
+ <fileset dir="${apache.beanutils.lib}" includes="commons-beanutils.jar"/>
+ <fileset dir="${apache.digester.lib}" includes="commons-digester.jar"/>
</copy>
<copy todir="${build.resources}/portal-admin-war">
<fileset dir="${source.bin}/portal-admin-war"/>
@@ -208,9 +210,6 @@
</copy>
<copy todir="${build.resources}/portal-admin.sar/lib">
<fileset dir="${jboss.portal-faces.root}/lib" includes="portal-faces-loader-lib.jar"/>
- <fileset dir="${commons.el.lib}" includes="commons-el.jar"/>
- <fileset dir="${apache.beanutils.lib}" includes="commons-beanutils.jar"/>
- <fileset dir="${apache.digester.lib}" includes="commons-digester.jar"/>
</copy>
<copy todir="${build.resources}/portal-admin.sar/portal-admin.war">
Modified: trunk/core-wsrp/build.xml
===================================================================
--- trunk/core-wsrp/build.xml 2007-07-30 12:43:44 UTC (rev 7841)
+++ trunk/core-wsrp/build.xml 2007-07-30 12:59:36 UTC (rev 7842)
@@ -211,7 +211,6 @@
<fileset dir="../core-admin/src/etc/sun-jsf" includes="jsf-example.jar"/>
<fileset dir="${facelets.facelets.lib}" includes="jsf-facelets.jar"/>
<fileset dir="${el.el.lib}" includes="el-api.jar,el-ri.jar"/>
- <fileset dir="${portals.bridges/jsf.portlet.lib}" includes="jsf-portlet.jar"/>
<fileset dir="${commons.el.lib}" includes="commons-el.jar"/>
<fileset dir="${apache.beanutils.lib}" includes="commons-beanutils.jar"/>
<fileset dir="${apache.digester.lib}" includes="commons-digester.jar"/>
Modified: trunk/tools/bin/ant
===================================================================
--- trunk/tools/bin/ant 2007-07-30 12:43:44 UTC (rev 7841)
+++ trunk/tools/bin/ant 2007-07-30 12:59:36 UTC (rev 7842)
@@ -1,24 +1,80 @@
#! /bin/sh
-# Copyright (c) 2001-2002 The Apache Software Foundation. All rights
-# reserved.
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
-# load system-wide ant configuration
-if [ -f "/etc/ant.conf" ] ; then
- . /etc/ant.conf
-fi
+# Extract launch and ant arguments, (see details below).
+ant_exec_args=
+no_config=false
+use_jikes_default=false
+ant_exec_debug=false
+show_help=false
+for arg in "$@" ; do
+ if [ "$arg" = "--noconfig" ] ; then
+ no_config=true
+ elif [ "$arg" = "--usejikes" ] ; then
+ use_jikes_default=true
+ elif [ "$arg" = "--execdebug" ] ; then
+ ant_exec_debug=true
+ elif [ my"$arg" = my"--h" -o my"$arg" = my"--help" ] ; then
+ show_help=true
+ ant_exec_args="$ant_exec_args -h"
+ else
+ if [ my"$arg" = my"-h" -o my"$arg" = my"-help" ] ; then
+ show_help=true
+ fi
+ ant_exec_args="$ant_exec_args \"$arg\""
+ fi
+done
-# provide default values for people who don't use RPMs
-if [ -z "$rpm_mode" ] ; then
- rpm_mode=false;
+# Source/default ant configuration
+if $no_config ; then
+ rpm_mode=false
+ usejikes=$use_jikes_default
+else
+ # load system-wide ant configuration (ONLY if ANT_HOME has NOT been set)
+ if [ -z "$ANT_HOME" -o "$ANT_HOME" = "/usr/share/ant" ]; then
+ if [ -f "/etc/ant.conf" ] ; then
+ . /etc/ant.conf
+ fi
+ fi
+
+ # load user ant configuration
+ if [ -f "$HOME/.ant/ant.conf" ] ; then
+ . $HOME/.ant/ant.conf
+ fi
+ if [ -f "$HOME/.antrc" ] ; then
+ . "$HOME/.antrc"
+ fi
+
+ # provide default configuration values
+ if [ -z "$rpm_mode" ] ; then
+ rpm_mode=false
+ fi
+ if [ -z "$usejikes" ] ; then
+ usejikes=$use_jikes_default
+ fi
fi
-if [ -z "$usejikes" ] ; then
- usejikes=false;
-fi
-# load user ant configuration
-if [ -f "$HOME/.antrc" ] ; then
- . "$HOME/.antrc"
+# Setup Java environment in rpm mode
+if $rpm_mode ; then
+ if [ -f /usr/share/java-utils/java-functions ] ; then
+ . /usr/share/java-utils/java-functions
+ set_jvm
+ set_javacmd
+ fi
fi
# OS specific support. $var _must_ be set to either true or false.
@@ -28,43 +84,29 @@
CYGWIN*) cygwin=true ;;
Darwin*) darwin=true
if [ -z "$JAVA_HOME" ] ; then
- JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
+ JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
fi
;;
esac
-if [ -z "$ANT_HOME" ] ; then
- # try to find ANT
- if [ -d /opt/ant ] ; then
- ANT_HOME=/opt/ant
- fi
-
- if [ -d "${HOME}/opt/ant" ] ; then
- ANT_HOME="${HOME}/opt/ant"
- fi
-
+if [ -z "$ANT_HOME" -o ! -d "$ANT_HOME" ] ; then
## resolve links - $0 may be a link to ant's home
PRG="$0"
progname=`basename "$0"`
- saveddir=`pwd`
# need this for relative symlinks
- cd `dirname "$PRG"`
-
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '.*/.*' > /dev/null; then
- PRG="$link"
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
else
- PRG=`dirname "$PRG"`"/$link"
+ PRG=`dirname "$PRG"`"/$link"
fi
done
-
+
ANT_HOME=`dirname "$PRG"`/..
- cd "$saveddir"
-
# make it fully qualified
ANT_HOME=`cd "$ANT_HOME" && pwd`
fi
@@ -75,90 +117,122 @@
ANT_HOME=`cygpath --unix "$ANT_HOME"`
[ -n "$JAVA_HOME" ] &&
JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
- [ -n "$CLASSPATH" ] &&
- CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
fi
# set ANT_LIB location
ANT_LIB="${ANT_HOME}/lib"
-if [ -z "$JAVACMD" ] ; then
+if [ -z "$JAVACMD" ] ; then
if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
+ # IBM's JDK on AIX uses strange locations for the executables
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
JAVACMD="$JAVA_HOME/jre/sh/java"
+ elif [ -x "$JAVA_HOME/jre/bin/java" ] ; then
+ JAVACMD="$JAVA_HOME/jre/bin/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
else
- JAVACMD=java
+ JAVACMD=`which java 2> /dev/null `
+ if [ -z "$JAVACMD" ] ; then
+ JAVACMD=java
+ fi
fi
fi
-
+
if [ ! -x "$JAVACMD" ] ; then
echo "Error: JAVA_HOME is not defined correctly."
echo " We cannot execute $JAVACMD"
exit 1
fi
-if [ -n "$CLASSPATH" ] ; then
- LOCALCLASSPATH="$CLASSPATH"
-fi
+# Build local classpath using just the launcher in non-rpm mode or
+# use the Jpackage helper in rpm mode with basic and default jars
+# specified in the ant.conf configuration. Because the launcher is
+# used, libraries linked in ANT_HOME/lib will also be included, but this
+# is discouraged as it is not java-version safe. A user should
+# request optional jars and their dependencies via the OPT_JAR_LIST
+# variable
+if $rpm_mode && [ -x /usr/bin/build-classpath ] ; then
+ LOCALCLASSPATH="$(/usr/bin/build-classpath ant ant-launcher jaxp_parser_impl xml-commons-apis)"
-# in rpm_mode get ant/optional/xml parser&api from JAVALIBDIR
-if $rpm_mode; then
- JAVALIBDIR=/usr/share/java
- for i in ant ant-optional jaxp_parser xml_apis
- do
- if [ -z "$LOCALCLASSPATH" ] ; then
- LOCALCLASSPATH="$JAVALIBDIR/$i.jar"
- else
- LOCALCLASSPATH="$JAVALIBDIR/$i.jar":"$LOCALCLASSPATH"
- fi
- done
+ # If no optional jars have been specified then build the default list
+ if [ -z "$OPT_JAR_LIST" ] ; then
+ for file in /etc/ant.d/*; do
+ if [ -f "$file" ]; then
+ case "$file" in
+ *~) ;;
+ *#*) ;;
+ *.rpmsave) ;;
+ *.rpmnew) ;;
+ *)
+ for dep in `cat "$file"`; do
+ case "$OPT_JAR_LIST" in
+ *"$dep"*) ;;
+ *) OPT_JAR_LIST="$OPT_JAR_LIST${OPT_JAR_LIST:+ }$dep"
+ esac
+ done
+ esac
+ fi
+ done
+ fi
- # in rpm mode ant/lib is in /usr/share/java/ant
- ANT_LIB="${JAVALIBDIR}/ant"
-fi
-
-# add in the dependency .jar files in non-RPM mode (the default)
-for i in "${ANT_LIB}"/*.jar
-do
- # if the directory is empty, then it will return the input string
- # this is stupid, so case for it
- if [ -f "$i" ] ; then
- if [ -z "$LOCALCLASSPATH" ] ; then
- LOCALCLASSPATH="$i"
- else
- LOCALCLASSPATH="$i":"$LOCALCLASSPATH"
+ # If the user requested to try to add some other jars to the classpath
+ if [ -n "$OPT_JAR_LIST" ] ; then
+ _OPTCLASSPATH="$(/usr/bin/build-classpath $OPT_JAR_LIST 2> /dev/null)"
+ if [ -n "$_OPTCLASSPATH" ] ; then
+ LOCALCLASSPATH="$LOCALCLASSPATH:$_OPTCLASSPATH"
fi
fi
-done
-if [ -n "$JAVA_HOME" ] ; then
+ # Explicitly add javac path to classpath, assume JAVA_HOME set
+ # properly in rpm mode
if [ -f "$JAVA_HOME/lib/tools.jar" ] ; then
LOCALCLASSPATH="$LOCALCLASSPATH:$JAVA_HOME/lib/tools.jar"
fi
-
if [ -f "$JAVA_HOME/lib/classes.zip" ] ; then
LOCALCLASSPATH="$LOCALCLASSPATH:$JAVA_HOME/lib/classes.zip"
fi
+ # if CLASSPATH_OVERRIDE env var is set, LOCALCLASSPATH will be
+ # user CLASSPATH first and ant-found jars after.
+ # In that case, the user CLASSPATH will override ant-found jars
+ #
+ # if CLASSPATH_OVERRIDE is not set, we'll have the normal behaviour
+ # with ant-found jars first and user CLASSPATH after
+ if [ -n "$CLASSPATH" ] ; then
+ # merge local and specified classpath
+ if [ -z "$LOCALCLASSPATH" ] ; then
+ LOCALCLASSPATH="$CLASSPATH"
+ elif [ -n "$CLASSPATH_OVERRIDE" ] ; then
+ LOCALCLASSPATH="$CLASSPATH:$LOCALCLASSPATH"
+ else
+ LOCALCLASSPATH="$LOCALCLASSPATH:$CLASSPATH"
+ fi
+
+ # remove class path from launcher -cp option
+ CLASSPATH=""
+ fi
+else
+ # not using rpm_mode; use launcher to determine classpaths
+ if [ -z "$LOCALCLASSPATH" ] ; then
+ LOCALCLASSPATH=$ANT_LIB/ant-launcher.jar
+ else
+ LOCALCLASSPATH=$ANT_LIB/ant-launcher.jar:$LOCALCLASSPATH
+ fi
+fi
+
+if [ -n "$JAVA_HOME" ] ; then
# OSX hack to make Ant work with jikes
if $darwin ; then
- OSXHACK="/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Classes"
- if [ -d ${OSXHACK} ] ; then
- for i in ${OSXHACK}/*.jar
+ OSXHACK="${JAVA_HOME}/../Classes"
+ if [ -d "${OSXHACK}" ] ; then
+ for i in "${OSXHACK}"/*.jar
do
JIKESPATH="$JIKESPATH:$i"
done
fi
fi
-else
- echo "Warning: JAVA_HOME environment variable is not set."
- echo " If build fails because sun.* classes could not be found"
- echo " you will need to set the JAVA_HOME environment variable"
- echo " to the installation directory of java."
fi
# Allow Jikes support (off by default)
@@ -166,27 +240,87 @@
ANT_OPTS="$ANT_OPTS -Dbuild.compiler=jikes"
fi
-# For Cygwin, switch paths to Windows format before running java
+# For Cygwin, switch paths to appropriate format before running java
+# For PATHs convert to unix format first, then to windows format to ensure
+# both formats are supported. Probably this will fail on directories with ;
+# in the name in the path. Let's assume that paths containing ; are more
+# rare than windows style paths on cygwin.
if $cygwin; then
- ANT_HOME=`cygpath --path --windows "$ANT_HOME"`
- JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
- CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
- LOCALCLASSPATH=`cygpath --path --windows "$LOCALCLASSPATH"`
- CYGHOME=`cygpath --path --windows "$HOME"`
+ if [ "$OS" = "Windows_NT" ] && cygpath -m .>/dev/null 2>/dev/null ; then
+ format=mixed
+ else
+ format=windows
+ fi
+ ANT_HOME=`cygpath --$format "$ANT_HOME"`
+ ANT_LIB=`cygpath --$format "$ANT_LIB"`
+ JAVA_HOME=`cygpath --$format "$JAVA_HOME"`
+ LCP_TEMP=`cygpath --path --unix "$LOCALCLASSPATH"`
+ LOCALCLASSPATH=`cygpath --path --$format "$LCP_TEMP"`
+ if [ -n "$CLASSPATH" ] ; then
+ CP_TEMP=`cygpath --path --unix "$CLASSPATH"`
+ CLASSPATH=`cygpath --path --$format "$CP_TEMP"`
+ fi
+ CYGHOME=`cygpath --$format "$HOME"`
fi
+# Show script help if requested
+if $show_help ; then
+ echo $0 '[script options] [options] [target [target2 [target3] ..]]'
+ echo 'Script Options:'
+ echo ' --help, --h print this message and ant help'
+ echo ' --noconfig suppress sourcing of /etc/ant.conf,'
+ echo ' $HOME/.ant/ant.conf, and $HOME/.antrc'
+ echo ' configuration files'
+ echo ' --usejikes enable use of jikes by default, unless'
+ echo ' set explicitly in configuration files'
+ echo ' --execdebug print ant exec line generated by this'
+ echo ' launch script'
+ echo ' '
+fi
+# add a second backslash to variables terminated by a backslash under cygwin
+if $cygwin; then
+ case "$ANT_HOME" in
+ *\\ )
+ ANT_HOME="$ANT_HOME\\"
+ ;;
+ esac
+ case "$CYGHOME" in
+ *\\ )
+ CYGHOME="$CYGHOME\\"
+ ;;
+ esac
+ case "$JIKESPATH" in
+ *\\ )
+ JIKESPATH="$JIKESPATH\\"
+ ;;
+ esac
+ case "$LOCALCLASSPATH" in
+ *\\ )
+ LOCALCLASSPATH="$LOCALCLASSPATH\\"
+ ;;
+ esac
+ case "$CLASSPATH" in
+ *\\ )
+ CLASSPATH="$CLASSPATH\\"
+ ;;
+ esac
+fi
+# Execute ant using eval/exec to preserve spaces in paths,
+# java options, and ant args
+ant_sys_opts=
if [ -n "$CYGHOME" ]; then
if [ -n "$JIKESPATH" ]; then
- JIKESPATH=`cygpath --path --windows "$JIKESPATH"`
- "$JAVACMD" -classpath "$LOCALCLASSPATH" -Dant.home="${ANT_HOME}" -Djikes.class.path="$JIKESPATH" -Dcygwin.user.home="$CYGHOME" $ANT_OPTS org.apache.tools.ant.Main $ANT_ARGS "$@"
+ ant_sys_opts="-Djikes.class.path=\"$JIKESPATH\" -Dcygwin.user.home=\"$CYGHOME\""
else
- "$JAVACMD" -classpath "$LOCALCLASSPATH" -Dant.home="${ANT_HOME}" -Dcygwin.user.home="$CYGHOME" $ANT_OPTS org.apache.tools.ant.Main $ANT_ARGS "$@"
+ ant_sys_opts="-Dcygwin.user.home=\"$CYGHOME\""
fi
else
if [ -n "$JIKESPATH" ]; then
- "$JAVACMD" -classpath "$LOCALCLASSPATH" -Dant.home="${ANT_HOME}" -Djikes.class.path="$JIKESPATH" $ANT_OPTS org.apache.tools.ant.Main $ANT_ARGS "$@"
- else
- "$JAVACMD" -classpath "$LOCALCLASSPATH" -Dant.home="${ANT_HOME}" $ANT_OPTS org.apache.tools.ant.Main $ANT_ARGS "$@"
+ ant_sys_opts="-Djikes.class.path=\"$JIKESPATH\""
fi
fi
-
+ant_exec_command="exec \"$JAVACMD\" $ANT_OPTS -classpath \"$LOCALCLASSPATH\" -Dant.home=\"$ANT_HOME\" -Dant.library.dir=\"$ANT_LIB\" $ant_sys_opts org.apache.tools.ant.launch.Launcher $ANT_ARGS -cp \"$CLASSPATH\" $ant_exec_args"
+if $ant_exec_debug ; then
+ echo $ant_exec_command
+fi
+eval $ant_exec_command
Modified: trunk/tools/bin/ant.bat
===================================================================
--- trunk/tools/bin/ant.bat 2007-07-30 12:43:44 UTC (rev 7841)
+++ trunk/tools/bin/ant.bat 2007-07-30 12:59:36 UTC (rev 7842)
@@ -1,17 +1,61 @@
@echo off
-REM Copyright (c) 2001-2002 The Apache Software Foundation. All rights
-REM reserved.
+REM Licensed to the Apache Software Foundation (ASF) under one or more
+REM contributor license agreements. See the NOTICE file distributed with
+REM this work for additional information regarding copyright ownership.
+REM The ASF licenses this file to You under the Apache License, Version 2.0
+REM (the "License"); you may not use this file except in compliance with
+REM the License. You may obtain a copy of the License at
+REM
+REM http://www.apache.org/licenses/LICENSE-2.0
+REM
+REM Unless required by applicable law or agreed to in writing, software
+REM distributed under the License is distributed on an "AS IS" BASIS,
+REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+REM See the License for the specific language governing permissions and
+REM limitations under the License.
+REM This is an inordinately troublesome piece of code, particularly because it
+REM tries to work on both Win9x and WinNT-based systems. If we could abandon '9x
+REM support, things would be much easier, but sadly, it is not yet time.
+REM Be cautious about editing this, and only add WinNT specific stuff in code that
+REM only runs on WinNT.
+
+if "%HOME%"=="" goto homeDrivePathPre
if exist "%HOME%\antrc_pre.bat" call "%HOME%\antrc_pre.bat"
+:homeDrivePathPre
+if "%HOMEDRIVE%%HOMEPATH%"=="" goto userProfilePre
+if "%HOMEDRIVE%%HOMEPATH%"=="%HOME%" goto userProfilePre
+if exist "%HOMEDRIVE%%HOMEPATH%\antrc_pre.bat" call "%HOMEDRIVE%%HOMEPATH%\antrc_pre.bat"
+
+:userProfilePre
+if "%USERPROFILE%"=="" goto alpha
+if "%USERPROFILE%"=="%HOME%" goto alpha
+if "%USERPROFILE%"=="%HOMEDRIVE%%HOMEPATH%" goto alpha
+if exist "%USERPROFILE%\antrc_pre.bat" call "%USERPROFILE%\antrc_pre.bat"
+
+:alpha
+
if "%OS%"=="Windows_NT" @setlocal
+if "%OS%"=="WINNT" @setlocal
+if "%ANT_HOME%"=="" goto setDefaultAntHome
+
+:stripAntHome
+if not _%ANT_HOME:~-1%==_\ goto checkClasspath
+set ANT_HOME=%ANT_HOME:~0,-1%
+goto stripAntHome
+
+:setDefaultAntHome
rem %~dp0 is expanded pathname of the current script under NT
-set DEFAULT_ANT_HOME=%~dp0..
+set ANT_HOME=%~dp0..
-if "%ANT_HOME%"=="" set ANT_HOME=%DEFAULT_ANT_HOME%
-set DEFAULT_ANT_HOME=
+:checkClasspath
+set _USE_CLASSPATH=yes
+rem CLASSPATH must not be used if it is equal to ""
+if "%CLASSPATH%"=="""" set _USE_CLASSPATH=no
+if "%CLASSPATH%"=="" set _USE_CLASSPATH=no
rem Slurp the command line arguments. This loop allows for an unlimited number
rem of arguments (up to the command line limit, anyway).
@@ -20,31 +64,48 @@
shift
:setupArgs
if ""%1""=="""" goto doneStart
+if ""%1""==""-noclasspath"" goto clearclasspath
set ANT_CMD_LINE_ARGS=%ANT_CMD_LINE_ARGS% %1
shift
goto setupArgs
-rem This label provides a place for the argument list loop to break out
+
+rem here is there is a -noclasspath in the options
+:clearclasspath
+set _USE_CLASSPATH=no
+shift
+goto setupArgs
+
+rem This label provides a place for the argument list loop to break out
rem and for NT handling to skip to.
+
:doneStart
+if _USE_CLASSPATH==no goto findAntHome
+
+:stripClasspath
+if not _%CLASSPATH:~-1%==_\ goto findAntHome
+set CLASSPATH=%CLASSPATH:~0,-1%
+goto stripClasspath
+
+:findAntHome
rem find ANT_HOME if it does not exist due to either an invalid value passed
rem by the user or the %0 problem on Windows 9x
-if exist "%ANT_HOME%" goto checkJava
+if exist "%ANT_HOME%\lib\ant.jar" goto checkJava
-rem check for ant in Program Files on system drive
-if not exist "%SystemDrive%\Program Files\ant" goto checkSystemDrive
-set ANT_HOME=%SystemDrive%\Program Files\ant
+rem check for ant in Program Files
+if not exist "%ProgramFiles%\ant" goto checkSystemDrive
+set ANT_HOME=%ProgramFiles%\ant
goto checkJava
:checkSystemDrive
rem check for ant in root directory of system drive
-if not exist %SystemDrive%\ant\nul goto checkCDrive
+if not exist %SystemDrive%\ant\lib\ant.jar goto checkCDrive
set ANT_HOME=%SystemDrive%\ant
goto checkJava
:checkCDrive
rem check for ant in C:\ant for Win9X users
-if not exist C:\ant\nul goto noAntHome
+if not exist C:\ant\lib\ant.jar goto noAntHome
set ANT_HOME=C:\ant
goto checkJava
@@ -53,43 +114,113 @@
goto end
:checkJava
-set LOCALCLASSPATH=%CLASSPATH%
-for %%i in ("%ANT_HOME%\lib\*.jar") do call "%ANT_HOME%\bin\lcp.bat" %%i
+set _JAVACMD=%JAVACMD%
if "%JAVA_HOME%" == "" goto noJavaHome
if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
-set _JAVACMD=%JAVA_HOME%\bin\java.exe
-if exist "%JAVA_HOME%\lib\tools.jar" call "%ANT_HOME%\bin\lcp.bat" "%JAVA_HOME%\lib\tools.jar"
-if exist "%JAVA_HOME%\lib\classes.zip" call "%ANT_HOME%\bin\lcp.bat" "%JAVA_HOME%\lib\classes.zip"
+if "%_JAVACMD%" == "" set _JAVACMD=%JAVA_HOME%\bin\java.exe
goto checkJikes
:noJavaHome
-set _JAVACMD=java.exe
-echo.
-echo Warning: JAVA_HOME environment variable is not set.
-echo If build fails because sun.* classes could not be found
-echo you will need to set the JAVA_HOME environment variable
-echo to the installation directory of java.
-echo.
+if "%_JAVACMD%" == "" set _JAVACMD=java.exe
:checkJikes
if not "%JIKESPATH%"=="" goto runAntWithJikes
:runAnt
-"%_JAVACMD%" -classpath "%LOCALCLASSPATH%" "-Dant.home=%ANT_HOME%" %ANT_OPTS% org.apache.tools.ant.Main %ANT_CMD_LINE_ARGS%
+if "%_USE_CLASSPATH%"=="no" goto runAntNoClasspath
+:runAntWithClasspath
+"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% -cp "%CLASSPATH%" %ANT_CMD_LINE_ARGS%
+rem Check the error code of the Ant build
+if not "%OS%"=="Windows_NT" goto onError
+set ANT_ERROR=%ERRORLEVEL%
goto end
+:runAntNoClasspath
+"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% %ANT_CMD_LINE_ARGS%
+rem Check the error code of the Ant build
+if not "%OS%"=="Windows_NT" goto onError
+set ANT_ERROR=%ERRORLEVEL%
+goto end
+
:runAntWithJikes
-"%_JAVACMD%" -classpath "%LOCALCLASSPATH%" "-Dant.home=%ANT_HOME%" "-Djikes.class.path=%JIKESPATH%" %ANT_OPTS% org.apache.tools.ant.Main %ANT_CMD_LINE_ARGS%
+
+if not _%JIKESPATH:~-1%==_\ goto checkJikesAndClasspath
+set JIKESPATH=%JIKESPATH:~0,-1%
+goto runAntWithJikes
+
+:checkJikesAndClasspath
+
+if "%_USE_CLASSPATH%"=="no" goto runAntWithJikesNoClasspath
+
+:runAntWithJikesAndClasspath
+"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" "-Djikes.class.path=%JIKESPATH%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% -cp "%CLASSPATH%" %ANT_CMD_LINE_ARGS%
+rem Check the error code of the Ant build
+if not "%OS%"=="Windows_NT" goto onError
+set ANT_ERROR=%ERRORLEVEL%
goto end
+:runAntWithJikesNoClasspath
+"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" "-Djikes.class.path=%JIKESPATH%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% %ANT_CMD_LINE_ARGS%
+rem Check the error code of the Ant build
+if not "%OS%"=="Windows_NT" goto onError
+set ANT_ERROR=%ERRORLEVEL%
+goto end
+
+:onError
+rem Windows 9x way of checking the error code. It matches via brute force.
+for %%i in (1 10 100) do set err%%i=
+for %%i in (0 1 2) do if errorlevel %%i00 set err100=%%i
+if %err100%==2 goto onError200
+if %err100%==0 set err100=
+for %%i in (0 1 2 3 4 5 6 7 8 9) do if errorlevel %err100%%%i0 set err10=%%i
+if "%err100%"=="" if %err10%==0 set err10=
+:onError1
+for %%i in (0 1 2 3 4 5 6 7 8 9) do if errorlevel %err100%%err10%%%i set err1=%%i
+goto onErrorEnd
+:onError200
+for %%i in (0 1 2 3 4 5) do if errorlevel 2%%i0 set err10=%%i
+if err10==5 for %%i in (0 1 2 3 4 5) do if errorlevel 25%%i set err1=%%i
+if not err10==5 goto onError1
+:onErrorEnd
+set ANT_ERROR=%err100%%err10%%err1%
+for %%i in (1 10 100) do set err%%i=
+
:end
-set LOCALCLASSPATH=
-set _JAVACMD=
-set ANT_CMD_LINE_ARGS=
+rem bug ID 32069: resetting an undefined env variable changes the errorlevel.
+if not "%_JAVACMD%"=="" set _JAVACMD=
+if not "%_ANT_CMD_LINE_ARGS%"=="" set ANT_CMD_LINE_ARGS=
+if "%ANT_ERROR%"=="0" goto mainEnd
+
+rem Set the return code if we are not in NT. We can only set
+rem a value of 1, but it's better than nothing.
+if not "%OS%"=="Windows_NT" echo 1 > nul | choice /n /c:1
+
+rem Set the ERRORLEVEL if we are running NT.
+if "%OS%"=="Windows_NT" color 00
+
+goto omega
+
+:mainEnd
+
+rem If there were no errors, we run the post script.
if "%OS%"=="Windows_NT" @endlocal
+if "%OS%"=="WINNT" @endlocal
-:mainEnd
+if "%HOME%"=="" goto homeDrivePathPost
if exist "%HOME%\antrc_post.bat" call "%HOME%\antrc_post.bat"
+:homeDrivePathPost
+if "%HOMEDRIVE%%HOMEPATH%"=="" goto userProfilePost
+if "%HOMEDRIVE%%HOMEPATH%"=="%HOME%" goto userProfilePost
+if exist "%HOMEDRIVE%%HOMEPATH%\antrc_post.bat" call "%HOMEDRIVE%%HOMEPATH%\antrc_post.bat"
+
+:userProfilePost
+if "%USERPROFILE%"=="" goto omega
+if "%USERPROFILE%"=="%HOME%" goto omega
+if "%USERPROFILE%"=="%HOMEDRIVE%%HOMEPATH%" goto omega
+if exist "%USERPROFILE%\antrc_post.bat" call "%USERPROFILE%\antrc_post.bat"
+
+:omega
+
Modified: trunk/tools/bin/antRun
===================================================================
--- trunk/tools/bin/antRun 2007-07-30 12:43:44 UTC (rev 7841)
+++ trunk/tools/bin/antRun 2007-07-30 12:59:36 UTC (rev 7842)
@@ -1,7 +1,19 @@
#! /bin/sh
-# Copyright (c) 2001-2002 The Apache Software Foundation. All rights
-# reserved.
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
# Args: DIR command
cd "$1"
Modified: trunk/tools/bin/antRun.bat
===================================================================
--- trunk/tools/bin/antRun.bat 2007-07-30 12:43:44 UTC (rev 7841)
+++ trunk/tools/bin/antRun.bat 2007-07-30 12:59:36 UTC (rev 7842)
@@ -1,19 +1,37 @@
@echo off
-REM Copyright (c) 2001-2002 The Apache Software Foundation. All rights
-REM reserved.
+REM Licensed to the Apache Software Foundation (ASF) under one or more
+REM contributor license agreements. See the NOTICE file distributed with
+REM this work for additional information regarding copyright ownership.
+REM The ASF licenses this file to You under the Apache License, Version 2.0
+REM (the "License"); you may not use this file except in compliance with
+REM the License. You may obtain a copy of the License at
+REM
+REM http://www.apache.org/licenses/LICENSE-2.0
+REM
+REM Unless required by applicable law or agreed to in writing, software
+REM distributed under the License is distributed on an "AS IS" BASIS,
+REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+REM See the License for the specific language governing permissions and
+REM limitations under the License.
if "%OS%"=="Windows_NT" @setlocal
+if "%OS%"=="WINNT" @setlocal
if ""%1""=="""" goto runCommand
rem Change drive and directory to %1
-if "%OS%"=="Windows_NT" cd /d ""%1""
-if not "%OS%"=="Windows_NT" cd ""%1""
+if "%OS%"=="Windows_NT" goto nt_cd
+if "%OS%"=="WINNT" goto nt_cd
+cd ""%1""
+goto end_cd
+:nt_cd
+cd /d ""%1""
+:end_cd
shift
rem Slurp the command line arguments. This loop allows for an unlimited number
-rem of agruments (up to the command line limit, anyway).
+rem of arguments (up to the command line limit, anyway).
set ANT_RUN_CMD=%1
if ""%1""=="""" goto runCommand
shift
@@ -28,4 +46,5 @@
%ANT_RUN_CMD%
if "%OS%"=="Windows_NT" @endlocal
+if "%OS%"=="WINNT" @endlocal
Modified: trunk/tools/bin/antRun.pl
===================================================================
--- trunk/tools/bin/antRun.pl 2007-07-30 12:43:44 UTC (rev 7841)
+++ trunk/tools/bin/antRun.pl 2007-07-30 12:59:36 UTC (rev 7842)
@@ -1,4 +1,20 @@
#!/usr/bin/perl
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
#######################################################################
#
# antRun.pl
@@ -7,7 +23,6 @@
# this is akin to antRun.bat, and antRun the SH script
#
# created: 2001-10-18
-# last modified: 2001-11-13
# author: Jeff Tulley jtulley(a)novell.com
#######################################################################
#be fussy about variables
Modified: trunk/tools/bin/complete-ant-cmd.pl
===================================================================
--- trunk/tools/bin/complete-ant-cmd.pl 2007-07-30 12:43:44 UTC (rev 7841)
+++ trunk/tools/bin/complete-ant-cmd.pl 2007-07-30 12:59:36 UTC (rev 7842)
@@ -1,8 +1,20 @@
#!/usr/bin/perl
#
-# Copyright (c) 2001 The Apache Software Foundation. All rights
-# reserved.
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
# A script to allow Bash or Z-Shell to complete an Ant command-line.
#
# To install for Bash 2.0 or better, add the following to ~/.bashrc:
Modified: trunk/tools/bin/lcp.bat
===================================================================
--- trunk/tools/bin/lcp.bat 2007-07-30 12:43:44 UTC (rev 7841)
+++ trunk/tools/bin/lcp.bat 2007-07-30 12:59:36 UTC (rev 7842)
@@ -1,5 +1,20 @@
-REM Copyright (c) 2001-2002 The Apache Software Foundation. All rights
-REM reserved.
+REM
+REM Licensed to the Apache Software Foundation (ASF) under one or more
+REM contributor license agreements. See the NOTICE file distributed with
+REM this work for additional information regarding copyright ownership.
+REM The ASF licenses this file to You under the Apache License, Version 2.0
+REM (the "License"); you may not use this file except in compliance with
+REM the License. You may obtain a copy of the License at
+REM
+REM http://www.apache.org/licenses/LICENSE-2.0
+REM
+REM Unless required by applicable law or agreed to in writing, software
+REM distributed under the License is distributed on an "AS IS" BASIS,
+REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+REM See the License for the specific language governing permissions and
+REM limitations under the License.
+REM
+REM
set _CLASSPATHCOMPONENT=%1
if ""%1""=="""" goto gotAllArgs
@@ -12,5 +27,5 @@
goto argCheck
:gotAllArgs
-set LOCALCLASSPATH=%_CLASSPATHCOMPONENT%;%LOCALCLASSPATH%
+set LOCALCLASSPATH=%LOCALCLASSPATH%;%_CLASSPATHCOMPONENT%
Modified: trunk/tools/bin/runant.pl
===================================================================
--- trunk/tools/bin/runant.pl 2007-07-30 12:43:44 UTC (rev 7841)
+++ trunk/tools/bin/runant.pl 2007-07-30 12:59:36 UTC (rev 7842)
@@ -1,8 +1,20 @@
#!/usr/bin/perl
#
-# Copyright (c) 2001-2002 The Apache Software Foundation. All rights
-# reserved.
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
#######################################################################
#
# runant.pl
@@ -18,7 +30,6 @@
# the code is not included.
#
# created: 2000-8-24
-# last modified: 2000-8-24
# author: Steve Loughran steve_l(a)sourceforge.net
#######################################################################
#
@@ -39,7 +50,7 @@
#use warnings;
#and set $debug to 1 to turn on trace info
-my $debug=0;
+my $debug=1;
#######################################################################
#
@@ -61,6 +72,8 @@
$onnetware = 1;
}
+my $oncygwin = ($^O eq "cygwin");
+
#ISSUE: what java wants to split up classpath varies from platform to platform
#and perl is not too hot at hinting which box it is on.
#here I assume ":" 'cept on win32, dos, and netware. Add extra tests here as needed.
@@ -72,53 +85,7 @@
}
#build up standard classpath
-my $localpath=$ENV{CLASSPATH};
-if ($localpath eq "")
- {
- print "warning: no initial classpath\n" if ($debug);
- $localpath="";
- }
-if ($onnetware == 1)
-{
-# avoid building a command line bigger than 512 characters - make localpath
-# only include the "extra" stuff, and add in the system classpath as an expanded
-# variable.
- $localpath="";
-}
-
-#add jar files. I am sure there is a perl one liner to do this.
-my $jarpattern="$HOME/lib/*.jar";
-my @jarfiles =glob($jarpattern);
-print "jarfiles=@jarfiles\n" if ($debug);
-my $jar;
-foreach $jar (@jarfiles )
- {
- $localpath.="$s$jar";
- }
-
-#if Java home is defined, look for tools.jar & classes.zip and add to classpath
-my $JAVA_HOME = $ENV{JAVA_HOME};
-if ($JAVA_HOME ne "")
- {
- my $tools="$JAVA_HOME/lib/tools.jar";
- if (-e "$tools")
- {
- $localpath .= "$s$tools";
- }
- my $classes="$JAVA_HOME/lib/classes.zip";
- if (-e $classes)
- {
- $localpath .= "$s$classes";
- }
- }
-else
- {
- print "\n\nWarning: JAVA_HOME environment variable is not set.\n".
- "If the build fails because sun.* classes could not be found\n".
- "you will need to set the JAVA_HOME environment variable\n".
- "to the installation directory of java\n";
- }
-
+my $localpath = "$HOME/lib/ant-launcher.jar";
#set JVM options and Ant arguments, if any
my @ANT_OPTS=split(" ", $ENV{ANT_OPTS});
my @ANT_ARGS=split(" ", $ENV{ANT_ARGS});
@@ -131,22 +98,46 @@
#construct arguments to java
my @ARGS;
-if ($onnetware == 1)
-{
-# make classpath literally $CLASSPATH; and then the contents of $localpath
-# this is to avoid pushing us over the 512 character limit
-# even skip the ; - that is already in $localpath
- push @ARGS, "-classpath", "\$CLASSPATH$localpath";
+push @ARGS, @ANT_OPTS;
+
+my $CYGHOME = "";
+
+my $classpath=$ENV{CLASSPATH};
+if ($oncygwin == 1) {
+ $localpath = `cygpath --path --windows $localpath`;
+ chomp ($localpath);
+ if (! $classpath eq "")
+ {
+ $classpath = `cygpath --path --windows "$classpath"`;
+ chomp ($classpath);
+ }
+ $HOME = `cygpath --path --windows $HOME`;
+ chomp ($HOME);
+ $CYGHOME = `cygpath --path --windows $ENV{HOME}`;
+ chomp ($CYGHOME);
}
-else
+push @ARGS, "-classpath", "$localpath";
+push @ARGS, "-Dant.home=$HOME";
+if ( ! $CYGHOME eq "" )
{
- push @ARGS, "-classpath", "$localpath";
+ push @ARGS, "-Dcygwin.user.home=\"$CYGHOME\""
}
-push @ARGS, "-Dant.home=$HOME";
-push @ARGS, @ANT_OPTS;
-push @ARGS, "org.apache.tools.ant.Main", @ANT_ARGS;
+push @ARGS, "org.apache.tools.ant.launch.Launcher", @ANT_ARGS;
push @ARGS, @ARGV;
-
+if (! $classpath eq "")
+{
+ if ($onnetware == 1)
+ {
+ # make classpath literally $CLASSPATH
+ # this is to avoid pushing us over the 512 character limit
+ # even skip the ; - that is already in $localpath
+ push @ARGS, "-lib", "\$CLASSPATH";
+ }
+ else
+ {
+ push @ARGS, "-lib", "$classpath";
+ }
+}
print "\n $JAVACMD @ARGS\n\n" if ($debug);
my $returnValue = system $JAVACMD, @ARGS;
Modified: trunk/tools/bin/runant.py
===================================================================
--- trunk/tools/bin/runant.py 2007-07-30 12:43:44 UTC (rev 7841)
+++ trunk/tools/bin/runant.py 2007-07-30 12:59:36 UTC (rev 7842)
@@ -1,23 +1,35 @@
#!/usr/bin/python
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
"""
runant.py
- This script is a translation of the runant.pl written by Steve Loughran.
- It runs ant with/out arguments, it should be quite portable (thanks to
- the python os library)
- This script has been tested with Python2.0/Win2K
+ This script is a translation of the runant.pl written by Steve Loughran.
+ It runs ant with/out arguments, it should be quite portable (thanks to
+ the python os library)
+ This script has been tested with Python2.0/Win2K
- Copyright (c) 2001 The Apache Software Foundation. All rights
- reserved.
-
created: 2001-04-11
author: Pierre Dittgen pierre.dittgen(a)criltelecom.com
Assumptions:
- the "java" executable/script is on the command path
- - ANT_HOME has been set
"""
import os, os.path, string, sys
@@ -25,75 +37,66 @@
debug = 0
#######################################################################
-#
-# check to make sure environment is setup
-#
-if not os.environ.has_key('ANT_HOME'):
- print '\n\nANT_HOME *MUST* be set!\n\n'
- sys.exit(1)
-else:
- ANT_HOME = os.environ['ANT_HOME']
-if not os.environ.has_key('JAVACMD'):
- JAVACMD = 'java'
+# If ANT_HOME is not set default to script's parent directory
+if os.environ.has_key('ANT_HOME'):
+ ANT_HOME = os.environ['ANT_HOME']
else:
- JAVACMD = os.environ['JAVACMD']
+ ANT_HOME = os.path.dirname(os.path.dirname(os.path.abspath(sys.argv[0])))
-# Sets the separator char for CLASSPATH
-SEPARATOR = ':'
-if os.name == 'dos' or os.name == 'nt':
- SEPARATOR = ';'
+# set ANT_LIB location
+ANT_LIB = os.path.join(ANT_HOME, 'lib')
-# Build up standard classpath
-localpath = ''
-if os.environ.has_key('CLASSPATH'):
- localpath = os.environ['CLASSPATH']
+# set JAVACMD (check variables JAVACMD and JAVA_HOME)
+JAVACMD = None
+if not os.environ.has_key('JAVACMD'):
+ if os.environ.has_key('JAVA_HOME'):
+ if not os.path.exists(os.environ['JAVA_HOME']):
+ print "Warning: JAVA_HOME is not defined correctly."
+ else:
+ JAVACMD = os.path.join(os.environ['JAVA_HOME'], 'bin', 'java')
+ else:
+ print "Warning: JAVA_HOME not set."
else:
- if debug:
- print 'Warning: no initial classpath\n'
+ JAVACMD = os.environ['JAVACMD']
+if not JAVACMD:
+ JAVACMD = 'java'
-# Add jar files
-LIBDIR = os.path.join(ANT_HOME, 'lib')
-jarfiles = []
-for file in os.listdir(LIBDIR):
- if file[-4:] == '.jar':
- jarfiles.append(os.path.join(LIBDIR,file))
-if debug:
- print 'Jar files:'
- for jar in jarfiles:
- print jar
-localpath = localpath + SEPARATOR + string.join(jarfiles, SEPARATOR)
+launcher_jar = os.path.join(ANT_LIB, 'ant-launcher.jar')
+if not os.path.exists(launcher_jar):
+ print 'Unable to locate ant-launcher.jar. Expected to find it in %s' % \
+ ANT_LIB
-# If JAVA_HOME is defined, look for tools.jar & classes.zip
-# and add to classpath
-if os.environ.has_key('JAVA_HOME') and os.environ['JAVA_HOME'] != '':
- JAVA_HOME = os.environ['JAVA_HOME']
- TOOLS = os.path.join(JAVA_HOME, os.path.join('lib', 'tools.jar'))
- if os.path.exists(TOOLS):
- localpath = localpath + SEPARATOR + TOOLS
- CLASSES = os.path.join(JAVA_HOME, os.path.join('lib', 'classes.zip'))
- if os.path.exists(CLASSES):
- localpath = localpath + SEPARATOR + CLASSES
-else:
- print '\n\nWarning: JAVA_HOME environment variable is not set.\n', \
- 'If the build fails because sun.* classes could not be found\n', \
- 'you will need to set the JAVA_HOME environment variable\n', \
- 'to the installation directory of java\n'
+# Build up standard classpath (LOCALCLASSPATH)
+LOCALCLASSPATH = launcher_jar
+if os.environ.has_key('LOCALCLASSPATH'):
+ LOCALCLASSPATH += os.pathsep + os.environ['LOCALCLASSPATH']
-# Jikes
-ANT_OPTS = []
+ANT_OPTS = ""
if os.environ.has_key('ANT_OPTS'):
- ANT_OPTS = string.split(os.environ['ANT_OPTS'])
+ ANT_OPTS = os.environ['ANT_OPTS']
+
+OPTS = ""
if os.environ.has_key('JIKESPATH'):
- ANT_OPTS.append('-Djikes.class.path=' + os.environ['JIKESPATH'])
+ OPTS = '-Djikes.class.path=\"%s\"' % os.environ['JIKESPATH']
+ANT_ARGS = ""
+if os.environ.has_key('ANT_ARGS'):
+ ANT_ARGS = os.environ['ANT_ARGS']
+
+CLASSPATH = ""
+if os.environ.has_key('CLASSPATH'):
+ CLASSPATH = os.environ['CLASSPATH']
+
# Builds the commandline
-cmdline = '%s -classpath %s -Dant.home=%s %s org.apache.tools.ant.Main %s' \
- % (JAVACMD, localpath, ANT_HOME, string.join(ANT_OPTS,' '), \
- string.join(sys.argv[1:], ' '))
+cmdline = ('%s %s -classpath %s -Dant.home=%s %s ' + \
+ 'org.apache.tools.ant.launch.Launcher %s -lib %s %s') \
+ % (JAVACMD, ANT_OPTS, LOCALCLASSPATH, ANT_HOME, OPTS, ANT_ARGS, \
+ CLASSPATH, string.join(sys.argv[1:], ' '))
if debug:
- print '\n%s\n\n' % (cmdline)
+ print '\n%s\n\n' % (cmdline)
+sys.stdout.flush()
# Run the biniou!
os.system(cmdline)
Modified: trunk/tools/etc/changelog.xsl
===================================================================
--- trunk/tools/etc/changelog.xsl 2007-07-30 12:43:44 UTC (rev 7841)
+++ trunk/tools/etc/changelog.xsl 2007-07-30 12:59:36 UTC (rev 7842)
@@ -5,58 +5,22 @@
version='1.0'>
<!--
- The Apache Software License, Version 1.1
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
- Copyright (c) 2002 The Apache Software Foundation. All rights
- reserved.
+ http://www.apache.org/licenses/LICENSE-2.0
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- 3. The end-user documentation included with the redistribution, if
- any, must include the following acknowlegement:
- "This product includes software developed by the
- Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowlegement may appear in the software itself,
- if and wherever such third-party acknowlegements normally appear.
-
- 4. The names "The Jakarta Project", "Ant", and "Apache Software
- Foundation" must not be used to endorse or promote products derived
- from this software without prior written permission. For written
- permission, please contact apache(a)apache.org.
-
- 5. Products derived from this software may not be called "Apache"
- nor may "Apache" appear in their names without prior written
- permission of the Apache Group.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- SUCH DAMAGE.
- ====================================================================
-
- This software consists of voluntary contributions made by many
- individuals on behalf of the Apache Software Foundation. For more
- information on the Apache Software Foundation, please see
- <http://www.apache.org/>.
- -->
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
<xsl:param name="title"/>
<xsl:param name="module"/>
<xsl:param name="cvsweb"/>
@@ -93,13 +57,13 @@
td {
padding-left: 20px;
}
- .dateAndAuthor {
+ .dateAndAuthor {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-weight: bold;
text-align: left;
background: #a6caf0;
padding-left: 3px;
- }
+ }
a {
color: #000000;
}
@@ -112,7 +76,7 @@
<h1>
<a name="top"><xsl:value-of select="$title"/></a>
</h1>
- <p style="text-align: right">Designed for use with <a href="http://jakarta.apache.org/ant/">Ant</a>.</p>
+ <p style="text-align: right">Designed for use with <a href="http://ant.apache.org/">Apache Ant</a>.</p>
<hr/>
<table border="0" width="100%" cellspacing="1">
Copied: trunk/tools/etc/checkstyle (from rev 7810, branches/JBoss_Portal_Branch_2_6/tools/etc/checkstyle)
Deleted: trunk/tools/etc/checkstyle/checkstyle-frames.xsl
===================================================================
--- branches/JBoss_Portal_Branch_2_6/tools/etc/checkstyle/checkstyle-frames.xsl 2007-07-17 22:53:37 UTC (rev 7810)
+++ trunk/tools/etc/checkstyle/checkstyle-frames.xsl 2007-07-30 12:59:36 UTC (rev 7842)
@@ -1,293 +0,0 @@
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
- xmlns:lxslt="http://xml.apache.org/xslt"
- xmlns:redirect="org.apache.xalan.lib.Redirect"
- extension-element-prefixes="redirect">
-
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
- <xsl:output method="html" indent="yes" encoding="US-ASCII"/>
- <xsl:decimal-format decimal-separator="." grouping-separator="," />
-
- <xsl:param name="output.dir" select="'.'"/>
- <xsl:param name="basedir" select="'.'"/>
-
- <xsl:template match="checkstyle">
- <!-- create the index.html -->
- <redirect:write file="{$output.dir}/index.html">
- <xsl:call-template name="index.html"/>
- </redirect:write>
-
- <!-- create the stylesheet.css -->
- <redirect:write file="{$output.dir}/stylesheet.css">
- <xsl:call-template name="stylesheet.css"/>
- </redirect:write>
-
- <!-- create the overview-summary.html at the root -->
- <redirect:write file="{$output.dir}/overview-frame.html">
- <xsl:apply-templates select="." mode="overview"/>
- </redirect:write>
-
- <!-- create the all-classes.html at the root -->
- <redirect:write file="{$output.dir}/allclasses-frame.html">
- <xsl:apply-templates select="." mode="all.classes"/>
- </redirect:write>
-
- <!-- process all files -->
- <xsl:apply-templates select="file[count(error) != 0]"/>
- </xsl:template>
-
- <xsl:template name="index.html">
- <html>
- <head>
- <title>CheckStyle Audit</title>
- </head>
- <frameset cols="20%,80%">
- <frame src="allclasses-frame.html" name="fileListFrame"/>
- <frame src="overview-frame.html" name="fileFrame"/>
- </frameset>
- <noframes>
- <h2>Frame Alert</h2>
- <p>
- This document is designed to be viewed using the frames feature.
- If you see this message, you are using a non-frame-capable web client.
- </p>
- </noframes>
- </html>
- </xsl:template>
-
- <xsl:template name="pageHeader">
- <table border="0" cellpadding="0" cellspacing="0" width="100%">
- <tr>
- <td class="text-align:right"><h2>CheckStyle Audit</h2></td>
- </tr>
- <tr>
- <td class="text-align:right">Designed for use with
- <a href='http://checkstyle.sourceforge.net/'>CheckStyle</a> and
- <a href='http://ant.apache.org/'>Ant</a>.</td>
- </tr>
- </table>
- <hr size="1"/>
- </xsl:template>
-
- <xsl:template match="checkstyle" mode="overview">
- <html>
- <head>
- <link rel="stylesheet" type="text/css" href="stylesheet.css"/>
- </head>
- <body>
- <!-- page header -->
- <xsl:call-template name="pageHeader"/>
-
- <!-- Summary part -->
- <xsl:apply-templates select="." mode="summary"/>
- <hr size="1" width="100%" align="left"/>
-
- <!-- File list part -->
- <xsl:apply-templates select="." mode="filelist"/>
- </body>
- </html>
- </xsl:template>
-
- <xsl:template name="stylesheet.css">
- .bannercell {
- border: 0px;
- padding: 0px;
- }
- body {
- margin-left: 10;
- margin-right: 10;
- font:normal 80% arial,helvetica,sanserif;
- background-color:#FFFFFF;
- color:#000000;
- }
- .oddrow td {
- background: #efefef;
- }
- .evenrow td {
- background: #fff;
- }
- th, td {
- text-align: left;
- vertical-align: top;
- }
- th {
- font-weight:bold;
- background: #ccc;
- color: black;
- }
- table, th, td {
- font-size:100%;
- border: none
- }
- table.log tr td, tr th {
-
- }
- h2 {
- font-weight:bold;
- font-size:140%;
- margin-bottom: 5;
- }
- h3 {
- font-size:100%;
- font-weight:bold;
- background: #525D76;
- color: white;
- text-decoration: none;
- padding: 5px;
- margin-right: 2px;
- margin-left: 2px;
- margin-bottom: 0;
- }
- </xsl:template>
-
- <!--
- Creates an all-classes.html file that contains a link to all files.
- -->
- <xsl:template match="checkstyle" mode="all.classes">
- <html>
- <head>
- <link rel="stylesheet" type="text/css" href="stylesheet.css"/>
- </head>
- <body>
- <h2>Files</h2>
- <p>
- <table width="100%">
- <!-- For each file create its part -->
- <xsl:apply-templates select="file[count(error) != 0]" mode="all.classes">
- <xsl:sort select="substring-after(@name, $basedir)"/>
- </xsl:apply-templates>
- </table>
- </p>
- </body>
- </html>
- </xsl:template>
-
- <xsl:template match="checkstyle" mode="filelist">
- <h3>Files</h3>
- <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
- <tr>
- <th>Name</th>
- <th>Errors</th>
- </tr>
- <xsl:apply-templates select="file[count(error) != 0]" mode="filelist">
- <xsl:sort select="count(error)" order="descending" data-type="number"/>
- </xsl:apply-templates>
- </table>
- </xsl:template>
-
- <xsl:template match="file" mode="filelist">
- <tr>
- <xsl:call-template name="alternated-row"/>
- <td nowrap="nowrap">
- <a>
- <xsl:attribute name="href">
- <xsl:text>files/</xsl:text><xsl:value-of select="substring-after(@name, $basedir)"/><xsl:text>.html</xsl:text>
- </xsl:attribute>
- <xsl:value-of select="substring-after(@name, $basedir)"/>
- </a>
- </td>
- <td><xsl:value-of select="count(error)"/></td>
- </tr>
- </xsl:template>
-
- <xsl:template match="file" mode="all.classes">
- <tr>
- <td nowrap="nowrap">
- <a target="fileFrame">
- <xsl:attribute name="href">
- <xsl:text>files/</xsl:text><xsl:value-of select="substring-after(@name, $basedir)"/><xsl:text>.html</xsl:text>
- </xsl:attribute>
- <xsl:value-of select="substring-after(@name, $basedir)"/>
- </a>
- </td>
- </tr>
- </xsl:template>
-
- <!--
- transform string like a/b/c to ../../../
- @param path the path to transform into a descending directory path
- -->
- <xsl:template name="path">
- <xsl:param name="path"/>
- <xsl:if test="contains($path,'/')">
- <xsl:text>../</xsl:text>
- <xsl:call-template name="path">
- <xsl:with-param name="path"><xsl:value-of select="substring-after($path,'/')"/></xsl:with-param>
- </xsl:call-template>
- </xsl:if>
- <xsl:if test="not(contains($path,'/')) and not($path = '')">
- <xsl:text>../</xsl:text>
- </xsl:if>
- </xsl:template>
-
- <xsl:template match="file">
- <redirect:write file="{$output.dir}/files/{substring-after(@name, $basedir)}.html">
- <html>
- <head>
- <link rel="stylesheet" type="text/css">
- <xsl:attribute name="href"><xsl:call-template name="path"><xsl:with-param name="path" select="substring-after(@name, $basedir)"/></xsl:call-template><xsl:text>stylesheet.css</xsl:text></xsl:attribute>
- </link>
- </head>
- <body>
- <xsl:call-template name="pageHeader"/>
- <h3>File <xsl:value-of select="substring-after(@name, $basedir)"/></h3>
- <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
- <tr>
- <th>Error Description</th>
- <th>Line:Column</th>
- </tr>
- <xsl:for-each select="error">
- <tr>
- <xsl:call-template name="alternated-row"/>
- <td><a title="{@source}"><xsl:value-of select="@message"/></a></td>
- <td align="center"><xsl:value-of select="@line"/><xsl:if test="@column">:<xsl:value-of select="@column"/></xsl:if></td>
- </tr>
- </xsl:for-each>
- </table>
- </body>
- </html>
- </redirect:write>
- </xsl:template>
-
- <xsl:template match="checkstyle" mode="summary">
- <h3>Summary</h3>
- <xsl:variable name="fileCount" select="count(file)"/>
- <xsl:variable name="errorCount" select="count(file/error)"/>
- <xsl:variable name="fileErrorCount" select="count(file[count(error) != 0])"/>
- <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
- <tr>
- <th>Total Files</th>
- <th>Files With Errors</th>
- <th>Errors</th>
- </tr>
- <tr>
- <xsl:call-template name="alternated-row"/>
- <td><xsl:value-of select="$fileCount"/></td>
- <td><xsl:value-of select="$fileErrorCount"/></td>
- <td><xsl:value-of select="$errorCount"/></td>
- </tr>
- </table>
- </xsl:template>
-
- <xsl:template name="alternated-row">
- <xsl:attribute name="class">
- <xsl:if test="position() mod 2 = 1">oddrow</xsl:if>
- <xsl:if test="position() mod 2 = 0">evenrow</xsl:if>
- </xsl:attribute>
- </xsl:template>
-</xsl:stylesheet>
\ No newline at end of file
Copied: trunk/tools/etc/checkstyle/checkstyle-frames.xsl (from rev 7810, branches/JBoss_Portal_Branch_2_6/tools/etc/checkstyle/checkstyle-frames.xsl)
===================================================================
--- trunk/tools/etc/checkstyle/checkstyle-frames.xsl (rev 0)
+++ trunk/tools/etc/checkstyle/checkstyle-frames.xsl 2007-07-30 12:59:36 UTC (rev 7842)
@@ -0,0 +1,293 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+ xmlns:lxslt="http://xml.apache.org/xslt"
+ xmlns:redirect="org.apache.xalan.lib.Redirect"
+ extension-element-prefixes="redirect">
+
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+ <xsl:output method="html" indent="yes" encoding="US-ASCII"/>
+ <xsl:decimal-format decimal-separator="." grouping-separator="," />
+
+ <xsl:param name="output.dir" select="'.'"/>
+ <xsl:param name="basedir" select="'.'"/>
+
+ <xsl:template match="checkstyle">
+ <!-- create the index.html -->
+ <redirect:write file="{$output.dir}/index.html">
+ <xsl:call-template name="index.html"/>
+ </redirect:write>
+
+ <!-- create the stylesheet.css -->
+ <redirect:write file="{$output.dir}/stylesheet.css">
+ <xsl:call-template name="stylesheet.css"/>
+ </redirect:write>
+
+ <!-- create the overview-summary.html at the root -->
+ <redirect:write file="{$output.dir}/overview-frame.html">
+ <xsl:apply-templates select="." mode="overview"/>
+ </redirect:write>
+
+ <!-- create the all-classes.html at the root -->
+ <redirect:write file="{$output.dir}/allclasses-frame.html">
+ <xsl:apply-templates select="." mode="all.classes"/>
+ </redirect:write>
+
+ <!-- process all files -->
+ <xsl:apply-templates select="file[count(error) != 0]"/>
+ </xsl:template>
+
+ <xsl:template name="index.html">
+ <html>
+ <head>
+ <title>CheckStyle Audit</title>
+ </head>
+ <frameset cols="20%,80%">
+ <frame src="allclasses-frame.html" name="fileListFrame"/>
+ <frame src="overview-frame.html" name="fileFrame"/>
+ </frameset>
+ <noframes>
+ <h2>Frame Alert</h2>
+ <p>
+ This document is designed to be viewed using the frames feature.
+ If you see this message, you are using a non-frame-capable web client.
+ </p>
+ </noframes>
+ </html>
+ </xsl:template>
+
+ <xsl:template name="pageHeader">
+ <table border="0" cellpadding="0" cellspacing="0" width="100%">
+ <tr>
+ <td class="text-align:right"><h2>CheckStyle Audit</h2></td>
+ </tr>
+ <tr>
+ <td class="text-align:right">Designed for use with
+ <a href='http://checkstyle.sourceforge.net/'>CheckStyle</a> and
+ <a href='http://ant.apache.org/'>Ant</a>.</td>
+ </tr>
+ </table>
+ <hr size="1"/>
+ </xsl:template>
+
+ <xsl:template match="checkstyle" mode="overview">
+ <html>
+ <head>
+ <link rel="stylesheet" type="text/css" href="stylesheet.css"/>
+ </head>
+ <body>
+ <!-- page header -->
+ <xsl:call-template name="pageHeader"/>
+
+ <!-- Summary part -->
+ <xsl:apply-templates select="." mode="summary"/>
+ <hr size="1" width="100%" align="left"/>
+
+ <!-- File list part -->
+ <xsl:apply-templates select="." mode="filelist"/>
+ </body>
+ </html>
+ </xsl:template>
+
+ <xsl:template name="stylesheet.css">
+ .bannercell {
+ border: 0px;
+ padding: 0px;
+ }
+ body {
+ margin-left: 10;
+ margin-right: 10;
+ font:normal 80% arial,helvetica,sanserif;
+ background-color:#FFFFFF;
+ color:#000000;
+ }
+ .oddrow td {
+ background: #efefef;
+ }
+ .evenrow td {
+ background: #fff;
+ }
+ th, td {
+ text-align: left;
+ vertical-align: top;
+ }
+ th {
+ font-weight:bold;
+ background: #ccc;
+ color: black;
+ }
+ table, th, td {
+ font-size:100%;
+ border: none
+ }
+ table.log tr td, tr th {
+
+ }
+ h2 {
+ font-weight:bold;
+ font-size:140%;
+ margin-bottom: 5;
+ }
+ h3 {
+ font-size:100%;
+ font-weight:bold;
+ background: #525D76;
+ color: white;
+ text-decoration: none;
+ padding: 5px;
+ margin-right: 2px;
+ margin-left: 2px;
+ margin-bottom: 0;
+ }
+ </xsl:template>
+
+ <!--
+ Creates an all-classes.html file that contains a link to all files.
+ -->
+ <xsl:template match="checkstyle" mode="all.classes">
+ <html>
+ <head>
+ <link rel="stylesheet" type="text/css" href="stylesheet.css"/>
+ </head>
+ <body>
+ <h2>Files</h2>
+ <p>
+ <table width="100%">
+ <!-- For each file create its part -->
+ <xsl:apply-templates select="file[count(error) != 0]" mode="all.classes">
+ <xsl:sort select="substring-after(@name, $basedir)"/>
+ </xsl:apply-templates>
+ </table>
+ </p>
+ </body>
+ </html>
+ </xsl:template>
+
+ <xsl:template match="checkstyle" mode="filelist">
+ <h3>Files</h3>
+ <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
+ <tr>
+ <th>Name</th>
+ <th>Errors</th>
+ </tr>
+ <xsl:apply-templates select="file[count(error) != 0]" mode="filelist">
+ <xsl:sort select="count(error)" order="descending" data-type="number"/>
+ </xsl:apply-templates>
+ </table>
+ </xsl:template>
+
+ <xsl:template match="file" mode="filelist">
+ <tr>
+ <xsl:call-template name="alternated-row"/>
+ <td nowrap="nowrap">
+ <a>
+ <xsl:attribute name="href">
+ <xsl:text>files/</xsl:text><xsl:value-of select="substring-after(@name, $basedir)"/><xsl:text>.html</xsl:text>
+ </xsl:attribute>
+ <xsl:value-of select="substring-after(@name, $basedir)"/>
+ </a>
+ </td>
+ <td><xsl:value-of select="count(error)"/></td>
+ </tr>
+ </xsl:template>
+
+ <xsl:template match="file" mode="all.classes">
+ <tr>
+ <td nowrap="nowrap">
+ <a target="fileFrame">
+ <xsl:attribute name="href">
+ <xsl:text>files/</xsl:text><xsl:value-of select="substring-after(@name, $basedir)"/><xsl:text>.html</xsl:text>
+ </xsl:attribute>
+ <xsl:value-of select="substring-after(@name, $basedir)"/>
+ </a>
+ </td>
+ </tr>
+ </xsl:template>
+
+ <!--
+ transform string like a/b/c to ../../../
+ @param path the path to transform into a descending directory path
+ -->
+ <xsl:template name="path">
+ <xsl:param name="path"/>
+ <xsl:if test="contains($path,'/')">
+ <xsl:text>../</xsl:text>
+ <xsl:call-template name="path">
+ <xsl:with-param name="path"><xsl:value-of select="substring-after($path,'/')"/></xsl:with-param>
+ </xsl:call-template>
+ </xsl:if>
+ <xsl:if test="not(contains($path,'/')) and not($path = '')">
+ <xsl:text>../</xsl:text>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template match="file">
+ <redirect:write file="{$output.dir}/files/{substring-after(@name, $basedir)}.html">
+ <html>
+ <head>
+ <link rel="stylesheet" type="text/css">
+ <xsl:attribute name="href"><xsl:call-template name="path"><xsl:with-param name="path" select="substring-after(@name, $basedir)"/></xsl:call-template><xsl:text>stylesheet.css</xsl:text></xsl:attribute>
+ </link>
+ </head>
+ <body>
+ <xsl:call-template name="pageHeader"/>
+ <h3>File <xsl:value-of select="substring-after(@name, $basedir)"/></h3>
+ <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
+ <tr>
+ <th>Error Description</th>
+ <th>Line:Column</th>
+ </tr>
+ <xsl:for-each select="error">
+ <tr>
+ <xsl:call-template name="alternated-row"/>
+ <td><a title="{@source}"><xsl:value-of select="@message"/></a></td>
+ <td align="center"><xsl:value-of select="@line"/><xsl:if test="@column">:<xsl:value-of select="@column"/></xsl:if></td>
+ </tr>
+ </xsl:for-each>
+ </table>
+ </body>
+ </html>
+ </redirect:write>
+ </xsl:template>
+
+ <xsl:template match="checkstyle" mode="summary">
+ <h3>Summary</h3>
+ <xsl:variable name="fileCount" select="count(file)"/>
+ <xsl:variable name="errorCount" select="count(file/error)"/>
+ <xsl:variable name="fileErrorCount" select="count(file[count(error) != 0])"/>
+ <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
+ <tr>
+ <th>Total Files</th>
+ <th>Files With Errors</th>
+ <th>Errors</th>
+ </tr>
+ <tr>
+ <xsl:call-template name="alternated-row"/>
+ <td><xsl:value-of select="$fileCount"/></td>
+ <td><xsl:value-of select="$fileErrorCount"/></td>
+ <td><xsl:value-of select="$errorCount"/></td>
+ </tr>
+ </table>
+ </xsl:template>
+
+ <xsl:template name="alternated-row">
+ <xsl:attribute name="class">
+ <xsl:if test="position() mod 2 = 1">oddrow</xsl:if>
+ <xsl:if test="position() mod 2 = 0">evenrow</xsl:if>
+ </xsl:attribute>
+ </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
Deleted: trunk/tools/etc/checkstyle/checkstyle-text.xsl
===================================================================
--- branches/JBoss_Portal_Branch_2_6/tools/etc/checkstyle/checkstyle-text.xsl 2007-07-17 22:53:37 UTC (rev 7810)
+++ trunk/tools/etc/checkstyle/checkstyle-text.xsl 2007-07-30 12:59:36 UTC (rev 7842)
@@ -1,33 +0,0 @@
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
- <xsl:strip-space elements="checkstyle"/>
- <xsl:preserve-space elements="file"/>
- <xsl:output method="text"/>
- <xsl:template match="checkstyle/file/error">
- <xsl:value-of select="../@name"/>
- <xsl:text>:</xsl:text>
- <xsl:value-of select="@line"/>
- <xsl:text>:</xsl:text>
- <xsl:value-of select="@column"/>
- <xsl:text> </xsl:text>
- <xsl:value-of select="@message"/>
- </xsl:template>
-</xsl:stylesheet>
-
Copied: trunk/tools/etc/checkstyle/checkstyle-text.xsl (from rev 7810, branches/JBoss_Portal_Branch_2_6/tools/etc/checkstyle/checkstyle-text.xsl)
===================================================================
--- trunk/tools/etc/checkstyle/checkstyle-text.xsl (rev 0)
+++ trunk/tools/etc/checkstyle/checkstyle-text.xsl 2007-07-30 12:59:36 UTC (rev 7842)
@@ -0,0 +1,33 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+ <xsl:strip-space elements="checkstyle"/>
+ <xsl:preserve-space elements="file"/>
+ <xsl:output method="text"/>
+ <xsl:template match="checkstyle/file/error">
+ <xsl:value-of select="../@name"/>
+ <xsl:text>:</xsl:text>
+ <xsl:value-of select="@line"/>
+ <xsl:text>:</xsl:text>
+ <xsl:value-of select="@column"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="@message"/>
+ </xsl:template>
+</xsl:stylesheet>
+
Deleted: trunk/tools/etc/checkstyle/checkstyle-xdoc.xsl
===================================================================
--- branches/JBoss_Portal_Branch_2_6/tools/etc/checkstyle/checkstyle-xdoc.xsl 2007-07-17 22:53:37 UTC (rev 7810)
+++ trunk/tools/etc/checkstyle/checkstyle-xdoc.xsl 2007-07-30 12:59:36 UTC (rev 7842)
@@ -1,129 +0,0 @@
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
- xmlns:lxslt="http://xml.apache.org/xslt"
- xmlns:redirect="org.apache.xalan.lib.Redirect"
- extension-element-prefixes="redirect">
-
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
- <xsl:output method="xml" indent="yes"/>
- <xsl:decimal-format decimal-separator="." grouping-separator="," />
-
- <xsl:param name="output.dir" select="'.'"/>
- <xsl:param name="basedir" select="'.'"/>
-
- <xsl:template match="checkstyle">
- <document>
- <properties>
- <title>Checkstyle Audit</title>
- </properties>
-
- <body>
- <xsl:apply-templates select="." mode="summary"/>
- <!-- File list part -->
- <xsl:apply-templates select="." mode="filelist"/>
- <xsl:apply-templates select="file[count(error) != 0]"/>
- </body>
- </document>
- </xsl:template>
-
- <xsl:template match="checkstyle" mode="filelist">
- <section name="Files">
- <table>
- <tr>
- <th>Name</th>
- <th>Errors</th>
- </tr>
- <xsl:apply-templates select="file[count(error) != 0]" mode="filelist">
- <xsl:sort select="count(error)" order="descending" data-type="number"/>
- </xsl:apply-templates>
- </table>
- </section>
- </xsl:template>
-
- <xsl:template match="file" mode="filelist">
- <tr>
- <xsl:call-template name="alternated-row"/>
- <td nowrap="nowrap">
- <a>
- <xsl:attribute name="href">
- <xsl:text>files</xsl:text><xsl:value-of select="substring-after(@name, $basedir)"/><xsl:text>.html</xsl:text>
- </xsl:attribute>
- <xsl:value-of select="substring-after(@name, $basedir)"/>
- </a>
- </td>
- <td><xsl:value-of select="count(error)"/></td>
- </tr>
- </xsl:template>
-
- <xsl:template match="file">
- <redirect:write file="{$output.dir}/files{substring-after(@name, $basedir)}.xml">
- <document>
- <properties>
- <title>Checkstyle Audit</title>
- </properties>
-
- <body>
- <section name="Details for {substring-after(@name, $basedir)}">
- <table>
- <tr>
- <th>Error Description</th>
- <th>Line</th>
- </tr>
- <xsl:for-each select="error">
- <tr>
- <xsl:call-template name="alternated-row"/>
- <td><a title="{@source}"><xsl:value-of select="@message"/></a></td>
- <td><xsl:value-of select="@line"/></td>
- </tr>
- </xsl:for-each>
- </table>
- </section>
- </body>
- </document>
- </redirect:write>
- </xsl:template>
-
- <xsl:template match="checkstyle" mode="summary">
- <section name="Summary">
- <xsl:variable name="fileCount" select="count(file)"/>
- <xsl:variable name="errorCount" select="count(file/error)"/>
- <xsl:variable name="fileErrorCount" select="count(file[count(error) != 0])"/>
- <table>
- <tr>
- <th>Files</th>
- <th>Files With Errors</th>
- <th>Errors</th>
- </tr>
- <tr>
- <xsl:call-template name="alternated-row"/>
- <td><xsl:value-of select="$fileCount"/></td>
- <td><xsl:value-of select="$fileErrorCount"/></td>
- <td><xsl:value-of select="$errorCount"/></td>
- </tr>
- </table>
- </section>
- </xsl:template>
-
- <xsl:template name="alternated-row">
- <xsl:attribute name="class">
- <xsl:if test="position() mod 2 = 1">oddrow</xsl:if>
- <xsl:if test="position() mod 2 = 0">evenrow</xsl:if>
- </xsl:attribute>
- </xsl:template>
-</xsl:stylesheet>
-
Copied: trunk/tools/etc/checkstyle/checkstyle-xdoc.xsl (from rev 7810, branches/JBoss_Portal_Branch_2_6/tools/etc/checkstyle/checkstyle-xdoc.xsl)
===================================================================
--- trunk/tools/etc/checkstyle/checkstyle-xdoc.xsl (rev 0)
+++ trunk/tools/etc/checkstyle/checkstyle-xdoc.xsl 2007-07-30 12:59:36 UTC (rev 7842)
@@ -0,0 +1,129 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+ xmlns:lxslt="http://xml.apache.org/xslt"
+ xmlns:redirect="org.apache.xalan.lib.Redirect"
+ extension-element-prefixes="redirect">
+
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+ <xsl:output method="xml" indent="yes"/>
+ <xsl:decimal-format decimal-separator="." grouping-separator="," />
+
+ <xsl:param name="output.dir" select="'.'"/>
+ <xsl:param name="basedir" select="'.'"/>
+
+ <xsl:template match="checkstyle">
+ <document>
+ <properties>
+ <title>Checkstyle Audit</title>
+ </properties>
+
+ <body>
+ <xsl:apply-templates select="." mode="summary"/>
+ <!-- File list part -->
+ <xsl:apply-templates select="." mode="filelist"/>
+ <xsl:apply-templates select="file[count(error) != 0]"/>
+ </body>
+ </document>
+ </xsl:template>
+
+ <xsl:template match="checkstyle" mode="filelist">
+ <section name="Files">
+ <table>
+ <tr>
+ <th>Name</th>
+ <th>Errors</th>
+ </tr>
+ <xsl:apply-templates select="file[count(error) != 0]" mode="filelist">
+ <xsl:sort select="count(error)" order="descending" data-type="number"/>
+ </xsl:apply-templates>
+ </table>
+ </section>
+ </xsl:template>
+
+ <xsl:template match="file" mode="filelist">
+ <tr>
+ <xsl:call-template name="alternated-row"/>
+ <td nowrap="nowrap">
+ <a>
+ <xsl:attribute name="href">
+ <xsl:text>files</xsl:text><xsl:value-of select="substring-after(@name, $basedir)"/><xsl:text>.html</xsl:text>
+ </xsl:attribute>
+ <xsl:value-of select="substring-after(@name, $basedir)"/>
+ </a>
+ </td>
+ <td><xsl:value-of select="count(error)"/></td>
+ </tr>
+ </xsl:template>
+
+ <xsl:template match="file">
+ <redirect:write file="{$output.dir}/files{substring-after(@name, $basedir)}.xml">
+ <document>
+ <properties>
+ <title>Checkstyle Audit</title>
+ </properties>
+
+ <body>
+ <section name="Details for {substring-after(@name, $basedir)}">
+ <table>
+ <tr>
+ <th>Error Description</th>
+ <th>Line</th>
+ </tr>
+ <xsl:for-each select="error">
+ <tr>
+ <xsl:call-template name="alternated-row"/>
+ <td><a title="{@source}"><xsl:value-of select="@message"/></a></td>
+ <td><xsl:value-of select="@line"/></td>
+ </tr>
+ </xsl:for-each>
+ </table>
+ </section>
+ </body>
+ </document>
+ </redirect:write>
+ </xsl:template>
+
+ <xsl:template match="checkstyle" mode="summary">
+ <section name="Summary">
+ <xsl:variable name="fileCount" select="count(file)"/>
+ <xsl:variable name="errorCount" select="count(file/error)"/>
+ <xsl:variable name="fileErrorCount" select="count(file[count(error) != 0])"/>
+ <table>
+ <tr>
+ <th>Files</th>
+ <th>Files With Errors</th>
+ <th>Errors</th>
+ </tr>
+ <tr>
+ <xsl:call-template name="alternated-row"/>
+ <td><xsl:value-of select="$fileCount"/></td>
+ <td><xsl:value-of select="$fileErrorCount"/></td>
+ <td><xsl:value-of select="$errorCount"/></td>
+ </tr>
+ </table>
+ </section>
+ </xsl:template>
+
+ <xsl:template name="alternated-row">
+ <xsl:attribute name="class">
+ <xsl:if test="position() mod 2 = 1">oddrow</xsl:if>
+ <xsl:if test="position() mod 2 = 0">evenrow</xsl:if>
+ </xsl:attribute>
+ </xsl:template>
+</xsl:stylesheet>
+
Modified: trunk/tools/etc/coverage-frames.xsl
===================================================================
--- trunk/tools/etc/coverage-frames.xsl 2007-07-30 12:43:44 UTC (rev 7841)
+++ trunk/tools/etc/coverage-frames.xsl 2007-07-30 12:59:36 UTC (rev 7842)
@@ -1,139 +1,102 @@
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
- xmlns:lxslt="http://xml.apache.org/xslt"
- xmlns:redirect="org.apache.xalan.xslt.extensions.Redirect"
- extension-element-prefixes="redirect">
-<xsl:output method="html" indent="yes"/>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+ xmlns:lxslt="http://xml.apache.org/xslt"
+ xmlns:redirect="org.apache.xalan.lib.Redirect"
+ extension-element-prefixes="redirect">
+<xsl:output method="html" indent="yes"/>
<xsl:decimal-format decimal-separator="." grouping-separator="," />
<!--
- The Apache Software License, Version 1.1
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
- Copyright (c) 2001-2002 The Apache Software Foundation. All rights
- reserved.
+ http://www.apache.org/licenses/LICENSE-2.0
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- 3. The end-user documentation included with the redistribution, if
- any, must include the following acknowlegement:
- "This product includes software developed by the
- Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowlegement may appear in the software itself,
- if and wherever such third-party acknowlegements normally appear.
-
- 4. The names "The Jakarta Project", "Ant", and "Apache Software
- Foundation" must not be used to endorse or promote products derived
- from this software without prior written permission. For written
- permission, please contact apache(a)apache.org.
-
- 5. Products derived from this software may not be called "Apache"
- nor may "Apache" appear in their names without prior written
- permission of the Apache Group.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- SUCH DAMAGE.
- ====================================================================
-
- This software consists of voluntary contributions made by many
- individuals on behalf of the Apache Software Foundation. For more
- information on the Apache Software Foundation, please see
- <http://www.apache.org/>.
- -->
-
<!--
-
+
Sample stylesheet to be used with JProbe 3.0 XML output.
-
+
It creates a set of HTML files a la javadoc where you can browse easily
through all packages and classes.
-
+
It is best used with JProbe Coverage Ant task that gives you the benefit
of a reference classpath so that you have the list of classes/methods
that are not used at all in a given classpath.
-
+
@author Stephane Bailliez <a href="mailto:sbailliez@apache.org"/>
-
+
-->
<!-- default output directory is current directory -->
<xsl:param name="output.dir" select="'.'"/>
<!-- ======================================================================
- Root element
+ Root element
======================================================================= -->
<xsl:template match="/snapshot">
- <!-- create the index.html -->
- <redirect:write file="{$output.dir}/index.html">
- <xsl:call-template name="index.html"/>
- </redirect:write>
+ <!-- create the index.html -->
+ <redirect:write file="{$output.dir}/index.html">
+ <xsl:call-template name="index.html"/>
+ </redirect:write>
- <!-- create the stylesheet.css -->
- <redirect:write file="{$output.dir}/stylesheet.css">
- <xsl:call-template name="stylesheet.css"/>
- </redirect:write>
+ <!-- create the stylesheet.css -->
+ <redirect:write file="{$output.dir}/stylesheet.css">
+ <xsl:call-template name="stylesheet.css"/>
+ </redirect:write>
- <!-- create the overview-packages.html at the root -->
- <redirect:write file="{$output.dir}/overview-summary.html">
- <xsl:apply-templates select="." mode="overview.packages"/>
- </redirect:write>
+ <!-- create the overview-packages.html at the root -->
+ <redirect:write file="{$output.dir}/overview-summary.html">
+ <xsl:apply-templates select="." mode="overview.packages"/>
+ </redirect:write>
- <!-- create the all-packages.html at the root -->
- <redirect:write file="{$output.dir}/overview-frame.html">
- <xsl:apply-templates select="." mode="all.packages"/>
- </redirect:write>
-
- <!-- create the all-classes.html at the root -->
- <redirect:write file="{$output.dir}/allclasses-frame.html">
- <xsl:apply-templates select="." mode="all.classes"/>
- </redirect:write>
-
- <!-- process all packages -->
- <xsl:apply-templates select="./package" mode="write"/>
+ <!-- create the all-packages.html at the root -->
+ <redirect:write file="{$output.dir}/overview-frame.html">
+ <xsl:apply-templates select="." mode="all.packages"/>
+ </redirect:write>
+
+ <!-- create the all-classes.html at the root -->
+ <redirect:write file="{$output.dir}/allclasses-frame.html">
+ <xsl:apply-templates select="." mode="all.classes"/>
+ </redirect:write>
+
+ <!-- process all packages -->
+ <xsl:apply-templates select="./package" mode="write"/>
</xsl:template>
<!-- =======================================================================
- Frameset definition. Entry point for the report.
- 3 frames: packageListFrame, classListFrame, classFrame
+ Frameset definition. Entry point for the report.
+ 3 frames: packageListFrame, classListFrame, classFrame
======================================================================= -->
<xsl:template name="index.html">
<html>
- <head><title>Coverage Results.</title></head>
- <frameset cols="20%,80%">
- <frameset rows="30%,70%">
- <frame src="overview-frame.html" name="packageListFrame"/>
- <frame src="allclasses-frame.html" name="classListFrame"/>
- </frameset>
- <frame src="overview-summary.html" name="classFrame"/>
- </frameset>
- <noframes>
- <h2>Frame Alert</h2>
- <p>
- This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client.
- </p>
- </noframes>
+ <head><title>Coverage Results.</title></head>
+ <frameset cols="20%,80%">
+ <frameset rows="30%,70%">
+ <frame src="overview-frame.html" name="packageListFrame"/>
+ <frame src="allclasses-frame.html" name="classListFrame"/>
+ </frameset>
+ <frame src="overview-summary.html" name="classFrame"/>
+ </frameset>
+ <noframes>
+ <h2>Frame Alert</h2>
+ <p>
+ This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client.
+ </p>
+ </noframes>
</html>
</xsl:template>
<!-- =======================================================================
- Stylesheet CSS used
+ Stylesheet CSS used
======================================================================= -->
<!-- this is the stylesheet css to use for nearly everything -->
<xsl:template name="stylesheet.css">
@@ -148,10 +111,10 @@
background-color:#FFFFFF;
color:#000000;
}
- .a td {
+ .a td {
background: #efefef;
}
- .b td {
+ .b td {
background: #fff;
}
th, td {
@@ -168,7 +131,7 @@
border: none
}
table.log tr td, tr th {
-
+
}
h2 {
font-weight:bold;
@@ -189,115 +152,115 @@
</xsl:template>
<!-- =======================================================================
- List of all classes in all packages
- This will be the first page in the classListFrame
+ List of all classes in all packages
+ This will be the first page in the classListFrame
======================================================================= -->
<xsl:template match="snapshot" mode="all.classes">
- <html>
- <head>
- <xsl:call-template name="create.stylesheet.link"/>
- </head>
- <body>
- <h2>Classes</h2>
- <table width="100%">
- <xsl:for-each select="package/class">
- <xsl:sort select="@name"/>
- <xsl:variable name="package.name" select="(ancestor::package)[last()]/@name"/>
- <xsl:variable name="link">
- <xsl:if test="not($package.name='')">
- <xsl:value-of select="translate($package.name,'.','/')"/><xsl:text>/</xsl:text>
- </xsl:if><xsl:value-of select="@name"/><xsl:text>.html</xsl:text>
- </xsl:variable>
- <tr>
- <td nowrap="nowrap">
- <a target="classFrame" href="{$link}"><xsl:value-of select="@name"/></a>
- </td>
- </tr>
- </xsl:for-each>
- </table>
- </body>
- </html>
+ <html>
+ <head>
+ <xsl:call-template name="create.stylesheet.link"/>
+ </head>
+ <body>
+ <h2>Classes</h2>
+ <table width="100%">
+ <xsl:for-each select="package/class">
+ <xsl:sort select="@name"/>
+ <xsl:variable name="package.name" select="(ancestor::package)[last()]/@name"/>
+ <xsl:variable name="link">
+ <xsl:if test="not($package.name='')">
+ <xsl:value-of select="translate($package.name,'.','/')"/><xsl:text>/</xsl:text>
+ </xsl:if><xsl:value-of select="@name"/><xsl:text>.html</xsl:text>
+ </xsl:variable>
+ <tr>
+ <td nowrap="nowrap">
+ <a target="classFrame" href="{$link}"><xsl:value-of select="@name"/></a>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </table>
+ </body>
+ </html>
</xsl:template>
<!-- list of all packages -->
<xsl:template match="snapshot" mode="all.packages">
- <html>
- <head>
- <xsl:call-template name="create.stylesheet.link"/>
- </head>
- <body>
- <h2><a href="overview-summary.html" target="classFrame">Home</a></h2>
- <h2>Packages</h2>
- <table width="100%">
- <xsl:for-each select="package">
- <xsl:sort select="@name" order="ascending"/>
- <tr>
- <td nowrap="nowrap">
- <a href="{translate(@name,'.','/')}/package-summary.html" target="classFrame">
- <xsl:value-of select="@name"/>
- </a>
- </td>
- </tr>
- </xsl:for-each>
- </table>
- </body>
- </html>
+ <html>
+ <head>
+ <xsl:call-template name="create.stylesheet.link"/>
+ </head>
+ <body>
+ <h2><a href="overview-summary.html" target="classFrame">Home</a></h2>
+ <h2>Packages</h2>
+ <table width="100%">
+ <xsl:for-each select="package">
+ <xsl:sort select="@name" order="ascending"/>
+ <tr>
+ <td nowrap="nowrap">
+ <a href="{translate(@name,'.','/')}/package-summary.html" target="classFrame">
+ <xsl:value-of select="@name"/>
+ </a>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </table>
+ </body>
+ </html>
</xsl:template>
<!-- overview of statistics in packages -->
<xsl:template match="snapshot" mode="overview.packages">
- <html>
- <head>
- <xsl:call-template name="create.stylesheet.link"/>
- </head>
- <body onload="open('allclasses-frame.html','classListFrame')">
- <xsl:call-template name="pageHeader"/>
- <h3>Summary</h3>
- <table class="log" cellpadding="5" cellspacing="2" width="100%">
- <tr>
- <!--th width="10%" nowrap="nowrap">Date</th>
- <th width="10%" nowrap="nowrap">Elapsed time</th-->
- <th width="10%" nowrap="nowrap">Reported Classes</th>
- <th width="10%" nowrap="nowrap">Methods Hit</th>
- <th width="10%" nowrap="nowrap">Lines Hit</th>
- </tr>
- <tr class="a">
- <!--td nowrap="nowrap"><xsl:value-of select="execution_log/@program_start"/></td>
- <td><xsl:value-of select="format-number(execution_log/@elapsed_time div 1000,'0.0')"/>secs</td-->
- <td><xsl:value-of select="count(package/class)"/></td>
- <td><xsl:value-of select="format-number(cov.data/@hit_methods div cov.data/@total_methods,'0.0%')"/></td>
- <td><xsl:value-of select="format-number(cov.data/@hit_lines div cov.data/@total_lines,'0.0%')"/></td>
- </tr>
- </table>
- <table border="0" width="100%">
- <tr>
- <td style="text-align: justify;">
- To ensure accurate test runs on Java applications, developers need to know how much of
- the code has been tested, and where to find any untested code. Coverage helps you
- locate untested code, and measure precisely how much code has been exercised.
- The result is a higher quality application in a shorter period of time.
- <p/>
- </td>
- </tr>
- </table>
+ <html>
+ <head>
+ <xsl:call-template name="create.stylesheet.link"/>
+ </head>
+ <body onload="open('allclasses-frame.html','classListFrame')">
+ <xsl:call-template name="pageHeader"/>
+ <h3>Summary</h3>
+ <table class="log" cellpadding="5" cellspacing="2" width="100%">
+ <tr>
+ <!--th width="10%" nowrap="nowrap">Date</th>
+ <th width="10%" nowrap="nowrap">Elapsed time</th-->
+ <th width="10%" nowrap="nowrap">Reported Classes</th>
+ <th width="10%" nowrap="nowrap">Methods Hit</th>
+ <th width="10%" nowrap="nowrap">Lines Hit</th>
+ </tr>
+ <tr class="a">
+ <!--td nowrap="nowrap"><xsl:value-of select="execution_log/@program_start"/></td>
+ <td><xsl:value-of select="format-number(execution_log/@elapsed_time div 1000,'0.0')"/>secs</td-->
+ <td><xsl:value-of select="count(package/class)"/></td>
+ <td><xsl:value-of select="format-number(cov.data/@hit_methods div cov.data/@total_methods,'0.0%')"/></td>
+ <td><xsl:value-of select="format-number(cov.data/@hit_lines div cov.data/@total_lines,'0.0%')"/></td>
+ </tr>
+ </table>
+ <table border="0" width="100%">
+ <tr>
+ <td style="text-align: justify;">
+ To ensure accurate test runs on Java applications, developers need to know how much of
+ the code has been tested, and where to find any untested code. Coverage helps you
+ locate untested code, and measure precisely how much code has been exercised.
+ The result is a higher quality application in a shorter period of time.
+ <p/>
+ </td>
+ </tr>
+ </table>
- <h3>Packages</h3>
- <table class="log" cellpadding="5" cellspacing="2" width="100%">
- <xsl:apply-templates select="package[1]" mode="stats.header"/>
- <!-- display packages and sort them via their coverage rate -->
- <xsl:for-each select="package">
- <xsl:sort data-type="number" select="cov.data/@hit_lines div cov.data/@total_lines"/>
- <tr>
- <xsl:call-template name="alternate-row"/>
- <td><a href="{translate(@name,'.','/')}/package-summary.html"><xsl:value-of select="@name"/></a></td>
- <td><xsl:value-of select="format-number(cov.data/@hit_methods div cov.data/@total_methods,'0.0%')"/></td>
- <td><xsl:value-of select="format-number(cov.data/@hit_lines div cov.data/@total_lines,'0.0%')"/></td>
- </tr>
- </xsl:for-each>
- </table>
- <xsl:call-template name="pageFooter"/>
- </body>
- </html>
+ <h3>Packages</h3>
+ <table class="log" cellpadding="5" cellspacing="2" width="100%">
+ <xsl:apply-templates select="package[1]" mode="stats.header"/>
+ <!-- display packages and sort them via their coverage rate -->
+ <xsl:for-each select="package">
+ <xsl:sort data-type="number" select="cov.data/@hit_lines div cov.data/@total_lines"/>
+ <tr>
+ <xsl:call-template name="alternate-row"/>
+ <td><a href="{translate(@name,'.','/')}/package-summary.html"><xsl:value-of select="@name"/></a></td>
+ <td><xsl:value-of select="format-number(cov.data/@hit_methods div cov.data/@total_methods,'0.0%')"/></td>
+ <td><xsl:value-of select="format-number(cov.data/@hit_lines div cov.data/@total_lines,'0.0%')"/></td>
+ </tr>
+ </xsl:for-each>
+ </table>
+ <xsl:call-template name="pageFooter"/>
+ </body>
+ </html>
</xsl:template>
<!--
@@ -305,123 +268,123 @@
, the summary page, and the info for each class
-->
<xsl:template match="package" mode="write">
- <xsl:variable name="package.dir">
- <xsl:if test="not(@name = '')"><xsl:value-of select="translate(@name,'.','/')"/></xsl:if>
- <xsl:if test="@name = ''">.</xsl:if>
- </xsl:variable>
+ <xsl:variable name="package.dir">
+ <xsl:if test="not(@name = '')"><xsl:value-of select="translate(@name,'.','/')"/></xsl:if>
+ <xsl:if test="@name = ''">.</xsl:if>
+ </xsl:variable>
- <!-- create a classes-list.html in the package directory -->
- <redirect:write file="{$output.dir}/{$package.dir}/package-frame.html">
- <xsl:apply-templates select="." mode="classes.list"/>
- </redirect:write>
-
- <!-- create a package-summary.html in the package directory -->
- <redirect:write file="{$output.dir}/{$package.dir}/package-summary.html">
- <xsl:apply-templates select="." mode="package.summary"/>
- </redirect:write>
-
- <!-- for each class, creates a @name.html -->
- <xsl:for-each select="class">
- <redirect:write file="{$output.dir}/{$package.dir}/{(a)name}.html">
- <xsl:apply-templates select="." mode="class.details"/>
- </redirect:write>
- </xsl:for-each>
+ <!-- create a classes-list.html in the package directory -->
+ <redirect:write file="{$output.dir}/{$package.dir}/package-frame.html">
+ <xsl:apply-templates select="." mode="classes.list"/>
+ </redirect:write>
+
+ <!-- create a package-summary.html in the package directory -->
+ <redirect:write file="{$output.dir}/{$package.dir}/package-summary.html">
+ <xsl:apply-templates select="." mode="package.summary"/>
+ </redirect:write>
+
+ <!-- for each class, creates a @name.html -->
+ <xsl:for-each select="class">
+ <redirect:write file="{$output.dir}/{$package.dir}/{(a)name}.html">
+ <xsl:apply-templates select="." mode="class.details"/>
+ </redirect:write>
+ </xsl:for-each>
</xsl:template>
<!-- list of classes in a package -->
<xsl:template match="package" mode="classes.list">
- <html>
- <HEAD>
- <xsl:call-template name="create.stylesheet.link">
- <xsl:with-param name="package.name" select="@name"/>
- </xsl:call-template>
- </HEAD>
- <BODY>
- <table width="100%">
- <tr>
- <td nowrap="nowrap">
- <H2><a href="package-summary.html" target="classFrame"><xsl:value-of select="@name"/></a></H2>
- </td>
- </tr>
- </table>
-
- <H2>Classes</H2>
- <TABLE WIDTH="100%">
- <xsl:for-each select="class">
- <xsl:sort select="@name"/>
- <tr>
- <td nowrap="nowrap">
- <a href="{(a)name}.html" target="classFrame"><xsl:value-of select="@name"/></a>
- </td>
- </tr>
- </xsl:for-each>
- </TABLE>
- </BODY>
- </html>
+ <html>
+ <HEAD>
+ <xsl:call-template name="create.stylesheet.link">
+ <xsl:with-param name="package.name" select="@name"/>
+ </xsl:call-template>
+ </HEAD>
+ <BODY>
+ <table width="100%">
+ <tr>
+ <td nowrap="nowrap">
+ <H2><a href="package-summary.html" target="classFrame"><xsl:value-of select="@name"/></a></H2>
+ </td>
+ </tr>
+ </table>
+
+ <H2>Classes</H2>
+ <TABLE WIDTH="100%">
+ <xsl:for-each select="class">
+ <xsl:sort select="@name"/>
+ <tr>
+ <td nowrap="nowrap">
+ <a href="{(a)name}.html" target="classFrame"><xsl:value-of select="@name"/></a>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </TABLE>
+ </BODY>
+ </html>
</xsl:template>
<!-- summary of a package -->
<xsl:template match="package" mode="package.summary">
- <HTML>
- <HEAD>
- <xsl:call-template name="create.stylesheet.link">
- <xsl:with-param name="package.name" select="@name"/>
- </xsl:call-template>
- </HEAD>
- <!-- when loading this package, it will open the classes into the frame -->
- <BODY onload="open('package-frame.html','classListFrame')">
- <xsl:call-template name="pageHeader"/>
- <h3>Package <xsl:value-of select="@name"/></h3>
- <table class="log" cellpadding="5" cellspacing="2" width="100%">
- <xsl:apply-templates select="." mode="stats.header"/>
- <xsl:apply-templates select="." mode="stats"/>
- </table>
-
- <xsl:if test="count(class) > 0">
- <H3>Classes</H3>
- <table class="log" cellpadding="5" cellspacing="2" width="100%">
- <xsl:apply-templates select="." mode="stats.header"/>
- <xsl:apply-templates select="class" mode="stats">
- <xsl:sort data-type="number" select="cov.data/@hit_lines div cov.data/@total_lines"/>
- </xsl:apply-templates>
- </table>
- </xsl:if>
- <xsl:call-template name="pageFooter"/>
- </BODY>
- </HTML>
+ <HTML>
+ <HEAD>
+ <xsl:call-template name="create.stylesheet.link">
+ <xsl:with-param name="package.name" select="@name"/>
+ </xsl:call-template>
+ </HEAD>
+ <!-- when loading this package, it will open the classes into the frame -->
+ <BODY onload="open('package-frame.html','classListFrame')">
+ <xsl:call-template name="pageHeader"/>
+ <h3>Package <xsl:value-of select="@name"/></h3>
+ <table class="log" cellpadding="5" cellspacing="2" width="100%">
+ <xsl:apply-templates select="." mode="stats.header"/>
+ <xsl:apply-templates select="." mode="stats"/>
+ </table>
+
+ <xsl:if test="count(class) > 0">
+ <H3>Classes</H3>
+ <table class="log" cellpadding="5" cellspacing="2" width="100%">
+ <xsl:apply-templates select="." mode="stats.header"/>
+ <xsl:apply-templates select="class" mode="stats">
+ <xsl:sort data-type="number" select="cov.data/@hit_lines div cov.data/@total_lines"/>
+ </xsl:apply-templates>
+ </table>
+ </xsl:if>
+ <xsl:call-template name="pageFooter"/>
+ </BODY>
+ </HTML>
</xsl:template>
<!-- details of a class -->
<xsl:template match="class" mode="class.details">
- <xsl:variable name="package.name" select="(ancestor::package)[last()]/@name"/>
- <HTML>
- <HEAD>
- <xsl:call-template name="create.stylesheet.link">
- <xsl:with-param name="package.name" select="$package.name"/>
- </xsl:call-template>
- </HEAD>
- <BODY>
- <xsl:call-template name="pageHeader"/>
- <H3>Class <xsl:if test="not($package.name = '')"><xsl:value-of select="$package.name"/>.</xsl:if><xsl:value-of select="@name"/></H3>
+ <xsl:variable name="package.name" select="(ancestor::package)[last()]/@name"/>
+ <HTML>
+ <HEAD>
+ <xsl:call-template name="create.stylesheet.link">
+ <xsl:with-param name="package.name" select="$package.name"/>
+ </xsl:call-template>
+ </HEAD>
+ <BODY>
+ <xsl:call-template name="pageHeader"/>
+ <H3>Class <xsl:if test="not($package.name = '')"><xsl:value-of select="$package.name"/>.</xsl:if><xsl:value-of select="@name"/></H3>
- <!-- class summary -->
- <table class="log" cellpadding="5" cellspacing="2" width="100%">
- <xsl:apply-templates select="." mode="stats.header"/>
- <xsl:apply-templates select="." mode="stats"/>
- </table>
-
- <!-- details of methods -->
- <H3>Methods</H3>
- <table class="log" cellpadding="5" cellspacing="2" width="100%">
- <xsl:apply-templates select="method[1]" mode="stats.header"/>
- <xsl:apply-templates select="method" mode="stats">
- <xsl:sort data-type="number" select="cov.data/@hit_lines div cov.data/@total_lines"/>
- </xsl:apply-templates>
- </table>
- <xsl:call-template name="pageFooter"/>
- </BODY>
- </HTML>
+ <!-- class summary -->
+ <table class="log" cellpadding="5" cellspacing="2" width="100%">
+ <xsl:apply-templates select="." mode="stats.header"/>
+ <xsl:apply-templates select="." mode="stats"/>
+ </table>
+ <!-- details of methods -->
+ <H3>Methods</H3>
+ <table class="log" cellpadding="5" cellspacing="2" width="100%">
+ <xsl:apply-templates select="method[1]" mode="stats.header"/>
+ <xsl:apply-templates select="method" mode="stats">
+ <xsl:sort data-type="number" select="cov.data/@hit_lines div cov.data/@total_lines"/>
+ </xsl:apply-templates>
+ </table>
+ <xsl:call-template name="pageFooter"/>
+ </BODY>
+ </HTML>
+
</xsl:template>
<!-- Page Header -->
@@ -434,66 +397,58 @@
<img src="http://jakarta.apache.org/images/jakarta-logo.gif" alt="http://jakarta.apache.org" align="left" border="0"/>
</a>
</td>
- <td style="text-align:right"><h2>Source Code Coverage</h2></td>
- </tr>
- <tr>
- <td style="text-align:right">Designed for use with <a href='http://www.sitraka.com/jprobe'>Sitraka JProbe</a> and <a href='http://jakarta.apache.org'>Ant</a>.</td>
- </tr>
+ <td style="text-align:right"><h2>Source Code Coverage</h2></td>
+ </tr>
+ <tr>
+ <td style="text-align:right">Designed for use with <a href='http://www.sitraka.com/jprobe'>Sitraka JProbe</a> and <a href='http://jakarta.apache.org'>Ant</a>.</td>
+ </tr>
</table>
- <hr size="1"/>
+ <hr size="1"/>
</xsl:template>
<!-- Page Footer -->
<xsl:template name="pageFooter">
- <table width="100%">
- <tr><td><hr noshade="yes" size="1"/></td></tr>
- <tr><td>
- <div align="center"><font color="#525D76" size="-1"><em>
- Copyright © 1999-2001, Apache Software Foundation
- </em></font></div>
- </td></tr>
- </table>
</xsl:template>
<xsl:template name="table.header">
- <tr>
- <th width="80%">Name</th>
- <th width="10%" nowrap="nowrap">Methods Hit</th>
- <th width="10%" nowrap="nowrap">Lines Hit</th>
- </tr>
+ <tr>
+ <th width="80%">Name</th>
+ <th width="10%" nowrap="nowrap">Methods Hit</th>
+ <th width="10%" nowrap="nowrap">Lines Hit</th>
+ </tr>
</xsl:template>
<xsl:template match="method" mode="stats.header">
- <tr>
- <th width="90%">Name</th>
- <th width="10%" nowrap="nowrap">Lines Hit</th>
- </tr>
+ <tr>
+ <th width="90%">Name</th>
+ <th width="10%" nowrap="nowrap">Lines Hit</th>
+ </tr>
</xsl:template>
<xsl:template match="method" mode="stats">
- <tr>
- <xsl:call-template name="alternate-row"/>
- <td><xsl:value-of select="@name"/></td>
- <td>
- <xsl:value-of select="format-number(cov.data/@hit_lines div cov.data/@total_lines,'0.0%')"/>
- </td>
- </tr>
+ <tr>
+ <xsl:call-template name="alternate-row"/>
+ <td><xsl:value-of select="@name"/></td>
+ <td>
+ <xsl:value-of select="format-number(cov.data/@hit_lines div cov.data/@total_lines,'0.0%')"/>
+ </td>
+ </tr>
</xsl:template>
<xsl:template match="package|class" mode="stats.header">
- <tr>
- <th width="80%">Name</th>
- <th width="10%" nowrap="nowrap">Methods Hit</th>
- <th width="10%" nowrap="nowrap">Lines Hit</th>
- </tr>
+ <tr>
+ <th width="80%">Name</th>
+ <th width="10%" nowrap="nowrap">Methods Hit</th>
+ <th width="10%" nowrap="nowrap">Lines Hit</th>
+ </tr>
</xsl:template>
<xsl:template match="package|class" mode="stats">
- <tr>
- <xsl:call-template name="alternate-row"/>
- <td><xsl:value-of select="@name"/></td>
- <td><xsl:value-of select="format-number(cov.data/@hit_methods div cov.data/@total_methods,'0.0%')"/></td>
- <td><xsl:value-of select="format-number(cov.data/@hit_lines div cov.data/@total_lines,'0.0%')"/></td>
- </tr>
+ <tr>
+ <xsl:call-template name="alternate-row"/>
+ <td><xsl:value-of select="@name"/></td>
+ <td><xsl:value-of select="format-number(cov.data/@hit_methods div cov.data/@total_methods,'0.0%')"/></td>
+ <td><xsl:value-of select="format-number(cov.data/@hit_lines div cov.data/@total_lines,'0.0%')"/></td>
+ </tr>
</xsl:template>
<!--
@@ -501,23 +456,23 @@
@param path the path to transform into a descending directory path
-->
<xsl:template name="path">
- <xsl:param name="path"/>
- <xsl:if test="contains($path,'.')">
- <xsl:text>../</xsl:text>
- <xsl:call-template name="path">
- <xsl:with-param name="path"><xsl:value-of select="substring-after($path,'.')"/></xsl:with-param>
- </xsl:call-template>
- </xsl:if>
- <xsl:if test="not(contains($path,'.')) and not($path = '')">
- <xsl:text>../</xsl:text>
- </xsl:if>
+ <xsl:param name="path"/>
+ <xsl:if test="contains($path,'.')">
+ <xsl:text>../</xsl:text>
+ <xsl:call-template name="path">
+ <xsl:with-param name="path"><xsl:value-of select="substring-after($path,'.')"/></xsl:with-param>
+ </xsl:call-template>
+ </xsl:if>
+ <xsl:if test="not(contains($path,'.')) and not($path = '')">
+ <xsl:text>../</xsl:text>
+ </xsl:if>
</xsl:template>
<!-- create the link to the stylesheet based on the package name -->
<xsl:template name="create.stylesheet.link">
- <xsl:param name="package.name"/>
- <LINK REL ="stylesheet" TYPE="text/css" TITLE="Style"><xsl:attribute name="href"><xsl:if test="not($package.name = 'unnamed package')"><xsl:call-template name="path"><xsl:with-param name="path" select="$package.name"/></xsl:call-template></xsl:if>stylesheet.css</xsl:attribute></LINK>
+ <xsl:param name="package.name"/>
+ <LINK REL ="stylesheet" TYPE="text/css" TITLE="Style"><xsl:attribute name="href"><xsl:if test="not($package.name = 'unnamed package')"><xsl:call-template name="path"><xsl:with-param name="path" select="$package.name"/></xsl:call-template></xsl:if>stylesheet.css</xsl:attribute></LINK>
</xsl:template>
<!-- alternated row style -->
Modified: trunk/tools/etc/jdepend-frames.xsl
===================================================================
--- trunk/tools/etc/jdepend-frames.xsl 2007-07-30 12:43:44 UTC (rev 7841)
+++ trunk/tools/etc/jdepend-frames.xsl 2007-07-30 12:59:36 UTC (rev 7842)
@@ -1,68 +1,32 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:lxslt="http://xml.apache.org/xslt"
- xmlns:redirect="org.apache.xalan.xslt.extensions.Redirect"
+ xmlns:redirect="org.apache.xalan.lib.Redirect"
extension-element-prefixes="redirect">
<xsl:output method="html" indent="yes" encoding="US-ASCII"/>
<!--
- The Apache Software License, Version 1.1
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
- Copyright (c) 2002 The Apache Software Foundation. All rights
- reserved.
+ http://www.apache.org/licenses/LICENSE-2.0
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- 3. The end-user documentation included with the redistribution, if
- any, must include the following acknowlegement:
- "This product includes software developed by the
- Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowlegement may appear in the software itself,
- if and wherever such third-party acknowlegements normally appear.
-
- 4. The names "The Jakarta Project", "Ant", and "Apache Software
- Foundation" must not be used to endorse or promote products derived
- from this software without prior written permission. For written
- permission, please contact apache(a)apache.org.
-
- 5. Products derived from this software may not be called "Apache"
- nor may "Apache" appear in their names without prior written
- permission of the Apache Group.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- SUCH DAMAGE.
- ====================================================================
-
- This software consists of voluntary contributions made by many
- individuals on behalf of the Apache Software Foundation. For more
- information on the Apache Software Foundation, please see
- <http://www.apache.org/>.
- -->
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
<!--
Sample stylesheet to be used with JDepend XML output.
-
+
It creates a set of HTML files a la javadoc where you can browse easily
through all packages and classes.
-
+
@author <a href="mailto:jtulley@novell.com">Jeff Tulley</a>
-->
@@ -103,7 +67,7 @@
<redirect:write file="{$output.dir}/all-packages.html">
<xsl:apply-templates select="Packages" mode="all.packages"/>
</redirect:write>
-
+
<!-- create the all-cycles.html at the root -->
<redirect:write file="{$output.dir}/all-cycles.html">
<xsl:apply-templates select="Cycles" mode="all.cycles"/>
@@ -150,7 +114,7 @@
table.details tr td{
background:#eeeee0;
}
-
+
p {
line-height:1.5em;
margin-top:0.5em; margin-bottom:1.0em;
@@ -212,7 +176,7 @@
<th><a href="overview-explanations.html#EXabstractness">Abstractness</a></th>
<th><a href="overview-explanations.html#EXinstability">Instability</a></th>
<th><a href="overview-explanations.html#EXdistance">Distance</a></th>
-
+
</tr>
<xsl:for-each select="./Packages/Package">
<xsl:if test="count(error) = 0">
@@ -264,12 +228,12 @@
[<a href="overview-cycles.html">cycles</a>]
[<a href="overview-explanations.html">explanations</a>]
</td></tr></table>
-
+
<xsl:for-each select="./Packages/Package">
<xsl:if test="count(error) = 0">
<h3><a><xsl:attribute name="name">PK<xsl:value-of select="@name"/></xsl:attribute>
<xsl:value-of select="@name"/></a></h3>
-
+
<table width="100%"><tr>
<td><a href="overview-explanations.html#EXafferent">Afferent Couplings</a>: <xsl:value-of select="Stats/Ca"/></td>
<td><a href="overview-explanations.html#EXefferent">Efferent Couplings</a>: <xsl:value-of select="Stats/Ce"/></td>
@@ -277,7 +241,7 @@
<td><a href="overview-explanations.html#EXinstability">Instability</a>: <xsl:value-of select="Stats/I"/></td>
<td><a href="overview-explanations.html#EXdistance">Distance</a>: <xsl:value-of select="Stats/D"/></td>
</tr></table>
-
+
<table width="100%" class="details">
<tr>
<th>Abstract Classes</th>
@@ -360,7 +324,7 @@
[<a href="#NVcycles">cycles</a>]
[<a href="#NVexplanations">explanations</a>]
</td></tr></table> -->
-
+
<xsl:if test="count(Cycles/Package) = 0">
<p>There are no cyclic dependancies.</p>
</xsl:if>
@@ -380,7 +344,7 @@
</body>
</html>
</xsl:template>
-
+
<xsl:template match="JDepend" mode="explanations">
<html>
<head>
@@ -396,16 +360,16 @@
[<a href="overview-cycles.html">cycles</a>]
[explanations]
</td></tr></table>
-
+
<p>The following explanations are for quick reference and are lifted directly from the original <a href="http://www.clarkware.com/software/JDepend.html">JDepend documentation</a>.</p>
-
+
<h3><a name="EXnumber">Number of Classes</a></h3>
<p>The number of concrete and abstract classes (and interfaces) in the package is an indicator of the extensibility of the package.</p>
<h3><a name="EXafferent">Afferent Couplings</a></h3>
<p>The number of other packages that depend upon classes within the package is an indicator of the package's responsibility. </p>
<h3><a name="EXefferent">Efferent Couplings</a></h3>
<p>The number of other packages that the classes in the package depend upon is an indicator of the package's independence. </p>
- <h3><a name="EXabstractness">Abstractness</a></h3>
+ <h3><a name="EXabstractness">Abstractness</a></h3>
<p>The ratio of the number of abstract classes (and interfaces) in the analyzed package to the total number of classes in the analyzed package. </p>
<p>The range for this metric is 0 to 1, with A=0 indicating a completely concrete package and A=1 indicating a completely abstract package. </p>
<h3><a name="EXinstability">Instability</a></h3>
@@ -415,12 +379,12 @@
<p>The perpendicular distance of a package from the idealized line A + I = 1. This metric is an indicator of the package's balance between abstractness and stability. </p>
<p>A package squarely on the main sequence is optimally balanced with respect to its abstractness and stability. Ideal packages are either completely abstract and stable (x=0, y=1) or completely concrete and instable (x=1, y=0). </p>
<p>The range for this metric is 0 to 1, with D=0 indicating a package that is coincident with the main sequence and D=1 indicating a package that is as far from the main sequence as possible. </p>
-
+
</body>
</html>
</xsl:template>
-
-
+
+
<!--
Creates an html file that contains a link to all package links in overview-packages.html.
@bug there will be a problem here, I don't know yet how to handle unnamed package :(
@@ -506,7 +470,7 @@
</td>
</tr>
</xsl:template>
-
+
<!-- Page HEADER -->
<xsl:template name="pageHeader">
<h1>JDepend Analysis</h1>
Modified: trunk/tools/etc/jdepend.xsl
===================================================================
--- trunk/tools/etc/jdepend.xsl 2007-07-30 12:43:44 UTC (rev 7841)
+++ trunk/tools/etc/jdepend.xsl 2007-07-30 12:59:36 UTC (rev 7842)
@@ -1,312 +1,275 @@
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!--
- The Apache Software License, Version 1.1
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
- Copyright (c) 2002 The Apache Software Foundation. All rights
- reserved.
+ http://www.apache.org/licenses/LICENSE-2.0
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- 3. The end-user documentation included with the redistribution, if
- any, must include the following acknowlegement:
- "This product includes software developed by the
- Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowlegement may appear in the software itself,
- if and wherever such third-party acknowlegements normally appear.
-
- 4. The names "The Jakarta Project", "Ant", and "Apache Software
- Foundation" must not be used to endorse or promote products derived
- from this software without prior written permission. For written
- permission, please contact apache(a)apache.org.
-
- 5. Products derived from this software may not be called "Apache"
- nor may "Apache" appear in their names without prior written
- permission of the Apache Group.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- SUCH DAMAGE.
- ====================================================================
-
- This software consists of voluntary contributions made by many
- individuals on behalf of the Apache Software Foundation. For more
- information on the Apache Software Foundation, please see
- <http://www.apache.org/>.
- -->
-
<xsl:output method="html" indent="yes" encoding="US-ASCII"/>
<xsl:template match="JDepend">
- <html>
- <head>
- <title>JDepend Analysis</title>
-
- <style type="text/css">
- body {
- font:normal 68% verdana,arial,helvetica;
- color:#000000;
- }
- table tr td, tr th {
- font-size: 68%;
- }
- table.details tr th{
- font-weight: bold;
- text-align:left;
- background:#a6caf0;
- }
- table.details tr td{
- background:#eeeee0;
- }
-
- p {
- line-height:1.5em;
- margin-top:0.5em; margin-bottom:1.0em;
- margin-left:2em;
- margin-right:2em;
- }
- h1 {
- margin: 0px 0px 5px; font: 165% verdana,arial,helvetica
- }
- h2 {
- margin-top: 1em; margin-bottom: 0.5em; font: bold 125% verdana,arial,helvetica
- }
- h3 {
- margin-bottom: 0.5em; font: bold 115% verdana,arial,helvetica
- }
- h4 {
- margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica
- }
- h5 {
- margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica
- }
- h6 {
- margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica
- }
- .Error {
- font-weight:bold; color:red;
- }
- .Failure {
- font-weight:bold; color:purple;
- }
- .Properties {
- text-align:right;
- }
- </style>
-
-
- </head>
- <body>
- <!--h1>JDepend Report</h1>
- <ul>
- <xsl:for-each select="./Packages/Package">
- <xsl:sort select="@name"/>
- <li><xsl:value-of select="@name"/></li>
- </xsl:for-each>
- </ul-->
-
- <h1><a name="top">JDepend Analysis</a></h1>
- <p align="right">Designed for use with <a href="http://www.clarkware.com/software/JDepend.html">JDepend</a> and <a href="http://jakarta.apache.org">Ant</a>.</p>
- <hr size="2" />
-
- <table width="100%"><tr><td>
- <a name="NVsummary"><h2>Summary</h2></a>
- </td><td align="right">
- [<a href="#NVsummary">summary</a>]
- [<a href="#NVpackages">packages</a>]
- [<a href="#NVcycles">cycles</a>]
- [<a href="#NVexplanations">explanations</a>]
- </td></tr></table>
-
- <table width="100%" class="details">
- <tr>
- <th>Package</th>
- <th>Total Classes</th>
- <th><a href="#EXnumber">Abstract Classes</a></th>
- <th><a href="#EXnumber">Concrete Classes</a></th>
- <th><a href="#EXafferent">Afferent Couplings</a></th>
- <th><a href="#EXefferent">Efferent Couplings</a></th>
- <th><a href="#EXabstractness">Abstractness</a></th>
- <th><a href="#EXinstability">Instability</a></th>
- <th><a href="#EXdistance">Distance</a></th>
-
- </tr>
- <xsl:for-each select="./Packages/Package">
- <xsl:if test="count(error) = 0">
- <tr>
- <td align="left">
- <a>
- <xsl:attribute name="href">#PK<xsl:value-of select="@name"/>
- </xsl:attribute>
- <xsl:value-of select="@name"/>
- </a>
- </td>
- <td align="right"><xsl:value-of select="Stats/TotalClasses"/></td>
- <td align="right"><xsl:value-of select="Stats/AbstractClasses"/></td>
- <td align="right"><xsl:value-of select="Stats/ConcreteClasses"/></td>
- <td align="right"><xsl:value-of select="Stats/Ca"/></td>
- <td align="right"><xsl:value-of select="Stats/Ce"/></td>
- <td align="right"><xsl:value-of select="Stats/A"/></td>
- <td align="right"><xsl:value-of select="Stats/I"/></td>
- <td align="right"><xsl:value-of select="Stats/D"/></td>
-
+ <html>
+ <head>
+ <title>JDepend Analysis</title>
+
+ <style type="text/css">
+ body {
+ font:normal 68% verdana,arial,helvetica;
+ color:#000000;
+ }
+ table tr td, tr th {
+ font-size: 68%;
+ }
+ table.details tr th{
+ font-weight: bold;
+ text-align:left;
+ background:#a6caf0;
+ }
+ table.details tr td{
+ background:#eeeee0;
+ }
+
+ p {
+ line-height:1.5em;
+ margin-top:0.5em; margin-bottom:1.0em;
+ margin-left:2em;
+ margin-right:2em;
+ }
+ h1 {
+ margin: 0px 0px 5px; font: 165% verdana,arial,helvetica
+ }
+ h2 {
+ margin-top: 1em; margin-bottom: 0.5em; font: bold 125% verdana,arial,helvetica
+ }
+ h3 {
+ margin-bottom: 0.5em; font: bold 115% verdana,arial,helvetica
+ }
+ h4 {
+ margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica
+ }
+ h5 {
+ margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica
+ }
+ h6 {
+ margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica
+ }
+ .Error {
+ font-weight:bold; color:red;
+ }
+ .Failure {
+ font-weight:bold; color:purple;
+ }
+ .Properties {
+ text-align:right;
+ }
+ </style>
+
+
+ </head>
+ <body>
+ <!--h1>JDepend Report</h1>
+ <ul>
+ <xsl:for-each select="./Packages/Package">
+ <xsl:sort select="@name"/>
+ <li><xsl:value-of select="@name"/></li>
+ </xsl:for-each>
+ </ul-->
+
+ <h1><a name="top">JDepend Analysis</a></h1>
+ <p align="right">Designed for use with <a href="http://www.clarkware.com/software/JDepend.html">JDepend</a> and <a href="http://jakarta.apache.org">Ant</a>.</p>
+ <hr size="2" />
+
+ <table width="100%"><tr><td>
+ <a name="NVsummary"><h2>Summary</h2></a>
+ </td><td align="right">
+ [<a href="#NVsummary">summary</a>]
+ [<a href="#NVpackages">packages</a>]
+ [<a href="#NVcycles">cycles</a>]
+ [<a href="#NVexplanations">explanations</a>]
+ </td></tr></table>
+
+ <table width="100%" class="details">
+ <tr>
+ <th>Package</th>
+ <th>Total Classes</th>
+ <th><a href="#EXnumber">Abstract Classes</a></th>
+ <th><a href="#EXnumber">Concrete Classes</a></th>
+ <th><a href="#EXafferent">Afferent Couplings</a></th>
+ <th><a href="#EXefferent">Efferent Couplings</a></th>
+ <th><a href="#EXabstractness">Abstractness</a></th>
+ <th><a href="#EXinstability">Instability</a></th>
+ <th><a href="#EXdistance">Distance</a></th>
+
+ </tr>
+ <xsl:for-each select="./Packages/Package">
+ <xsl:if test="count(error) = 0">
+ <tr>
+ <td align="left">
+ <a>
+ <xsl:attribute name="href">#PK<xsl:value-of select="@name"/>
+ </xsl:attribute>
+ <xsl:value-of select="@name"/>
+ </a>
+ </td>
+ <td align="right"><xsl:value-of select="Stats/TotalClasses"/></td>
+ <td align="right"><xsl:value-of select="Stats/AbstractClasses"/></td>
+ <td align="right"><xsl:value-of select="Stats/ConcreteClasses"/></td>
+ <td align="right"><xsl:value-of select="Stats/Ca"/></td>
+ <td align="right"><xsl:value-of select="Stats/Ce"/></td>
+ <td align="right"><xsl:value-of select="Stats/A"/></td>
+ <td align="right"><xsl:value-of select="Stats/I"/></td>
+ <td align="right"><xsl:value-of select="Stats/D"/></td>
+
- </tr>
- </xsl:if>
- </xsl:for-each>
- <xsl:for-each select="./Packages/Package">
- <xsl:if test="count(error) > 0">
- <tr>
- <td align="left">
- <xsl:value-of select="@name"/>
- </td>
- <td align="left" colspan="8"><xsl:value-of select="error"/></td>
- </tr>
- </xsl:if>
- </xsl:for-each>
- </table>
-
- <table width="100%"><tr><td>
- <a name="NVpackages"><h2>Packages</h2></a>
- </td><td align="right">
- [<a href="#NVsummary">summary</a>]
- [<a href="#NVpackages">packages</a>]
- [<a href="#NVcycles">cycles</a>]
- [<a href="#NVexplanations">explanations</a>]
- </td></tr></table>
-
- <xsl:for-each select="./Packages/Package">
- <xsl:if test="count(error) = 0">
- <h3><a><xsl:attribute name="name">PK<xsl:value-of select="@name"/></xsl:attribute>
- <xsl:value-of select="@name"/></a></h3>
-
- <table width="100%"><tr>
- <td><a href="#EXafferent">Afferent Couplings</a>: <xsl:value-of select="Stats/Ca"/></td>
- <td><a href="#EXefferent">Efferent Couplings</a>: <xsl:value-of select="Stats/Ce"/></td>
- <td><a href="#EXabstractness">Abstractness</a>: <xsl:value-of select="Stats/A"/></td>
- <td><a href="#EXinstability">Instability</a>: <xsl:value-of select="Stats/I"/></td>
- <td><a href="#EXdistance">Distance</a>: <xsl:value-of select="Stats/D"/></td>
- </tr></table>
-
- <table width="100%" class="details">
- <tr>
- <th>Abstract Classes</th>
- <th>Concrete Classes</th>
- <th>Used by Packages</th>
- <th>Uses Packages</th>
- </tr>
- <tr>
- <td valign="top" width="25%">
- <xsl:if test="count(AbstractClasses/Class)=0">
- <i>None</i>
- </xsl:if>
- <xsl:for-each select="AbstractClasses/Class">
- <xsl:value-of select="node()"/><br/>
- </xsl:for-each>
- </td>
- <td valign="top" width="25%">
- <xsl:if test="count(ConcreteClasses/Class)=0">
- <i>None</i>
- </xsl:if>
- <xsl:for-each select="ConcreteClasses/Class">
- <xsl:value-of select="node()"/><br/>
- </xsl:for-each>
- </td>
- <td valign="top" width="25%">
- <xsl:if test="count(UsedBy/Package)=0">
- <i>None</i>
- </xsl:if>
- <xsl:for-each select="UsedBy/Package">
- <a>
- <xsl:attribute name="href">#PK<xsl:value-of select="node()"/></xsl:attribute>
- <xsl:value-of select="node()"/>
- </a><br/>
- </xsl:for-each>
- </td>
- <td valign="top" width="25%">
- <xsl:if test="count(DependsUpon/Package)=0">
- <i>None</i>
- </xsl:if>
- <xsl:for-each select="DependsUpon/Package">
- <a>
- <xsl:attribute name="href">#PK<xsl:value-of select="node()"/></xsl:attribute>
- <xsl:value-of select="node()"/>
- </a><br/>
- </xsl:for-each>
- </td>
- </tr>
- </table>
- </xsl:if>
- </xsl:for-each>
-
- <table width="100%"><tr><td>
- <a name="NVcycles"><h2>Cycles</h2></a>
- </td><td align="right">
- [<a href="#NVsummary">summary</a>]
- [<a href="#NVpackages">packages</a>]
- [<a href="#NVcycles">cycles</a>]
- [<a href="#NVexplanations">explanations</a>]
- </td></tr></table>
-
- <xsl:if test="count(Cycles/Package) = 0">
- <p>There are no cyclic dependancies.</p>
- </xsl:if>
- <xsl:for-each select="Cycles/Package">
- <h3><xsl:value-of select="@Name"/></h3><p>
- <xsl:for-each select="Package">
- <xsl:value-of select="."/><br/>
- </xsl:for-each></p>
- </xsl:for-each>
-
- <table width="100%"><tr><td>
- <a name="NVexplanations"><h2>Explanations</h2></a>
- </td><td align="right">
- [<a href="#NVsummary">summary</a>]
- [<a href="#NVpackages">packages</a>]
- [<a href="#NVcycles">cycles</a>]
- [<a href="#NVexplanations">explanations</a>]
- </td></tr></table>
-
- <p>The following explanations are for quick reference and are lifted directly from the original <a href="http://www.clarkware.com/software/JDepend.html">JDepend documentation</a>.</p>
-
- <h3><a name="EXnumber">Number of Classes</a></h3>
- <p>The number of concrete and abstract classes (and interfaces) in the package is an indicator of the extensibility of the package.</p>
- <h3><a name="EXafferent">Afferent Couplings</a></h3>
- <p>The number of other packages that depend upon classes within the package is an indicator of the package's responsibility. </p>
- <h3><a name="EXefferent">Efferent Couplings</a></h3>
- <p>The number of other packages that the classes in the package depend upon is an indicator of the package's independence. </p>
- <h3><a name="EXabstractness">Abstractness</a></h3>
- <p>The ratio of the number of abstract classes (and interfaces) in the analyzed package to the total number of classes in the analyzed package. </p>
- <p>The range for this metric is 0 to 1, with A=0 indicating a completely concrete package and A=1 indicating a completely abstract package. </p>
- <h3><a name="EXinstability">Instability</a></h3>
- <p>The ratio of efferent coupling (Ce) to total coupling (Ce / (Ce + Ca)). This metric is an indicator of the package's resilience to change. </p>
- <p>The range for this metric is 0 to 1, with I=0 indicating a completely stable package and I=1 indicating a completely instable package. </p>
- <h3><a name="EXdistance">Distance</a></h3>
- <p>The perpendicular distance of a package from the idealized line A + I = 1. This metric is an indicator of the package's balance between abstractness and stability. </p>
- <p>A package squarely on the main sequence is optimally balanced with respect to its abstractness and stability. Ideal packages are either completely abstract and stable (x=0, y=1) or completely concrete and instable (x=1, y=0). </p>
- <p>The range for this metric is 0 to 1, with D=0 indicating a package that is coincident with the main sequence and D=1 indicating a package that is as far from the main sequence as possible. </p>
-
- </body>
- </html>
+ </tr>
+ </xsl:if>
+ </xsl:for-each>
+ <xsl:for-each select="./Packages/Package">
+ <xsl:if test="count(error) > 0">
+ <tr>
+ <td align="left">
+ <xsl:value-of select="@name"/>
+ </td>
+ <td align="left" colspan="8"><xsl:value-of select="error"/></td>
+ </tr>
+ </xsl:if>
+ </xsl:for-each>
+ </table>
+
+ <table width="100%"><tr><td>
+ <a name="NVpackages"><h2>Packages</h2></a>
+ </td><td align="right">
+ [<a href="#NVsummary">summary</a>]
+ [<a href="#NVpackages">packages</a>]
+ [<a href="#NVcycles">cycles</a>]
+ [<a href="#NVexplanations">explanations</a>]
+ </td></tr></table>
+
+ <xsl:for-each select="./Packages/Package">
+ <xsl:if test="count(error) = 0">
+ <h3><a><xsl:attribute name="name">PK<xsl:value-of select="@name"/></xsl:attribute>
+ <xsl:value-of select="@name"/></a></h3>
+
+ <table width="100%"><tr>
+ <td><a href="#EXafferent">Afferent Couplings</a>: <xsl:value-of select="Stats/Ca"/></td>
+ <td><a href="#EXefferent">Efferent Couplings</a>: <xsl:value-of select="Stats/Ce"/></td>
+ <td><a href="#EXabstractness">Abstractness</a>: <xsl:value-of select="Stats/A"/></td>
+ <td><a href="#EXinstability">Instability</a>: <xsl:value-of select="Stats/I"/></td>
+ <td><a href="#EXdistance">Distance</a>: <xsl:value-of select="Stats/D"/></td>
+ </tr></table>
+
+ <table width="100%" class="details">
+ <tr>
+ <th>Abstract Classes</th>
+ <th>Concrete Classes</th>
+ <th>Used by Packages</th>
+ <th>Uses Packages</th>
+ </tr>
+ <tr>
+ <td valign="top" width="25%">
+ <xsl:if test="count(AbstractClasses/Class)=0">
+ <i>None</i>
+ </xsl:if>
+ <xsl:for-each select="AbstractClasses/Class">
+ <xsl:value-of select="node()"/><br/>
+ </xsl:for-each>
+ </td>
+ <td valign="top" width="25%">
+ <xsl:if test="count(ConcreteClasses/Class)=0">
+ <i>None</i>
+ </xsl:if>
+ <xsl:for-each select="ConcreteClasses/Class">
+ <xsl:value-of select="node()"/><br/>
+ </xsl:for-each>
+ </td>
+ <td valign="top" width="25%">
+ <xsl:if test="count(UsedBy/Package)=0">
+ <i>None</i>
+ </xsl:if>
+ <xsl:for-each select="UsedBy/Package">
+ <a>
+ <xsl:attribute name="href">#PK<xsl:value-of select="node()"/></xsl:attribute>
+ <xsl:value-of select="node()"/>
+ </a><br/>
+ </xsl:for-each>
+ </td>
+ <td valign="top" width="25%">
+ <xsl:if test="count(DependsUpon/Package)=0">
+ <i>None</i>
+ </xsl:if>
+ <xsl:for-each select="DependsUpon/Package">
+ <a>
+ <xsl:attribute name="href">#PK<xsl:value-of select="node()"/></xsl:attribute>
+ <xsl:value-of select="node()"/>
+ </a><br/>
+ </xsl:for-each>
+ </td>
+ </tr>
+ </table>
+ </xsl:if>
+ </xsl:for-each>
+
+ <table width="100%"><tr><td>
+ <a name="NVcycles"><h2>Cycles</h2></a>
+ </td><td align="right">
+ [<a href="#NVsummary">summary</a>]
+ [<a href="#NVpackages">packages</a>]
+ [<a href="#NVcycles">cycles</a>]
+ [<a href="#NVexplanations">explanations</a>]
+ </td></tr></table>
+
+ <xsl:if test="count(Cycles/Package) = 0">
+ <p>There are no cyclic dependancies.</p>
+ </xsl:if>
+ <xsl:for-each select="Cycles/Package">
+ <h3><xsl:value-of select="@Name"/></h3><p>
+ <xsl:for-each select="Package">
+ <xsl:value-of select="."/><br/>
+ </xsl:for-each></p>
+ </xsl:for-each>
+
+ <table width="100%"><tr><td>
+ <a name="NVexplanations"><h2>Explanations</h2></a>
+ </td><td align="right">
+ [<a href="#NVsummary">summary</a>]
+ [<a href="#NVpackages">packages</a>]
+ [<a href="#NVcycles">cycles</a>]
+ [<a href="#NVexplanations">explanations</a>]
+ </td></tr></table>
+
+ <p>The following explanations are for quick reference and are lifted directly from the original <a href="http://www.clarkware.com/software/JDepend.html">JDepend documentation</a>.</p>
+
+ <h3><a name="EXnumber">Number of Classes</a></h3>
+ <p>The number of concrete and abstract classes (and interfaces) in the package is an indicator of the extensibility of the package.</p>
+ <h3><a name="EXafferent">Afferent Couplings</a></h3>
+ <p>The number of other packages that depend upon classes within the package is an indicator of the package's responsibility. </p>
+ <h3><a name="EXefferent">Efferent Couplings</a></h3>
+ <p>The number of other packages that the classes in the package depend upon is an indicator of the package's independence. </p>
+ <h3><a name="EXabstractness">Abstractness</a></h3>
+ <p>The ratio of the number of abstract classes (and interfaces) in the analyzed package to the total number of classes in the analyzed package. </p>
+ <p>The range for this metric is 0 to 1, with A=0 indicating a completely concrete package and A=1 indicating a completely abstract package. </p>
+ <h3><a name="EXinstability">Instability</a></h3>
+ <p>The ratio of efferent coupling (Ce) to total coupling (Ce / (Ce + Ca)). This metric is an indicator of the package's resilience to change. </p>
+ <p>The range for this metric is 0 to 1, with I=0 indicating a completely stable package and I=1 indicating a completely instable package. </p>
+ <h3><a name="EXdistance">Distance</a></h3>
+ <p>The perpendicular distance of a package from the idealized line A + I = 1. This metric is an indicator of the package's balance between abstractness and stability. </p>
+ <p>A package squarely on the main sequence is optimally balanced with respect to its abstractness and stability. Ideal packages are either completely abstract and stable (x=0, y=1) or completely concrete and instable (x=1, y=0). </p>
+ <p>The range for this metric is 0 to 1, with D=0 indicating a package that is coincident with the main sequence and D=1 indicating a package that is as far from the main sequence as possible. </p>
+
+ </body>
+ </html>
</xsl:template>
</xsl:stylesheet>
Modified: trunk/tools/etc/junit-frames.xsl
===================================================================
--- trunk/tools/etc/junit-frames.xsl 2007-07-30 12:43:44 UTC (rev 7841)
+++ trunk/tools/etc/junit-frames.xsl 2007-07-30 12:59:36 UTC (rev 7842)
@@ -1,73 +1,34 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:lxslt="http://xml.apache.org/xslt"
- xmlns:redirect="org.apache.xalan.xslt.extensions.Redirect"
+ xmlns:redirect="http://xml.apache.org/xalan/redirect"
+ xmlns:stringutils="xalan://org.apache.tools.ant.util.StringUtils"
extension-element-prefixes="redirect">
<xsl:output method="html" indent="yes" encoding="US-ASCII"/>
<xsl:decimal-format decimal-separator="." grouping-separator=","/>
<!--
- The Apache Software License, Version 1.1
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
- Copyright (c) 2001-2002 The Apache Software Foundation. All rights
- reserved.
+ http://www.apache.org/licenses/LICENSE-2.0
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
+<!--
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
+ Sample stylesheet to be used with Ant JUnitReport output.
- 3. The end-user documentation included with the redistribution, if
- any, must include the following acknowlegement:
- "This product includes software developed by the
- Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowlegement may appear in the software itself,
- if and wherever such third-party acknowlegements normally appear.
-
- 4. The names "The Jakarta Project", "Ant", and "Apache Software
- Foundation" must not be used to endorse or promote products derived
- from this software without prior written permission. For written
- permission, please contact apache(a)apache.org.
-
- 5. Products derived from this software may not be called "Apache"
- nor may "Apache" appear in their names without prior written
- permission of the Apache Group.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- SUCH DAMAGE.
- ====================================================================
-
- This software consists of voluntary contributions made by many
- individuals on behalf of the Apache Software Foundation. For more
- information on the Apache Software Foundation, please see
- <http://www.apache.org/>.
- -->
-
-<!--
-
- Sample stylesheet to be used with An JUnitReport output.
-
It creates a set of HTML files a la javadoc where you can browse easily
through all packages and classes.
-
- @author Stephane Bailliez <a href="mailto:sbailliez@apache.org"/>
- @author Erik Hatcher <a href="mailto:ehatcher@apache.org"/>
-
+
-->
<xsl:param name="output.dir" select="'.'"/>
@@ -92,13 +53,32 @@
<redirect:write file="{$output.dir}/overview-frame.html">
<xsl:apply-templates select="." mode="all.packages"/>
</redirect:write>
-
+
<!-- create the all-classes.html at the root -->
<redirect:write file="{$output.dir}/allclasses-frame.html">
<xsl:apply-templates select="." mode="all.classes"/>
</redirect:write>
-
- <!-- process all packages -->
+
+ <!-- create the all-tests.html at the root -->
+ <redirect:write file="{$output.dir}/all-tests.html">
+ <xsl:apply-templates select="." mode="all.tests"/>
+ </redirect:write>
+
+ <!-- create the alltests-fails.html at the root -->
+ <redirect:write file="{$output.dir}/alltests-fails.html">
+ <xsl:apply-templates select="." mode="all.tests">
+ <xsl:with-param name="type" select="'fails'"/>
+ </xsl:apply-templates>
+ </redirect:write>
+
+ <!-- create the alltests-errors.html at the root -->
+ <redirect:write file="{$output.dir}/alltests-errors.html">
+ <xsl:apply-templates select="." mode="all.tests">
+ <xsl:with-param name="type" select="'errors'"/>
+ </xsl:apply-templates>
+ </redirect:write>
+
+ <!-- process all packages -->
<xsl:for-each select="./testsuite[not(./@package = preceding-sibling::testsuite/@package)]">
<xsl:call-template name="package">
<xsl:with-param name="name" select="@package"/>
@@ -112,7 +92,7 @@
<xsl:variable name="package.dir">
<xsl:if test="not($name = '')"><xsl:value-of select="translate($name,'.','/')"/></xsl:if>
<xsl:if test="$name = ''">.</xsl:if>
- </xsl:variable>
+ </xsl:variable>
<!--Processing package <xsl:value-of select="@name"/> in <xsl:value-of select="$output.dir"/> -->
<!-- create a classes-list.html in the package directory -->
<redirect:write file="{$output.dir}/{$package.dir}/package-frame.html">
@@ -120,21 +100,45 @@
<xsl:with-param name="name" select="$name"/>
</xsl:call-template>
</redirect:write>
-
+
<!-- create a package-summary.html in the package directory -->
<redirect:write file="{$output.dir}/{$package.dir}/package-summary.html">
<xsl:call-template name="package.summary">
<xsl:with-param name="name" select="$name"/>
</xsl:call-template>
</redirect:write>
-
+
<!-- for each class, creates a @name.html -->
<!-- @bug there will be a problem with inner classes having the same name, it will be overwritten -->
- <xsl:for-each select="/testsuites/testsuite[@package = $name]">
- <redirect:write file="{$output.dir}/{$package.dir}/{(a)name}.html">
- <xsl:apply-templates select="." mode="class.details"/>
- </redirect:write>
- </xsl:for-each>
+ <xsl:for-each select="/testsuites/testsuite[@package = $name]">
+ <redirect:write file="{$output.dir}/{$package.dir}/{@id}_{(a)name}.html">
+ <xsl:apply-templates select="." mode="class.details"/>
+ </redirect:write>
+ <xsl:if test="string-length(./system-out)!=0">
+ <redirect:write file="{$output.dir}/{$package.dir}/{@id}_{(a)name}-out.txt">
+ <xsl:value-of disable-output-escaping="yes" select="./system-out"/>
+ </redirect:write>
+ </xsl:if>
+ <xsl:if test="string-length(./system-err)!=0">
+ <redirect:write file="{$output.dir}/{$package.dir}/{@id}_{(a)name}-err.txt">
+ <xsl:value-of disable-output-escaping="yes" select="./system-err"/>
+ </redirect:write>
+ </xsl:if>
+ <xsl:if test="@failures != 0">
+ <redirect:write file="{$output.dir}/{$package.dir}/{@id}_{(a)name}-fails.html">
+ <xsl:apply-templates select="." mode="class.details">
+ <xsl:with-param name="type" select="'fails'"/>
+ </xsl:apply-templates>
+ </redirect:write>
+ </xsl:if>
+ <xsl:if test="@errors != 0">
+ <redirect:write file="{$output.dir}/{$package.dir}/{@id}_{(a)name}-errors.html">
+ <xsl:apply-templates select="." mode="class.details">
+ <xsl:with-param name="type" select="'errors'"/>
+ </xsl:apply-templates>
+ </redirect:write>
+ </xsl:if>
+ </xsl:for-each>
</xsl:template>
<xsl:template name="index.html">
@@ -209,13 +213,79 @@
}
</xsl:template>
+<!-- Create list of all/failed/errored tests -->
+<xsl:template match="testsuites" mode="all.tests">
+ <xsl:param name="type" select="'all'"/>
+ <html>
+ <xsl:variable name="title">
+ <xsl:choose>
+ <xsl:when test="$type = 'fails'">
+ <xsl:text>All Failures</xsl:text>
+ </xsl:when>
+ <xsl:when test="$type = 'errors'">
+ <xsl:text>All Errors</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>All Tests</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <head>
+ <title>Unit Test Results: <xsl:value-of select="$title"/></title>
+ <xsl:call-template name="create.stylesheet.link">
+ <xsl:with-param name="package.name"/>
+ </xsl:call-template>
+ </head>
+ <body>
+ <xsl:attribute name="onload">open('allclasses-frame.html','classListFrame')</xsl:attribute>
+ <xsl:call-template name="pageHeader"/>
+ <h2><xsl:value-of select="$title"/></h2>
+ <table class="details" border="0" cellpadding="5" cellspacing="2" width="95%">
+ <xsl:call-template name="testcase.test.header">
+ <xsl:with-param name="show.class" select="'yes'"/>
+ </xsl:call-template>
+ <!--
+ test can even not be started at all (failure to load the class)
+ so report the error directly
+ -->
+ <xsl:if test="./error">
+ <tr class="Error">
+ <td colspan="4">
+ <xsl:apply-templates select="./error"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:choose>
+ <xsl:when test="$type = 'fails'">
+ <xsl:apply-templates select=".//testcase[failure]" mode="print.test">
+ <xsl:with-param name="show.class" select="'yes'"/>
+ </xsl:apply-templates>
+ </xsl:when>
+ <xsl:when test="$type = 'errors'">
+ <xsl:apply-templates select=".//testcase[error]" mode="print.test">
+ <xsl:with-param name="show.class" select="'yes'"/>
+ </xsl:apply-templates>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select=".//testcase" mode="print.test">
+ <xsl:with-param name="show.class" select="'yes'"/>
+ </xsl:apply-templates>
+ </xsl:otherwise>
+ </xsl:choose>
+ </table>
+ </body>
+ </html>
+</xsl:template>
+
+
<!-- ======================================================================
This page is created for every testsuite class.
It prints a summary of the testsuite and detailed information about
testcase methods.
====================================================================== -->
<xsl:template match="testsuite" mode="class.details">
+ <xsl:param name="type" select="'all'"/>
<xsl:variable name="package.name" select="@package"/>
<xsl:variable name="class.name"><xsl:if test="not($package.name = '')"><xsl:value-of select="$package.name"/>.</xsl:if><xsl:value-of select="@name"/></xsl:variable>
<html>
@@ -232,7 +302,8 @@
<script type="text/javascript" language="JavaScript"><![CDATA[
function displayProperties (name) {
var win = window.open('','JUnitSystemProperties','scrollbars=1,resizable=1');
- var doc = win.document.open();
+ var doc = win.document;
+ doc.open();
doc.write("<html><head><title>Properties of " + name + "</title>");
doc.write("<style type=\"text/css\">");
doc.write("body {font:normal 68% verdana,arial,helvetica; color:#000000; }");
@@ -255,32 +326,52 @@
doc.close();
win.focus();
}
- ]]>
+ ]]>
</script>
</head>
<body>
- <xsl:call-template name="pageHeader"/>
+ <xsl:call-template name="pageHeader"/>
<h3>Class <xsl:value-of select="$class.name"/></h3>
-
+
<table class="details" border="0" cellpadding="5" cellspacing="2" width="95%">
<xsl:call-template name="testsuite.test.header"/>
<xsl:apply-templates select="." mode="print.test"/>
</table>
-
- <h2>Tests</h2>
+
+ <xsl:choose>
+ <xsl:when test="$type = 'fails'">
+ <h2>Failures</h2>
+ </xsl:when>
+ <xsl:when test="$type = 'errors'">
+ <h2>Errors</h2>
+ </xsl:when>
+ <xsl:otherwise>
+ <h2>Tests</h2>
+ </xsl:otherwise>
+ </xsl:choose>
<table class="details" border="0" cellpadding="5" cellspacing="2" width="95%">
- <xsl:call-template name="testcase.test.header"/>
- <!--
- test can even not be started at all (failure to load the class)
- so report the error directly
- -->
+ <xsl:call-template name="testcase.test.header"/>
+ <!--
+ test can even not be started at all (failure to load the class)
+ so report the error directly
+ -->
<xsl:if test="./error">
<tr class="Error">
<td colspan="4"><xsl:apply-templates select="./error"/></td>
</tr>
</xsl:if>
- <xsl:apply-templates select="./testcase" mode="print.test"/>
+ <xsl:choose>
+ <xsl:when test="$type = 'fails'">
+ <xsl:apply-templates select="./testcase[failure]" mode="print.test"/>
+ </xsl:when>
+ <xsl:when test="$type = 'errors'">
+ <xsl:apply-templates select="./testcase[error]" mode="print.test"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="./testcase" mode="print.test"/>
+ </xsl:otherwise>
+ </xsl:choose>
</table>
<div class="Properties">
<a>
@@ -288,6 +379,22 @@
Properties »
</a>
</div>
+ <xsl:if test="string-length(./system-out)!=0">
+ <div class="Properties">
+ <a>
+ <xsl:attribute name="href">./<xsl:value-of select="@id"/>_<xsl:value-of select="@name"/>-out.txt</xsl:attribute>
+ System.out »
+ </a>
+ </div>
+ </xsl:if>
+ <xsl:if test="string-length(./system-err)!=0">
+ <div class="Properties">
+ <a>
+ <xsl:attribute name="href">./<xsl:value-of select="@id"/>_<xsl:value-of select="@name"/>-err.txt</xsl:attribute>
+ System.err »
+ </a>
+ </div>
+ </xsl:if>
</body>
</html>
</xsl:template>
@@ -324,18 +431,21 @@
<table width="100%">
<tr>
<td nowrap="nowrap">
- <h2><a href="package-summary.html" target="classFrame"><xsl:value-of select="$name"/></a></h2>
+ <h2><a href="package-summary.html" target="classFrame">
+ <xsl:value-of select="$name"/>
+ <xsl:if test="$name = ''"><none></xsl:if>
+ </a></h2>
</td>
</tr>
</table>
-
+
<h2>Classes</h2>
<table width="100%">
<xsl:for-each select="/testsuites/testsuite[./@package = $name]">
<xsl:sort select="@name"/>
<tr>
<td nowrap="nowrap">
- <a href="{(a)name}.html" target="classFrame"><xsl:value-of select="@name"/></a>
+ <a href="{@id}_{(a)name}.html" target="classFrame"><xsl:value-of select="@name"/></a>
</td>
</tr>
</xsl:for-each>
@@ -376,7 +486,7 @@
<xsl:attribute name="href">
<xsl:if test="not($package.name='')">
<xsl:value-of select="translate($package.name,'.','/')"/><xsl:text>/</xsl:text>
- </xsl:if><xsl:value-of select="@name"/><xsl:text>.html</xsl:text>
+ </xsl:if><xsl:value-of select="@id"/>_<xsl:value-of select="@name"/><xsl:text>.html</xsl:text>
</xsl:attribute>
<xsl:value-of select="@name"/>
</a>
@@ -413,8 +523,9 @@
<xsl:template match="testsuite" mode="all.packages">
<tr>
<td nowrap="nowrap">
- <a href="{translate(@package,'.','/')}/package-summary.html" target="classFrame">
+ <a href="./{translate(@package,'.','/')}/package-summary.html" target="classFrame">
<xsl:value-of select="@package"/>
+ <xsl:if test="@package = ''"><none></xsl:if>
</a>
</td>
</tr>
@@ -454,9 +565,9 @@
<xsl:otherwise>Pass</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
- <td><xsl:value-of select="$testCount"/></td>
- <td><xsl:value-of select="$failureCount"/></td>
- <td><xsl:value-of select="$errorCount"/></td>
+ <td><a title="Display all tests" href="all-tests.html"><xsl:value-of select="$testCount"/></a></td>
+ <td><a title="Display all failures" href="alltests-fails.html"><xsl:value-of select="$failureCount"/></a></td>
+ <td><a title="Display all errors" href="alltests-errors.html"><xsl:value-of select="$errorCount"/></a></td>
<td>
<xsl:call-template name="display-percent">
<xsl:with-param name="value" select="$successRate"/>
@@ -467,7 +578,6 @@
<xsl:with-param name="value" select="$timeCount"/>
</xsl:call-template>
</td>
-
</tr>
</table>
<table border="0" width="95%">
@@ -477,7 +587,7 @@
</td>
</tr>
</table>
-
+
<h2>Packages</h2>
<table class="details" border="0" cellpadding="5" cellspacing="2" width="95%">
<xsl:call-template name="testsuite.test.header"/>
@@ -494,7 +604,10 @@
<xsl:otherwise>Pass</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
- <td><a href="{translate(@package,'.','/')}/package-summary.html"><xsl:value-of select="@package"/></a></td>
+ <td><a href="./{translate(@package,'.','/')}/package-summary.html">
+ <xsl:value-of select="@package"/>
+ <xsl:if test="@package = ''"><none></xsl:if>
+ </a></td>
<td><xsl:value-of select="sum($insamepackage/@tests)"/></td>
<td><xsl:value-of select="sum($insamepackage/@errors)"/></td>
<td><xsl:value-of select="sum($insamepackage/@failures)"/></td>
@@ -503,6 +616,8 @@
<xsl:with-param name="value" select="sum($insamepackage/@time)"/>
</xsl:call-template>
</td>
+ <td><xsl:value-of select="$insamepackage/@timestamp"/></td>
+ <td><xsl:value-of select="$insamepackage/@hostname"/></td>
</tr>
</xsl:for-each>
</table>
@@ -523,12 +638,12 @@
<xsl:attribute name="onload">open('package-frame.html','classListFrame')</xsl:attribute>
<xsl:call-template name="pageHeader"/>
<h3>Package <xsl:value-of select="$name"/></h3>
-
+
<!--table border="0" cellpadding="5" cellspacing="2" width="95%">
<xsl:call-template name="class.metrics.header"/>
<xsl:apply-templates select="." mode="print.metrics"/>
</table-->
-
+
<xsl:variable name="insamepackage" select="/testsuites/testsuite[./@package = $name]"/>
<xsl:if test="count($insamepackage) > 0">
<h2>Classes</h2>
@@ -553,13 +668,13 @@
<xsl:template name="path">
<xsl:param name="path"/>
<xsl:if test="contains($path,'.')">
- <xsl:text>../</xsl:text>
+ <xsl:text>../</xsl:text>
<xsl:call-template name="path">
<xsl:with-param name="path"><xsl:value-of select="substring-after($path,'.')"/></xsl:with-param>
- </xsl:call-template>
+ </xsl:call-template>
</xsl:if>
<xsl:if test="not(contains($path,'.')) and not($path = '')">
- <xsl:text>../</xsl:text>
+ <xsl:text>../</xsl:text>
</xsl:if>
</xsl:template>
@@ -577,7 +692,7 @@
<table width="100%">
<tr>
<td align="left"></td>
- <td align="right">Designed for use with <a href="http://www.junit.org/">JUnit</a> and <a href="http://jakarta.apache.org/">Ant</a>.</td>
+ <td align="right">Designed for use with <a href="http://www.junit.org/">JUnit</a> and <a href="http://ant.apache.org/">Ant</a>.</td>
</tr>
</table>
<hr size="1"/>
@@ -591,12 +706,18 @@
<th>Errors</th>
<th>Failures</th>
<th nowrap="nowrap">Time(s)</th>
+ <th nowrap="nowrap">Time Stamp</th>
+ <th>Host</th>
</tr>
</xsl:template>
<!-- method header -->
<xsl:template name="testcase.test.header">
+ <xsl:param name="show.class" select="''"/>
<tr valign="top">
+ <xsl:if test="boolean($show.class)">
+ <th>Class</th>
+ </xsl:if>
<th>Name</th>
<th>Status</th>
<th width="80%">Type</th>
@@ -607,7 +728,7 @@
<!-- class information -->
<xsl:template match="testsuite" mode="print.test">
- <tr valign="top">
+ <tr valign="top">
<xsl:attribute name="class">
<xsl:choose>
<xsl:when test="@errors[.> 0]">Error</xsl:when>
@@ -615,18 +736,39 @@
<xsl:otherwise>Pass</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
- <td><a href="{(a)name}.html"><xsl:value-of select="@name"/></a></td>
- <td><xsl:apply-templates select="@tests"/></td>
- <td><xsl:apply-templates select="@errors"/></td>
- <td><xsl:apply-templates select="@failures"/></td>
+ <td><a title="Display all tests" href="{@id}_{(a)name}.html"><xsl:value-of select="@name"/></a></td>
+ <td><a title="Display all tests" href="{@id}_{(a)name}.html"><xsl:apply-templates select="@tests"/></a></td>
+ <td>
+ <xsl:choose>
+ <xsl:when test="@errors != 0">
+ <a title="Display only errors" href="{@id}_{(a)name}-errors.html"><xsl:apply-templates select="@errors"/></a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="@errors"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </td>
+ <td>
+ <xsl:choose>
+ <xsl:when test="@failures != 0">
+ <a title="Display only failures" href="{@id}_{(a)name}-fails.html"><xsl:apply-templates select="@failures"/></a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="@failures"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </td>
<td><xsl:call-template name="display-time">
<xsl:with-param name="value" select="@time"/>
</xsl:call-template>
</td>
+ <td><xsl:apply-templates select="@timestamp"/></td>
+ <td><xsl:apply-templates select="@hostname"/></td>
</tr>
</xsl:template>
<xsl:template match="testcase" mode="print.test">
+ <xsl:param name="show.class" select="''"/>
<tr valign="top">
<xsl:attribute name="class">
<xsl:choose>
@@ -635,7 +777,23 @@
<xsl:otherwise>TableRowColor</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
- <td><xsl:value-of select="@name"/></td>
+ <xsl:variable name="class.href">
+ <xsl:value-of select="concat(translate(../@package,'.','/'), '/', ../@id, '_', ../@name, '.html')"/>
+ </xsl:variable>
+ <xsl:if test="boolean($show.class)">
+ <td><a href="{$class.href}"><xsl:value-of select="../@name"/></a></td>
+ </xsl:if>
+ <td>
+ <a name="{@name}"/>
+ <xsl:choose>
+ <xsl:when test="boolean($show.class)">
+ <a href="{concat($class.href, '#', @name)}"><xsl:value-of select="@name"/></a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="@name"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </td>
<xsl:choose>
<xsl:when test="failure">
<td>Failure</td>
@@ -690,21 +848,9 @@
<xsl:template name="JS-escape">
<xsl:param name="string"/>
- <xsl:choose>
- <xsl:when test="contains($string,"'")">
- <xsl:value-of select="substring-before($string,"'")"/>\'<xsl:call-template name="JS-escape">
- <xsl:with-param name="string" select="substring-after($string,"'")"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="contains($string,'\')">
- <xsl:value-of select="substring-before($string,'\')"/>\\<xsl:call-template name="JS-escape">
- <xsl:with-param name="string" select="substring-after($string,'\')"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$string"/>
- </xsl:otherwise>
- </xsl:choose>
+ <xsl:param name="tmp1" select="stringutils:replace(string($string),'\','\\')"/>
+ <xsl:param name="tmp2" select="stringutils:replace(string($tmp1),"'","\'")"/>
+ <xsl:value-of select="$tmp2"/>
</xsl:template>
@@ -714,18 +860,7 @@
-->
<xsl:template name="br-replace">
<xsl:param name="word"/>
- <xsl:choose>
- <xsl:when test="contains($word,'
')">
- <xsl:value-of select="substring-before($word,'
')"/>
- <br/>
- <xsl:call-template name="br-replace">
- <xsl:with-param name="word" select="substring-after($word,'
')"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$word"/>
- </xsl:otherwise>
- </xsl:choose>
+ <xsl:value-of disable-output-escaping="yes" select='stringutils:replace(string($word),"
","<br/>")'/>
</xsl:template>
<xsl:template name="display-time">
@@ -738,4 +873,3 @@
<xsl:value-of select="format-number($value,'0.00%')"/>
</xsl:template>
</xsl:stylesheet>
-
Modified: trunk/tools/etc/junit-noframes.xsl
===================================================================
--- trunk/tools/etc/junit-noframes.xsl 2007-07-30 12:43:44 UTC (rev 7841)
+++ trunk/tools/etc/junit-noframes.xsl 2007-07-30 12:59:36 UTC (rev 7842)
@@ -1,71 +1,33 @@
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+ xmlns:lxslt="http://xml.apache.org/xslt"
+ xmlns:stringutils="xalan://org.apache.tools.ant.util.StringUtils">
<xsl:output method="html" indent="yes" encoding="US-ASCII"
doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN" />
<xsl:decimal-format decimal-separator="." grouping-separator="," />
<!--
- The Apache Software License, Version 1.1
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
- Copyright (c) 2001-2002 The Apache Software Foundation. All rights
- reserved.
+ http://www.apache.org/licenses/LICENSE-2.0
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
+<!--
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
+ Sample stylesheet to be used with Ant JUnitReport output.
- 3. The end-user documentation included with the redistribution, if
- any, must include the following acknowlegement:
- "This product includes software developed by the
- Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowlegement may appear in the software itself,
- if and wherever such third-party acknowlegements normally appear.
-
- 4. The names "The Jakarta Project", "Ant", and "Apache Software
- Foundation" must not be used to endorse or promote products derived
- from this software without prior written permission. For written
- permission, please contact apache(a)apache.org.
-
- 5. Products derived from this software may not be called "Apache"
- nor may "Apache" appear in their names without prior written
- permission of the Apache Group.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- SUCH DAMAGE.
- ====================================================================
-
- This software consists of voluntary contributions made by many
- individuals on behalf of the Apache Software Foundation. For more
- information on the Apache Software Foundation, please see
- <http://www.apache.org/>.
- -->
-
-<!--
-
- Sample stylesheet to be used with An JUnitReport output.
-
It creates a non-framed report that can be useful to send via
e-mail or such.
-
- @author Stephane Bailliez <a href="mailto:sbailliez@apache.org"/>
- @author Erik Hatcher <a href="mailto:ehatcher@apache.org"/>
-
+
-->
<xsl:template match="testsuites">
<html>
@@ -87,7 +49,7 @@
table.details tr td{
background:#eeeee0;
}
-
+
p {
line-height:1.5em;
margin-top:0.5em; margin-bottom:1.0em;
@@ -123,7 +85,7 @@
<script type="text/javascript" language="JavaScript">
var TestCases = new Array();
var cur;
- <xsl:for-each select="./testsuite">
+ <xsl:for-each select="./testsuite">
<xsl:apply-templates select="properties"/>
</xsl:for-each>
@@ -131,7 +93,8 @@
<script type="text/javascript" language="JavaScript"><![CDATA[
function displayProperties (name) {
var win = window.open('','JUnitSystemProperties','scrollbars=1,resizable=1');
- var doc = win.document.open();
+ var doc = win.document;
+ doc.open();
doc.write("<html><head><title>Properties of " + name + "</title>");
doc.write("<style>")
doc.write("body {font:normal 68% verdana,arial,helvetica; color:#000000; }");
@@ -154,39 +117,39 @@
doc.close();
win.focus();
}
- ]]>
+ ]]>
</script>
</head>
<body>
<a name="top"></a>
- <xsl:call-template name="pageHeader"/>
-
+ <xsl:call-template name="pageHeader"/>
+
<!-- Summary part -->
<xsl:call-template name="summary"/>
<hr size="1" width="95%" align="left"/>
-
+
<!-- Package List part -->
<xsl:call-template name="packagelist"/>
<hr size="1" width="95%" align="left"/>
-
+
<!-- For each package create its part -->
<xsl:call-template name="packages"/>
<hr size="1" width="95%" align="left"/>
-
+
<!-- For each class create the part -->
<xsl:call-template name="classes"/>
-
+
</body>
</html>
</xsl:template>
-
-
-
+
+
+
<!-- ================================================================== -->
<!-- Write a list of all packages with an hyperlink to the anchor of -->
<!-- of the package name. -->
<!-- ================================================================== -->
- <xsl:template name="packagelist">
+ <xsl:template name="packagelist">
<h2>Packages</h2>
Note: package statistics are not computed recursively, they only sum up all of its testsuites numbers.
<table class="details" border="0" cellpadding="5" cellspacing="2" width="95%">
@@ -199,7 +162,7 @@
<xsl:variable name="errorCount" select="sum($testsuites-in-package/@errors)"/>
<xsl:variable name="failureCount" select="sum($testsuites-in-package/@failures)"/>
<xsl:variable name="timeCount" select="sum($testsuites-in-package/@time)"/>
-
+
<!-- write a summary for the package -->
<tr valign="top">
<!-- set a nice color depending if there is an error/failure -->
@@ -218,12 +181,14 @@
<xsl:with-param name="value" select="$timeCount"/>
</xsl:call-template>
</td>
+ <td><xsl:value-of select="$testsuites-in-package/@timestamp"/></td>
+ <td><xsl:value-of select="$testsuites-in-package/@hostname"/></td>
</tr>
</xsl:for-each>
- </table>
+ </table>
</xsl:template>
-
-
+
+
<!-- ================================================================== -->
<!-- Write a package level report -->
<!-- It creates a table with values from the document: -->
@@ -235,10 +200,10 @@
<xsl:sort select="@package"/>
<a name="{@package}"></a>
<h3>Package <xsl:value-of select="@package"/></h3>
-
+
<table class="details" border="0" cellpadding="5" cellspacing="2" width="95%">
<xsl:call-template name="testsuite.test.header"/>
-
+
<!-- match the testsuites of this package -->
<xsl:apply-templates select="/testsuites/testsuite[./@package = current()/@package]" mode="print.test"/>
</table>
@@ -247,14 +212,14 @@
<p/>
</xsl:for-each>
</xsl:template>
-
+
<xsl:template name="classes">
<xsl:for-each select="testsuite">
<xsl:sort select="@name"/>
<!-- create an anchor to this class name -->
<a name="{@name}"></a>
<h3>TestCase <xsl:value-of select="@name"/></h3>
-
+
<table class="details" border="0" cellpadding="5" cellspacing="2" width="95%">
<xsl:call-template name="testcase.test.header"/>
<!--
@@ -275,11 +240,11 @@
</a>
</div>
<p/>
-
+
<a href="#top">Back to top</a>
</xsl:for-each>
</xsl:template>
-
+
<xsl:template name="summary">
<h2>Summary</h2>
<xsl:variable name="testCount" select="sum(testsuite/@tests)"/>
@@ -326,7 +291,7 @@
</tr>
</table>
</xsl:template>
-
+
<!--
Write properties into a JavaScript data structure.
This is based on the original idea by Erik Hatcher (ehatcher(a)apache.org)
@@ -338,14 +303,14 @@
cur['<xsl:value-of select="@name"/>'] = '<xsl:call-template name="JS-escape"><xsl:with-param name="string" select="@value"/></xsl:call-template>';
</xsl:for-each>
</xsl:template>
-
+
<!-- Page HEADER -->
<xsl:template name="pageHeader">
<h1>Unit Test Results</h1>
<table width="100%">
<tr>
<td align="left"></td>
- <td align="right">Designed for use with <a href='http://www.junit.org'>JUnit</a> and <a href='http://jakarta.apache.org/ant'>Ant</a>.</td>
+ <td align="right">Designed for use with <a href='http://www.junit.org'>JUnit</a> and <a href='http://ant.apache.org/ant'>Ant</a>.</td>
</tr>
</table>
<hr size="1"/>
@@ -369,6 +334,8 @@
<th>Errors</th>
<th>Failures</th>
<th nowrap="nowrap">Time(s)</th>
+ <th nowrap="nowrap">Time Stamp</th>
+ <th>Host</th>
</tr>
</xsl:template>
@@ -393,7 +360,7 @@
<xsl:when test="@errors[.> 0]">Error</xsl:when>
</xsl:choose>
</xsl:attribute>
-
+
<!-- print testsuite information -->
<td><a href="#{@name}"><xsl:value-of select="@name"/></a></td>
<td><xsl:value-of select="@tests"/></td>
@@ -404,6 +371,8 @@
<xsl:with-param name="value" select="@time"/>
</xsl:call-template>
</td>
+ <td><xsl:apply-templates select="@timestamp"/></td>
+ <td><xsl:apply-templates select="@hostname"/></td>
</tr>
</xsl:template>
@@ -467,21 +436,9 @@
<xsl:template name="JS-escape">
<xsl:param name="string"/>
- <xsl:choose>
- <xsl:when test="contains($string,"'")">
- <xsl:value-of select="substring-before($string,"'")"/>\'<xsl:call-template name="JS-escape">
- <xsl:with-param name="string" select="substring-after($string,"'")"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="contains($string,'\')">
- <xsl:value-of select="substring-before($string,'\')"/>\\<xsl:call-template name="JS-escape">
- <xsl:with-param name="string" select="substring-after($string,'\')"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$string"/>
- </xsl:otherwise>
- </xsl:choose>
+ <xsl:param name="tmp1" select="stringutils:replace(string($string),'\','\\')"/>
+ <xsl:param name="tmp2" select="stringutils:replace(string($tmp1),"'","\'")"/>
+ <xsl:value-of select="$tmp2"/>
</xsl:template>
@@ -491,18 +448,7 @@
-->
<xsl:template name="br-replace">
<xsl:param name="word"/>
- <xsl:choose>
- <xsl:when test="contains($word,'
')">
- <xsl:value-of select="substring-before($word,'
')"/>
- <br/>
- <xsl:call-template name="br-replace">
- <xsl:with-param name="word" select="substring-after($word,'
')"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$word"/>
- </xsl:otherwise>
- </xsl:choose>
+ <xsl:value-of disable-output-escaping="yes" select='stringutils:replace(string($word),"
","<br/>")'/>
</xsl:template>
<xsl:template name="display-time">
@@ -516,4 +462,3 @@
</xsl:template>
</xsl:stylesheet>
-
Modified: trunk/tools/etc/log.xsl
===================================================================
--- trunk/tools/etc/log.xsl 2007-07-30 12:43:44 UTC (rev 7841)
+++ trunk/tools/etc/log.xsl 2007-07-30 12:59:36 UTC (rev 7842)
@@ -1,58 +1,22 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html" indent="yes" encoding="US-ASCII"/>
<!--
- The Apache Software License, Version 1.1
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
- Copyright (c) 2000-2002 The Apache Software Foundation. All rights
- reserved.
+ http://www.apache.org/licenses/LICENSE-2.0
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- 3. The end-user documentation included with the redistribution, if
- any, must include the following acknowlegement:
- "This product includes software developed by the
- Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowlegement may appear in the software itself,
- if and wherever such third-party acknowlegements normally appear.
-
- 4. The names "The Jakarta Project", "Ant", and "Apache Software
- Foundation" must not be used to endorse or promote products derived
- from this software without prior written permission. For written
- permission, please contact apache(a)apache.org.
-
- 5. Products derived from this software may not be called "Apache"
- nor may "Apache" appear in their names without prior written
- permission of the Apache Group.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- SUCH DAMAGE.
- ====================================================================
-
- This software consists of voluntary contributions made by many
- individuals on behalf of the Apache Software Foundation. For more
- information on the Apache Software Foundation, please see
- <http://www.apache.org/>.
- -->
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
<!--
@@ -149,7 +113,7 @@
</a>
</td>
<td style="text-align:right;vertical-align:bottom">
- <a href="htp://jakarta.apache.org/ant">Jakarta Ant</a>
+ <a href="http://ant.apache.org/">Apache Ant</a>
</td>
</tr>
</table>
@@ -160,15 +124,6 @@
<xsl:apply-templates select="build"/>
- <!-- FOOTER -->
- <table width="100%">
- <tr><td><hr noshade="yes" size="1"/></td></tr>
- <tr><td>
- <div align="center"><font color="#525D76" size="-1"><em>
- Copyright © 2000-2002, Apache Software Foundation
- </em></font></div>
- </td></tr>
- </table>
</body>
</html>
</xsl:template>
@@ -199,10 +154,10 @@
</tr>
</table>
<table border="1" cellspacing="2" cellpadding="3" width="100%" style="font-size:80%">
- <tr class="a"><td width="1">ant.file</td><td><xsl:value-of select="substring-after(message[contains(text(),'ant.file')], '->')"/></td></tr>
- <tr class="b"><td width="1">ant.version</td><td><xsl:value-of select="substring-after(message[contains(text(),'ant.version')], '->')"/></td></tr>
- <tr class="a"><td width="1">java.version</td><td><xsl:value-of select="substring-after(message[contains(text(),'java.vm.version')], '->')"/></td></tr>
- <tr class="b"><td width="1">os.name</td><td><xsl:value-of select="substring-after(message[contains(text(),'os.name')], '->')"/></td></tr>
+ <tr class="a"><td width="1">ant.file</td><td><xsl:value-of select="substring-after(//message[contains(text(),'ant.file')], '->')"/></td></tr>
+ <tr class="b"><td width="1">ant.version</td><td><xsl:value-of select="substring-after(//message[contains(text(),'ant.version')], '->')"/></td></tr>
+ <tr class="a"><td width="1">java.version</td><td><xsl:value-of select="substring-after(//message[contains(text(),'java.vm.version')], '->')"/></td></tr>
+ <tr class="b"><td width="1">os.name</td><td><xsl:value-of select="substring-after(//message[contains(text(),'os.name')], '->')"/></td></tr>
</table>
<!-- build information -->
<h3>Build events</h3>
Modified: trunk/tools/etc/maudit-frames.xsl
===================================================================
--- trunk/tools/etc/maudit-frames.xsl 2007-07-30 12:43:44 UTC (rev 7841)
+++ trunk/tools/etc/maudit-frames.xsl 2007-07-30 12:59:36 UTC (rev 7842)
@@ -1,67 +1,30 @@
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
- xmlns:lxslt="http://xml.apache.org/xslt"
- xmlns:redirect="org.apache.xalan.xslt.extensions.Redirect"
- extension-element-prefixes="redirect">
-<xsl:output method="html" indent="yes" encoding="US-ASCII"/>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+ xmlns:lxslt="http://xml.apache.org/xslt"
+ xmlns:redirect="org.apache.xalan.lib.Redirect"
+ extension-element-prefixes="redirect">
+<xsl:output method="html" indent="yes" encoding="US-ASCII"/>
<xsl:decimal-format decimal-separator="." grouping-separator="," />
<!--
- The Apache Software License, Version 1.1
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
- Copyright (c) 2001-2002 The Apache Software Foundation. All rights
- reserved.
+ http://www.apache.org/licenses/LICENSE-2.0
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- 3. The end-user documentation included with the redistribution, if
- any, must include the following acknowlegement:
- "This product includes software developed by the
- Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowlegement may appear in the software itself,
- if and wherever such third-party acknowlegements normally appear.
-
- 4. The names "The Jakarta Project", "Ant", and "Apache Software
- Foundation" must not be used to endorse or promote products derived
- from this software without prior written permission. For written
- permission, please contact apache(a)apache.org.
-
- 5. Products derived from this software may not be called "Apache"
- nor may "Apache" appear in their names without prior written
- permission of the Apache Group.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- SUCH DAMAGE.
- ====================================================================
-
- This software consists of voluntary contributions made by many
- individuals on behalf of the Apache Software Foundation. For more
- information on the Apache Software Foundation, please see
- <http://www.apache.org/>.
- -->
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
<!--
Stylesheet to transform an XML file generated by the Ant MAudit task into
a set of JavaDoc-like HTML page to make pages more convenient to be browsed.
-
+
It use the Xalan redirect extension to write to multiple output files.
@author Stephane Bailliez <a href="mailto:sbailliez@apache.org"/>
@@ -71,86 +34,86 @@
<xsl:template match="classes">
- <!-- create the index.html -->
- <redirect:write file="{$output.dir}/index.html">
- <xsl:call-template name="index.html"/>
- </redirect:write>
+ <!-- create the index.html -->
+ <redirect:write file="{$output.dir}/index.html">
+ <xsl:call-template name="index.html"/>
+ </redirect:write>
- <!-- create the stylesheet.css -->
- <redirect:write file="{$output.dir}/stylesheet.css">
- <xsl:call-template name="stylesheet.css"/>
- </redirect:write>
+ <!-- create the stylesheet.css -->
+ <redirect:write file="{$output.dir}/stylesheet.css">
+ <xsl:call-template name="stylesheet.css"/>
+ </redirect:write>
- <!-- create the overview-packages.html at the root -->
- <redirect:write file="{$output.dir}/overview-summary.html">
- <xsl:apply-templates select="." mode="overview.packages"/>
- </redirect:write>
+ <!-- create the overview-packages.html at the root -->
+ <redirect:write file="{$output.dir}/overview-summary.html">
+ <xsl:apply-templates select="." mode="overview.packages"/>
+ </redirect:write>
- <!-- create the all-packages.html at the root -->
- <redirect:write file="{$output.dir}/overview-frame.html">
- <xsl:apply-templates select="." mode="all.packages"/>
- </redirect:write>
-
- <!-- create the all-classes.html at the root -->
- <redirect:write file="{$output.dir}/allclasses-frame.html">
- <xsl:apply-templates select="." mode="all.classes"/>
- </redirect:write>
-
- <!-- process all packages -->
- <xsl:for-each select="./class[not(./@package = preceding-sibling::class/@package)]">
- <xsl:call-template name="package">
- <xsl:with-param name="name" select="@package"/>
- </xsl:call-template>
- </xsl:for-each>
+ <!-- create the all-packages.html at the root -->
+ <redirect:write file="{$output.dir}/overview-frame.html">
+ <xsl:apply-templates select="." mode="all.packages"/>
+ </redirect:write>
+
+ <!-- create the all-classes.html at the root -->
+ <redirect:write file="{$output.dir}/allclasses-frame.html">
+ <xsl:apply-templates select="." mode="all.classes"/>
+ </redirect:write>
+
+ <!-- process all packages -->
+ <xsl:for-each select="./class[not(./@package = preceding-sibling::class/@package)]">
+ <xsl:call-template name="package">
+ <xsl:with-param name="name" select="@package"/>
+ </xsl:call-template>
+ </xsl:for-each>
</xsl:template>
<xsl:template name="package">
- <xsl:param name="name"/>
- <xsl:variable name="package.dir">
- <xsl:if test="not($name = '')"><xsl:value-of select="translate($name,'.','/')"/></xsl:if>
- <xsl:if test="$name = ''">.</xsl:if>
- </xsl:variable>
- <!--Processing package <xsl:value-of select="@name"/> in <xsl:value-of select="$output.dir"/> -->
- <!-- create a classes-list.html in the package directory -->
- <redirect:write file="{$output.dir}/{$package.dir}/package-frame.html">
- <xsl:call-template name="classes.list">
- <xsl:with-param name="name" select="$name"/>
- </xsl:call-template>
- </redirect:write>
-
- <!-- create a package-summary.html in the package directory -->
- <redirect:write file="{$output.dir}/{$package.dir}/package-summary.html">
- <xsl:call-template name="package.summary">
- <xsl:with-param name="name" select="$name"/>
- </xsl:call-template>
- </redirect:write>
-
- <!-- for each class, creates a @name.html -->
- <!-- @bug there will be a problem with inner classes having the same name, it will be overwritten -->
- <xsl:for-each select="/classes/class[@package = $name]">
- <redirect:write file="{$output.dir}/{$package.dir}/{(a)name}.html">
- <xsl:apply-templates select="." mode="class.details"/>
- </redirect:write>
- </xsl:for-each>
+ <xsl:param name="name"/>
+ <xsl:variable name="package.dir">
+ <xsl:if test="not($name = '')"><xsl:value-of select="translate($name,'.','/')"/></xsl:if>
+ <xsl:if test="$name = ''">.</xsl:if>
+ </xsl:variable>
+ <!--Processing package <xsl:value-of select="@name"/> in <xsl:value-of select="$output.dir"/> -->
+ <!-- create a classes-list.html in the package directory -->
+ <redirect:write file="{$output.dir}/{$package.dir}/package-frame.html">
+ <xsl:call-template name="classes.list">
+ <xsl:with-param name="name" select="$name"/>
+ </xsl:call-template>
+ </redirect:write>
+
+ <!-- create a package-summary.html in the package directory -->
+ <redirect:write file="{$output.dir}/{$package.dir}/package-summary.html">
+ <xsl:call-template name="package.summary">
+ <xsl:with-param name="name" select="$name"/>
+ </xsl:call-template>
+ </redirect:write>
+
+ <!-- for each class, creates a @name.html -->
+ <!-- @bug there will be a problem with inner classes having the same name, it will be overwritten -->
+ <xsl:for-each select="/classes/class[@package = $name]">
+ <redirect:write file="{$output.dir}/{$package.dir}/{(a)name}.html">
+ <xsl:apply-templates select="." mode="class.details"/>
+ </redirect:write>
+ </xsl:for-each>
</xsl:template>
<xsl:template name="index.html">
<HTML>
- <HEAD><TITLE>Audit Results.</TITLE></HEAD>
- <FRAMESET cols="20%,80%">
- <FRAMESET rows="30%,70%">
- <FRAME src="overview-frame.html" name="packageListFrame"/>
- <FRAME src="allclasses-frame.html" name="classListFrame"/>
- </FRAMESET>
- <FRAME src="overview-summary.html" name="classFrame"/>
- </FRAMESET>
- <noframes>
- <H2>Frame Alert</H2>
- <P>
- This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client.
- </P>
- </noframes>
+ <HEAD><TITLE>Audit Results.</TITLE></HEAD>
+ <FRAMESET cols="20%,80%">
+ <FRAMESET rows="30%,70%">
+ <FRAME src="overview-frame.html" name="packageListFrame"/>
+ <FRAME src="allclasses-frame.html" name="classListFrame"/>
+ </FRAMESET>
+ <FRAME src="overview-summary.html" name="classFrame"/>
+ </FRAMESET>
+ <noframes>
+ <H2>Frame Alert</H2>
+ <P>
+ This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client.
+ </P>
+ </noframes>
</HTML>
</xsl:template>
@@ -168,10 +131,10 @@
background-color:#FFFFFF;
color:#000000;
}
- .a td {
+ .a td {
background: #efefef;
}
- .b td {
+ .b td {
background: #fff;
}
th, td {
@@ -188,7 +151,7 @@
border: none
}
table.log tr td, tr th {
-
+
}
h2 {
font-weight:bold;
@@ -211,236 +174,236 @@
<!-- print the violations of the class -->
<xsl:template match="class" mode="class.details">
- <xsl:variable name="package.name" select="@package"/>
- <HTML>
- <HEAD>
- <xsl:call-template name="create.stylesheet.link">
- <xsl:with-param name="package.name" select="$package.name"/>
- </xsl:call-template>
- </HEAD>
- <BODY>
- <xsl:call-template name="pageHeader"/>
- <H3>Class <xsl:if test="not($package.name = '')"><xsl:value-of select="$package.name"/>.</xsl:if><xsl:value-of select="@name"/></H3>
+ <xsl:variable name="package.name" select="@package"/>
+ <HTML>
+ <HEAD>
+ <xsl:call-template name="create.stylesheet.link">
+ <xsl:with-param name="package.name" select="$package.name"/>
+ </xsl:call-template>
+ </HEAD>
+ <BODY>
+ <xsl:call-template name="pageHeader"/>
+ <H3>Class <xsl:if test="not($package.name = '')"><xsl:value-of select="$package.name"/>.</xsl:if><xsl:value-of select="@name"/></H3>
- <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
- <xsl:call-template name="class.audit.header"/>
- <xsl:apply-templates select="." mode="print.audit"/>
- </table>
-
- <H3>Violations</H3>
- <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
- <xsl:call-template name="violation.audit.header"/>
- <xsl:apply-templates select="./violation" mode="print.audit">
- <xsl:sort data-type="number" select="@line"/>
- </xsl:apply-templates>
- </table>
- <xsl:call-template name="pageFooter"/>
- </BODY>
- </HTML>
+ <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
+ <xsl:call-template name="class.audit.header"/>
+ <xsl:apply-templates select="." mode="print.audit"/>
+ </table>
+
+ <H3>Violations</H3>
+ <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
+ <xsl:call-template name="violation.audit.header"/>
+ <xsl:apply-templates select="./violation" mode="print.audit">
+ <xsl:sort data-type="number" select="@line"/>
+ </xsl:apply-templates>
+ </table>
+ <xsl:call-template name="pageFooter"/>
+ </BODY>
+ </HTML>
</xsl:template>
<!-- list of classes in a package -->
<xsl:template name="classes.list">
- <xsl:param name="name"/>
- <HTML>
- <HEAD>
- <xsl:call-template name="create.stylesheet.link">
- <xsl:with-param name="package.name" select="$name"/>
- </xsl:call-template>
- </HEAD>
- <BODY>
- <table width="100%">
- <tr>
- <td nowrap="nowrap">
- <H2><a href="package-summary.html" target="classFrame"><xsl:value-of select="$name"/></a></H2>
- </td>
- </tr>
- </table>
-
- <h2>Classes</h2>
- <TABLE WIDTH="100%">
- <xsl:apply-templates select="/classes/class[./@package = $name]" mode="classes.list">
- <xsl:sort select="@name"/>
- </xsl:apply-templates>
- </TABLE>
- </BODY>
- </HTML>
+ <xsl:param name="name"/>
+ <HTML>
+ <HEAD>
+ <xsl:call-template name="create.stylesheet.link">
+ <xsl:with-param name="package.name" select="$name"/>
+ </xsl:call-template>
+ </HEAD>
+ <BODY>
+ <table width="100%">
+ <tr>
+ <td nowrap="nowrap">
+ <H2><a href="package-summary.html" target="classFrame"><xsl:value-of select="$name"/></a></H2>
+ </td>
+ </tr>
+ </table>
+
+ <h2>Classes</h2>
+ <TABLE WIDTH="100%">
+ <xsl:apply-templates select="/classes/class[./@package = $name]" mode="classes.list">
+ <xsl:sort select="@name"/>
+ </xsl:apply-templates>
+ </TABLE>
+ </BODY>
+ </HTML>
</xsl:template>
<!-- the class to list -->
<xsl:template match="class" mode="classes.list">
- <tr>
- <td nowrap="nowrap">
- <!-- @bug naming to fix for inner classes -->
- <a href="{(a)name}.html" target="classFrame"><xsl:value-of select="@name"/></a>
- </td>
- </tr>
+ <tr>
+ <td nowrap="nowrap">
+ <!-- @bug naming to fix for inner classes -->
+ <a href="{(a)name}.html" target="classFrame"><xsl:value-of select="@name"/></a>
+ </td>
+ </tr>
</xsl:template>
<!--
- Creates an all-classes.html file that contains a link to all package-summary.html
- on each class.
+ Creates an all-classes.html file that contains a link to all package-summary.html
+ on each class.
-->
<xsl:template match="classes" mode="all.classes">
- <html>
- <head>
- <xsl:call-template name="create.stylesheet.link">
- <xsl:with-param name="package.name"/>
- </xsl:call-template>
- </head>
- <body>
- <h2>Classes</h2>
- <table width="100%">
- <xsl:apply-templates select=".//class" mode="all.classes">
- <xsl:sort select="@name"/>
- </xsl:apply-templates>
- </table>
- </body>
- </html>
+ <html>
+ <head>
+ <xsl:call-template name="create.stylesheet.link">
+ <xsl:with-param name="package.name"/>
+ </xsl:call-template>
+ </head>
+ <body>
+ <h2>Classes</h2>
+ <table width="100%">
+ <xsl:apply-templates select=".//class" mode="all.classes">
+ <xsl:sort select="@name"/>
+ </xsl:apply-templates>
+ </table>
+ </body>
+ </html>
</xsl:template>
<xsl:template match="class" mode="all.classes">
<!-- (ancestor::package)[last()] is buggy in MSXML3 ? -->
<xsl:variable name="package.name" select="@package"/>
- <tr>
- <td nowrap="nowrap">
- <a target="classFrame">
- <xsl:attribute name="href">
- <xsl:if test="not($package.name='')">
- <xsl:value-of select="translate($package.name,'.','/')"/><xsl:text>/</xsl:text>
- </xsl:if><xsl:value-of select="@name"/><xsl:text>.html</xsl:text>
- </xsl:attribute>
- <xsl:value-of select="@name"/>
- </a>
- </td>
- </tr>
+ <tr>
+ <td nowrap="nowrap">
+ <a target="classFrame">
+ <xsl:attribute name="href">
+ <xsl:if test="not($package.name='')">
+ <xsl:value-of select="translate($package.name,'.','/')"/><xsl:text>/</xsl:text>
+ </xsl:if><xsl:value-of select="@name"/><xsl:text>.html</xsl:text>
+ </xsl:attribute>
+ <xsl:value-of select="@name"/>
+ </a>
+ </td>
+ </tr>
</xsl:template>
<!--
- Creates an html file that contains a link to all package-summary.html files on
- each package existing on testsuites.
- @bug there will be a problem here, I don't know yet how to handle unnamed package :(
+ Creates an html file that contains a link to all package-summary.html files on
+ each package existing on testsuites.
+ @bug there will be a problem here, I don't know yet how to handle unnamed package :(
-->
<xsl:template match="classes" mode="all.packages">
- <html>
- <head>
- <xsl:call-template name="create.stylesheet.link">
- <xsl:with-param name="package.name"/>
- </xsl:call-template>
- </head>
- <body>
- <h2><a href="overview-summary.html" target="classFrame">Home</a></h2>
- <h2>Packages</h2>
- <table width="100%">
- <xsl:apply-templates select="class[not(./@package = preceding-sibling::class/@package)]" mode="all.packages">
- <xsl:sort select="@package" order="ascending"/>
- </xsl:apply-templates>
- </table>
- </body>
- </html>
+ <html>
+ <head>
+ <xsl:call-template name="create.stylesheet.link">
+ <xsl:with-param name="package.name"/>
+ </xsl:call-template>
+ </head>
+ <body>
+ <h2><a href="overview-summary.html" target="classFrame">Home</a></h2>
+ <h2>Packages</h2>
+ <table width="100%">
+ <xsl:apply-templates select="class[not(./@package = preceding-sibling::class/@package)]" mode="all.packages">
+ <xsl:sort select="@package" order="ascending"/>
+ </xsl:apply-templates>
+ </table>
+ </body>
+ </html>
</xsl:template>
<xsl:template match="class" mode="all.packages">
- <tr>
- <td nowrap="nowrap">
- <a href="{translate(@package,'.','/')}/package-summary.html" target="classFrame">
- <xsl:value-of select="@package"/>
- </a>
- </td>
- </tr>
+ <tr>
+ <td nowrap="nowrap">
+ <a href="{translate(@package,'.','/')}/package-summary.html" target="classFrame">
+ <xsl:value-of select="@package"/>
+ </a>
+ </td>
+ </tr>
</xsl:template>
<xsl:template match="classes" mode="overview.packages">
- <html>
- <head>
- <xsl:call-template name="create.stylesheet.link">
- <xsl:with-param name="package.name"/>
- </xsl:call-template>
- </head>
- <body onload="open('allclasses-frame.html','classListFrame')">
- <xsl:call-template name="pageHeader"/>
- <h3>Summary</h3>
- <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
- <tr>
- <th>Audited classes</th>
- <th>Reported classes</th>
- <th>Violations</th>
- </tr>
- <tr class="a">
- <td><xsl:value-of select="@audited"/></td>
- <td><xsl:value-of select="@reported"/></td>
- <td><xsl:value-of select="@violations"/></td>
- </tr>
- </table>
- <table border="0" width="100%">
- <tr>
- <td style="text-align: justify;">
- Note: Rules checked have originated from style guidelines suggested by the language designers,
- experience from the Java development community and insite experience. Violations are generally
- reported with a reference to the <a href="http://java.sun.com/docs/books/jls/second_edition/html/jTOC.doc.html">Java Language Specifications</a> (JLS x.x.x)
- and Metamata Audit rules (x.x).
- Please consult these documents for additional information about violations.
- <p/>
- Rules checked also enforce adherence to <a href="http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html">Sun Java coding guidelines</a> in use at Jakarta.
- <p/>
- One should note that these violations do not necessary underline errors but should be used
- as an indication for <i>possible</i> errors. As always, use your best judgment and review
- them carefully, it might save you hours of debugging.
- </td>
- </tr>
- </table>
+ <html>
+ <head>
+ <xsl:call-template name="create.stylesheet.link">
+ <xsl:with-param name="package.name"/>
+ </xsl:call-template>
+ </head>
+ <body onload="open('allclasses-frame.html','classListFrame')">
+ <xsl:call-template name="pageHeader"/>
+ <h3>Summary</h3>
+ <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
+ <tr>
+ <th>Audited classes</th>
+ <th>Reported classes</th>
+ <th>Violations</th>
+ </tr>
+ <tr class="a">
+ <td><xsl:value-of select="@audited"/></td>
+ <td><xsl:value-of select="@reported"/></td>
+ <td><xsl:value-of select="@violations"/></td>
+ </tr>
+ </table>
+ <table border="0" width="100%">
+ <tr>
+ <td style="text-align: justify;">
+ Note: Rules checked have originated from style guidelines suggested by the language designers,
+ experience from the Java development community and insite experience. Violations are generally
+ reported with a reference to the <a href="http://java.sun.com/docs/books/jls/second_edition/html/jTOC.doc.html">Java Language Specifications</a> (JLS x.x.x)
+ and Metamata Audit rules (x.x).
+ Please consult these documents for additional information about violations.
+ <p/>
+ Rules checked also enforce adherence to <a href="http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html">Sun Java coding guidelines</a> in use at Jakarta.
+ <p/>
+ One should note that these violations do not necessary underline errors but should be used
+ as an indication for <i>possible</i> errors. As always, use your best judgment and review
+ them carefully, it might save you hours of debugging.
+ </td>
+ </tr>
+ </table>
- <h3>Packages</h3>
- <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
- <xsl:call-template name="class.audit.header"/>
- <xsl:for-each select="class[not(./@package = preceding-sibling::class/@package)]">
- <xsl:sort select="@package" order="ascending"/>
- <tr>
+ <h3>Packages</h3>
+ <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
+ <xsl:call-template name="class.audit.header"/>
+ <xsl:for-each select="class[not(./@package = preceding-sibling::class/@package)]">
+ <xsl:sort select="@package" order="ascending"/>
+ <tr>
<xsl:call-template name="alternate-row"/>
- <td><a href="{translate(@package,'.','/')}/package-summary.html"><xsl:value-of select="@package"/></a></td>
- <td><xsl:value-of select="sum(/classes/class[./@package = current()/@package]/@violations)"/></td>
- </tr>
- </xsl:for-each>
- </table>
- <xsl:call-template name="pageFooter"/>
- </body>
- </html>
+ <td><a href="{translate(@package,'.','/')}/package-summary.html"><xsl:value-of select="@package"/></a></td>
+ <td><xsl:value-of select="sum(/classes/class[./@package = current()/@package]/@violations)"/></td>
+ </tr>
+ </xsl:for-each>
+ </table>
+ <xsl:call-template name="pageFooter"/>
+ </body>
+ </html>
</xsl:template>
<xsl:template name="package.summary">
- <xsl:param name="name"/>
- <HTML>
- <HEAD>
- <xsl:call-template name="create.stylesheet.link">
- <xsl:with-param name="package.name" select="$name"/>
- </xsl:call-template>
- </HEAD>
- <BODY>
- <xsl:attribute name="onload">open('package-frame.html','classListFrame')</xsl:attribute>
- <xsl:call-template name="pageHeader"/>
- <h3>Package <xsl:value-of select="$name"/></h3>
-
- <!--table border="0" cellpadding="5" cellspacing="2" width="100%">
- <xsl:call-template name="class.metrics.header"/>
- <xsl:apply-templates select="." mode="print.metrics"/>
- </table-->
-
- <xsl:if test="count(/classes/class[./@package = $name]) > 0">
- <H3>Classes</H3>
- <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
- <xsl:call-template name="class.audit.header"/>
- <xsl:apply-templates select="/classes/class[./@package = $name]" mode="print.audit">
- <xsl:sort select="@name"/>
- </xsl:apply-templates>
- </table>
- </xsl:if>
- <xsl:call-template name="pageFooter"/>
- </BODY>
- </HTML>
+ <xsl:param name="name"/>
+ <HTML>
+ <HEAD>
+ <xsl:call-template name="create.stylesheet.link">
+ <xsl:with-param name="package.name" select="$name"/>
+ </xsl:call-template>
+ </HEAD>
+ <BODY>
+ <xsl:attribute name="onload">open('package-frame.html','classListFrame')</xsl:attribute>
+ <xsl:call-template name="pageHeader"/>
+ <h3>Package <xsl:value-of select="$name"/></h3>
+
+ <!--table border="0" cellpadding="5" cellspacing="2" width="100%">
+ <xsl:call-template name="class.metrics.header"/>
+ <xsl:apply-templates select="." mode="print.metrics"/>
+ </table-->
+
+ <xsl:if test="count(/classes/class[./@package = $name]) > 0">
+ <H3>Classes</H3>
+ <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
+ <xsl:call-template name="class.audit.header"/>
+ <xsl:apply-templates select="/classes/class[./@package = $name]" mode="print.audit">
+ <xsl:sort select="@name"/>
+ </xsl:apply-templates>
+ </table>
+ </xsl:if>
+ <xsl:call-template name="pageFooter"/>
+ </BODY>
+ </HTML>
</xsl:template>
@@ -449,23 +412,23 @@
@param path the path to transform into a descending directory path
-->
<xsl:template name="path">
- <xsl:param name="path"/>
- <xsl:if test="contains($path,'.')">
- <xsl:text>../</xsl:text>
- <xsl:call-template name="path">
- <xsl:with-param name="path"><xsl:value-of select="substring-after($path,'.')"/></xsl:with-param>
- </xsl:call-template>
- </xsl:if>
- <xsl:if test="not(contains($path,'.')) and not($path = '')">
- <xsl:text>../</xsl:text>
- </xsl:if>
+ <xsl:param name="path"/>
+ <xsl:if test="contains($path,'.')">
+ <xsl:text>../</xsl:text>
+ <xsl:call-template name="path">
+ <xsl:with-param name="path"><xsl:value-of select="substring-after($path,'.')"/></xsl:with-param>
+ </xsl:call-template>
+ </xsl:if>
+ <xsl:if test="not(contains($path,'.')) and not($path = '')">
+ <xsl:text>../</xsl:text>
+ </xsl:if>
</xsl:template>
<!-- create the link to the stylesheet based on the package name -->
<xsl:template name="create.stylesheet.link">
- <xsl:param name="package.name"/>
- <LINK REL ="stylesheet" TYPE="text/css" TITLE="Style"><xsl:attribute name="href"><xsl:if test="not($package.name = 'unnamed package')"><xsl:call-template name="path"><xsl:with-param name="path" select="$package.name"/></xsl:call-template></xsl:if>stylesheet.css</xsl:attribute></LINK>
+ <xsl:param name="package.name"/>
+ <LINK REL ="stylesheet" TYPE="text/css" TITLE="Style"><xsl:attribute name="href"><xsl:if test="not($package.name = 'unnamed package')"><xsl:call-template name="path"><xsl:with-param name="path" select="$package.name"/></xsl:call-template></xsl:if>stylesheet.css</xsl:attribute></LINK>
</xsl:template>
<!-- Page HEADER -->
@@ -479,60 +442,52 @@
<img src="http://jakarta.apache.org/images/jakarta-logo.gif" alt="http://jakarta.apache.org" align="left" border="0"/>
</a>
</td>
- <td style="text-align:right"><h2>Source Code Audit</h2></td>
- </tr>
- <tr>
- <td style="text-align:right">Designed for use with <a href='http://www.webgain.com/products/quality_analyzer/'>Webgain QA/Metamata Audit</a> and <a href='http://jakarta.apache.org'>Ant</a>.</td>
- </tr>
+ <td style="text-align:right"><h2>Source Code Audit</h2></td>
+ </tr>
+ <tr>
+ <td style="text-align:right">Designed for use with <a href='http://www.webgain.com/products/quality_analyzer/'>Webgain QA/Metamata Audit</a> and <a href='http://jakarta.apache.org'>Ant</a>.</td>
+ </tr>
</table>
- <hr size="1"/>
+ <hr size="1"/>
</xsl:template>
<!-- Page HEADER -->
<xsl:template name="pageFooter">
- <table width="100%">
- <tr><td><hr noshade="yes" size="1"/></td></tr>
- <tr><td>
- <div align="center"><font color="#525D76" size="-1"><em>
- Copyright © 1999-2001, Apache Software Foundation
- </em></font></div>
- </td></tr>
- </table>
</xsl:template>
<!-- class header -->
<xsl:template name="class.audit.header">
- <tr>
- <th width="80%">Name</th>
- <th>Violations</th>
- </tr>
+ <tr>
+ <th width="80%">Name</th>
+ <th>Violations</th>
+ </tr>
</xsl:template>
<!-- method header -->
<xsl:template name="violation.audit.header">
- <tr>
- <th>Line</th>
- <th>Message</th>
- </tr>
+ <tr>
+ <th>Line</th>
+ <th>Message</th>
+ </tr>
</xsl:template>
<!-- class information -->
<xsl:template match="class" mode="print.audit">
- <tr>
+ <tr>
<xsl:call-template name="alternate-row"/>
- <td><a href="{(a)name}.html"><xsl:value-of select="@name"/></a></td>
- <td><xsl:apply-templates select="@violations"/></td>
- </tr>
+ <td><a href="{(a)name}.html"><xsl:value-of select="@name"/></a></td>
+ <td><xsl:apply-templates select="@violations"/></td>
+ </tr>
</xsl:template>
<xsl:template match="violation" mode="print.audit">
- <tr>
+ <tr>
<xsl:call-template name="alternate-row"/>
- <td><xsl:value-of select="@line"/></td>
- <td><xsl:apply-templates select="@message"/></td>
- </tr>
+ <td><xsl:value-of select="@line"/></td>
+ <td><xsl:apply-templates select="@message"/></td>
+ </tr>
</xsl:template>
<!-- alternated row style -->
@@ -544,4 +499,4 @@
</xsl:template>
</xsl:stylesheet>
-
+
Modified: trunk/tools/etc/mmetrics-frames.xsl
===================================================================
--- trunk/tools/etc/mmetrics-frames.xsl 2007-07-30 12:43:44 UTC (rev 7841)
+++ trunk/tools/etc/mmetrics-frames.xsl 2007-07-30 12:59:36 UTC (rev 7842)
@@ -1,67 +1,30 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:lxslt="http://xml.apache.org/xslt"
xmlns:xalan="http://xml.apache.org/xalan"
- xmlns:redirect="org.apache.xalan.xslt.extensions.Redirect"
+ xmlns:redirect="org.apache.xalan.lib.Redirect"
exclude-result-prefixes="xalan"
extension-element-prefixes="redirect">
<xsl:output method="html" indent="yes" encoding="US-ASCII"/>
<xsl:decimal-format decimal-separator="." grouping-separator="," />
<!--
- The Apache Software License, Version 1.1
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
- Copyright (c) 2001-2002 The Apache Software Foundation. All rights
- reserved.
+ http://www.apache.org/licenses/LICENSE-2.0
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- 3. The end-user documentation included with the redistribution, if
- any, must include the following acknowlegement:
- "This product includes software developed by the
- Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowlegement may appear in the software itself,
- if and wherever such third-party acknowlegements normally appear.
-
- 4. The names "The Jakarta Project", "Ant", and "Apache Software
- Foundation" must not be used to endorse or promote products derived
- from this software without prior written permission. For written
- permission, please contact apache(a)apache.org.
-
- 5. Products derived from this software may not be called "Apache"
- nor may "Apache" appear in their names without prior written
- permission of the Apache Group.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- SUCH DAMAGE.
- ====================================================================
-
- This software consists of voluntary contributions made by many
- individuals on behalf of the Apache Software Foundation. For more
- information on the Apache Software Foundation, please see
- <http://www.apache.org/>.
- -->
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
<!--
@author Stephane Bailliez <a href="mailto:sbailliez@apache.org"/>
- -->
+ -->
<xsl:param name="output.dir" select="'.'"/>
<!-- default max value for the metrics -->
@@ -115,7 +78,7 @@
<redirect:write file="{$output.dir}/metrics-reference.html">
<xsl:call-template name="metrics-reference.html"/>
</redirect:write>
-
+
<!-- create the overview-packages.html at the root -->
<redirect:write file="{$output.dir}/overview-summary.html">
<xsl:apply-templates select="." mode="overview.packages"/>
@@ -125,12 +88,12 @@
<redirect:write file="{$output.dir}/overview-frame.html">
<xsl:apply-templates select="." mode="all.packages"/>
</redirect:write>
-
+
<!-- create the all-classes.html at the root -->
<redirect:write file="{$output.dir}/allclasses-frame.html">
<xsl:apply-templates select="." mode="all.classes"/>
</redirect:write>
-
+
<!-- process all packages -->
<xsl:apply-templates select=".//package"/>
</xsl:template>
@@ -141,17 +104,17 @@
<xsl:variable name="package.dir">
<xsl:if test="not($package.name = 'unnamed package')"><xsl:value-of select="translate($package.name,'.','/')"/></xsl:if>
<xsl:if test="$package.name = 'unnamed package'">.</xsl:if>
- </xsl:variable>
+ </xsl:variable>
<!-- create a classes-list.html in the package directory -->
<redirect:write file="{$output.dir}/{$package.dir}/package-frame.html">
<xsl:apply-templates select="." mode="classes.list"/>
</redirect:write>
-
+
<!-- create a package-summary.html in the package directory -->
<redirect:write file="{$output.dir}/{$package.dir}/package-summary.html">
<xsl:apply-templates select="." mode="package.summary"/>
</redirect:write>
-
+
<!-- for each class, creates a @name.html -->
<!-- @bug there will be a problem with inner classes having the same name, it will be overwritten -->
<xsl:for-each select="$doctree/classes/class[@package = current()/@name]">
@@ -493,10 +456,10 @@
background-color:#FFFFFF;
color:#000000;
}
- .a td {
+ .a td {
background: #efefef;
}
- .b td {
+ .b td {
background: #fff;
}
th, td {
@@ -513,7 +476,7 @@
border: none
}
table.log tr td, tr th {
-
+
}
h2 {
font-weight:bold;
@@ -549,19 +512,19 @@
</HEAD>
<BODY>
<xsl:call-template name="pageHeader"/>
-
+
<H3>Class <xsl:if test="not($package.name = 'unnamed package')"><xsl:value-of select="$package.name"/>.</xsl:if><xsl:value-of select="@name"/></H3>
<table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
<xsl:call-template name="all.metrics.header"/>
<xsl:apply-templates select="." mode="print.metrics"/>
</table>
-
+
<H3>Methods</H3>
<table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
<xsl:call-template name="method.metrics.header"/>
<xsl:apply-templates select="method" mode="print.metrics"/>
</table>
-
+
<xsl:call-template name="pageFooter"/>
</BODY>
</HTML>
@@ -584,7 +547,7 @@
</td>
</tr>
</table>
-
+
<H2>Classes</H2>
<TABLE WIDTH="100%">
<!-- xalan-nodeset:nodeset for Xalan 1.2.2 -->
@@ -594,7 +557,7 @@
<td nowrap="nowrap">
<a href="{(a)name}.html" target="classFrame"><xsl:value-of select="@name"/></a>
</td>
- </tr>
+ </tr>
</xsl:for-each>
</TABLE>
</BODY>
@@ -705,7 +668,7 @@
<th><a href="metrics-reference.html#NOCL">NOCL</a></th>
</tr>
<xsl:apply-templates select="." mode="print.metrics"/>
- </table>
+ </table>
<table border="0" width="100%">
<tr>
<td style="text-align: justify;">
@@ -748,12 +711,12 @@
<xsl:call-template name="pageHeader"/>
<!-- create an anchor to this package name -->
<h3>Package <xsl:value-of select="@name"/></h3>
-
+
<table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
<xsl:call-template name="all.metrics.header"/>
<xsl:apply-templates select="." mode="print.metrics"/>
</table>
-
+
<table border="0" width="100%">
<tr>
<td style="text-align: justify;">
@@ -770,7 +733,7 @@
</td>
</tr>
</table>
-
+
<xsl:variable name="classes-in-package" select="$doctree/classes/class[@package = current()/@name]"/>
<xsl:if test="count($classes-in-package) > 0">
<H3>Classes</H3>
@@ -782,7 +745,7 @@
</xsl:for-each>
</table>
</xsl:if>
-
+
<xsl:call-template name="pageFooter"/>
</body>
</HTML>
@@ -796,13 +759,13 @@
<xsl:template name="path">
<xsl:param name="path"/>
<xsl:if test="contains($path,'.')">
- <xsl:text>../</xsl:text>
+ <xsl:text>../</xsl:text>
<xsl:call-template name="path">
<xsl:with-param name="path"><xsl:value-of select="substring-after($path,'.')"/></xsl:with-param>
- </xsl:call-template>
+ </xsl:call-template>
</xsl:if>
<xsl:if test="not(contains($path,'.')) and not($path = '')">
- <xsl:text>../</xsl:text>
+ <xsl:text>../</xsl:text>
</xsl:if>
</xsl:template>
@@ -836,14 +799,6 @@
<!-- Page Footer -->
<xsl:template name="pageFooter">
- <table width="100%">
- <tr><td><hr noshade="yes" size="1"/></td></tr>
- <tr><td>
- <div align="center"><font color="#525D76" size="-1"><em>
- Copyright © 1999-2001, Apache Software Foundation
- </em></font></div>
- </td></tr>
- </table>
</xsl:template>
<!-- class header -->
@@ -979,7 +934,7 @@
<xsl:with-param name="max" select="$loc.max"/>
</xsl:call-template>
</xsl:template>
-
+
<xsl:template match="@dit">
<xsl:call-template name="display-value">
<xsl:with-param name="value" select="current()"/>
@@ -1067,4 +1022,4 @@
</xsl:template>
</xsl:stylesheet>
-
+
Modified: trunk/tools/etc/tagdiff.xsl
===================================================================
--- trunk/tools/etc/tagdiff.xsl 2007-07-30 12:43:44 UTC (rev 7841)
+++ trunk/tools/etc/tagdiff.xsl 2007-07-30 12:59:36 UTC (rev 7842)
@@ -1,3 +1,19 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
<!-- a stylesheet to display changelogs ala netbeans -->
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
@@ -2,3 +18,2 @@
version="1.0">
-
<xsl:param name="title"/>
@@ -20,11 +35,9 @@
</xsl:template>
<xsl:template match="tagdiff">
- <HTML>
- <HEAD>
- <TITLE><xsl:value-of select="$title"/></TITLE>
- </HEAD>
- <BODY link="#000000" alink="#000000" vlink="#000000" text="#000000">
+ <html>
+ <head>
+ <title><xsl:value-of select="$title"/></title>
<style type="text/css">
body, p {
font-family: verdana,arial,helvetica;
@@ -43,13 +56,15 @@
font-size: 80%;
background:#eeeee0;
}
- </style>
+ </style>
+ </head>
+ <body link="#000000" alink="#000000" vlink="#000000" text="#000000">
<h1>
<a name="top"><xsl:value-of select="$title"/></a>
</h1>
Tagdiff between <xsl:value-of select="@startTag"/> <xsl:value-of select="@startDate"/> and
<xsl:value-of select="@endTag"/> <xsl:value-of select="@endDate"/>
- <p align="right">Designed for use with <a href="http://jakarta.apache.org">Ant</a>.</p>
+ <p align="right">Designed for use with <a href="http://ant.apache.org/">Ant</a>.</p>
<hr size="2"/>
<a name="TOP"/>
<table width="100%">
@@ -61,7 +76,7 @@
</td>
</tr>
</table>
- <TABLE BORDER="0" WIDTH="100%" CELLPADDING="3" CELLSPACING="1">
+ <table border="0" width="100%" cellpadding="3" cellspacing="1">
<xsl:call-template name="show-entries">
<xsl:with-param name="title">New Files</xsl:with-param>
<xsl:with-param name="anchor">New</xsl:with-param>
@@ -74,40 +89,41 @@
<xsl:with-param name="entries" select=".//entry[file/revision][file/prevrevision]"/>
</xsl:call-template>
+ <!-- change to entries select to address bug #36827 -->
<xsl:call-template name="show-entries">
<xsl:with-param name="title">Removed Files</xsl:with-param>
<xsl:with-param name="anchor">Removed</xsl:with-param>
- <xsl:with-param name="entries" select=".//entry[not(file/revision)][not(file/prevrevision)]"/>
+ <xsl:with-param name="entries" select=".//entry[not(file/revision)][file/prevrevision]"/>
</xsl:call-template>
- </TABLE>
+ </table>
- </BODY>
- </HTML>
+ </body>
+ </html>
</xsl:template>
<xsl:template name="show-entries">
<xsl:param name="title"/>
<xsl:param name="anchor"/>
<xsl:param name="entries"/>
- <TR>
- <TD colspan="2" class="dateAndAuthor">
+ <tr>
+ <td colspan="2" class="dateAndAuthor">
<a>
<xsl:attribute name="name"><xsl:value-of select="$anchor"/></xsl:attribute>
<xsl:value-of select="$title"/> - <xsl:value-of select="count($entries)"/> entries
</a>
<a href="#TOP">(back to top)</a>
- </TD>
- </TR>
- <TR>
- <TD width="20">
+ </td>
+ </tr>
+ <tr>
+ <td width="20">
<xsl:text> </xsl:text>
- </TD>
- <TD>
+ </td>
+ <td>
<ul>
<xsl:apply-templates select="$entries"/>
</ul>
- </TD>
- </TR>
+ </td>
+ </tr>
</xsl:template>
<xsl:template match="entry">
Modified: trunk/tools/lib/ant-junit.jar
===================================================================
(Binary files differ)
Modified: trunk/tools/lib/ant-launcher.jar
===================================================================
(Binary files differ)
Modified: trunk/tools/lib/ant-nodeps.jar
===================================================================
(Binary files differ)
Modified: trunk/tools/lib/ant.jar
===================================================================
(Binary files differ)
Modified: trunk/tools/lib/xercesImpl.jar
===================================================================
(Binary files differ)
Modified: trunk/tools/lib/xml-apis.jar
===================================================================
(Binary files differ)
16 years, 9 months
JBoss Portal SVN: r7841 - in branches/JBoss_Portal_Branch_2_6: core-admin and 1 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-07-30 08:43:44 -0400 (Mon, 30 Jul 2007)
New Revision: 7841
Modified:
branches/JBoss_Portal_Branch_2_6/build/build-thirdparty.xml
branches/JBoss_Portal_Branch_2_6/core-admin/build.xml
branches/JBoss_Portal_Branch_2_6/core-wsrp/build.xml
Log:
Removed Sun RI JSF portlet bridge
Modified: branches/JBoss_Portal_Branch_2_6/build/build-thirdparty.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/build/build-thirdparty.xml 2007-07-26 16:22:16 UTC (rev 7840)
+++ branches/JBoss_Portal_Branch_2_6/build/build-thirdparty.xml 2007-07-30 12:43:44 UTC (rev 7841)
@@ -114,8 +114,6 @@
<componentref name="freemarker" version="2.3.9"/>
<componentref name="wutka-dtdparser" version="1.2.1"/>
<componentref name="portals-bridges" version="1.0"/>
- <!-- patched jsf-portlet bridge -->
- <componentref name="portals-bridges/jsf-portlet" version="1.2-patched"/>
</build>
<synchronizeinfo/>
Modified: branches/JBoss_Portal_Branch_2_6/core-admin/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-admin/build.xml 2007-07-26 16:22:16 UTC (rev 7840)
+++ branches/JBoss_Portal_Branch_2_6/core-admin/build.xml 2007-07-30 12:43:44 UTC (rev 7841)
@@ -196,8 +196,10 @@
<fileset dir="${jboss.portal-faces.root}/lib" includes="portal-faces-lib.jar"/>
<fileset dir="../core-admin/src/etc/sun-jsf" includes="jsf-example.jar"/>
<fileset dir="${facelets.facelets.lib}" includes="jsf-facelets.jar"/>
- <fileset dir="${el.el.lib}" includes="el-api.jar,el-ri.jar"/>
- <fileset dir="${portals.bridges/jsf.portlet.lib}" includes="jsf-portlet.jar"/>
+ <fileset dir="${el.el.lib}" includes="el-api.jar,el-ri.jar"/>
+ <fileset dir="${commons.el.lib}" includes="commons-el.jar"/>
+ <fileset dir="${apache.beanutils.lib}" includes="commons-beanutils.jar"/>
+ <fileset dir="${apache.digester.lib}" includes="commons-digester.jar"/>
</copy>
<copy todir="${build.resources}/portal-admin-war">
<fileset dir="${source.bin}/portal-admin-war"/>
@@ -208,9 +210,6 @@
</copy>
<copy todir="${build.resources}/portal-admin.sar/lib">
<fileset dir="${jboss.portal-faces.root}/lib" includes="portal-faces-loader-lib.jar"/>
- <fileset dir="${commons.el.lib}" includes="commons-el.jar"/>
- <fileset dir="${apache.beanutils.lib}" includes="commons-beanutils.jar"/>
- <fileset dir="${apache.digester.lib}" includes="commons-digester.jar"/>
</copy>
<copy todir="${build.resources}/portal-admin.sar/portal-admin.war">
Modified: branches/JBoss_Portal_Branch_2_6/core-wsrp/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-wsrp/build.xml 2007-07-26 16:22:16 UTC (rev 7840)
+++ branches/JBoss_Portal_Branch_2_6/core-wsrp/build.xml 2007-07-30 12:43:44 UTC (rev 7841)
@@ -211,7 +211,6 @@
<fileset dir="../core-admin/src/etc/sun-jsf" includes="jsf-example.jar"/>
<fileset dir="${facelets.facelets.lib}" includes="jsf-facelets.jar"/>
<fileset dir="${el.el.lib}" includes="el-api.jar,el-ri.jar"/>
- <fileset dir="${portals.bridges/jsf.portlet.lib}" includes="jsf-portlet.jar"/>
<fileset dir="${commons.el.lib}" includes="commons-el.jar"/>
<fileset dir="${apache.beanutils.lib}" includes="commons-beanutils.jar"/>
<fileset dir="${apache.digester.lib}" includes="commons-digester.jar"/>
16 years, 9 months