JBoss Tools SVN: r9186 - in trunk/portlet/plugins/org.jboss.tools.portlet.core: META-INF and 13 other directories.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2008-07-19 21:46:54 -0400 (Sat, 19 Jul 2008)
New Revision: 9186
Added:
trunk/portlet/plugins/org.jboss.tools.portlet.core/.classpath
trunk/portlet/plugins/org.jboss.tools.portlet.core/.project
trunk/portlet/plugins/org.jboss.tools.portlet.core/META-INF/
trunk/portlet/plugins/org.jboss.tools.portlet.core/META-INF/MANIFEST.MF
trunk/portlet/plugins/org.jboss.tools.portlet.core/build.properties
trunk/portlet/plugins/org.jboss.tools.portlet.core/plugin.xml
trunk/portlet/plugins/org.jboss.tools.portlet.core/resources/
trunk/portlet/plugins/org.jboss.tools.portlet.core/resources/portlet/
trunk/portlet/plugins/org.jboss.tools.portlet.core/resources/portlet/1.0/
trunk/portlet/plugins/org.jboss.tools.portlet.core/resources/portlet/1.0/portal-common-lib.jar
trunk/portlet/plugins/org.jboss.tools.portlet.core/resources/portlet/1.0/portal-portlet-jsr168api-lib.jar
trunk/portlet/plugins/org.jboss.tools.portlet.core/resources/portlet/2.0/
trunk/portlet/plugins/org.jboss.tools.portlet.core/resources/portlet/2.0/portal-common-lib.jar
trunk/portlet/plugins/org.jboss.tools.portlet.core/resources/portlet/2.0/portlet-api.jar
trunk/portlet/plugins/org.jboss.tools.portlet.core/src/
trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/
trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/
trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/
trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/
trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/
trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/IPortletConstants.java
trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/PortletCoreActivator.java
trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/
trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/BasePortletClasspathContainer.java
trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/Portlet10LibrariesContainerInitializer.java
trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/Portlet20LibrariesContainerInitializer.java
trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/project/
trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/project/facet/
trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/project/facet/PortletFacetInstallDataModelProvider.java
trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/project/facet/PortletFacetInstallDelegate.java
trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/project/facet/PortletFacetPrimaryRuntimeChangedListener.java
trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/project/facet/PortletFacetUninstallDelegate.java
Log:
JBIDE-2233 Ability to create a new "Portlet" project
Added: trunk/portlet/plugins/org.jboss.tools.portlet.core/.classpath
===================================================================
--- trunk/portlet/plugins/org.jboss.tools.portlet.core/.classpath (rev 0)
+++ trunk/portlet/plugins/org.jboss.tools.portlet.core/.classpath 2008-07-20 01:46:54 UTC (rev 9186)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Added: trunk/portlet/plugins/org.jboss.tools.portlet.core/.project
===================================================================
--- trunk/portlet/plugins/org.jboss.tools.portlet.core/.project (rev 0)
+++ trunk/portlet/plugins/org.jboss.tools.portlet.core/.project 2008-07-20 01:46:54 UTC (rev 9186)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.portlet.core</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Added: trunk/portlet/plugins/org.jboss.tools.portlet.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/portlet/plugins/org.jboss.tools.portlet.core/META-INF/MANIFEST.MF (rev 0)
+++ trunk/portlet/plugins/org.jboss.tools.portlet.core/META-INF/MANIFEST.MF 2008-07-20 01:46:54 UTC (rev 9186)
@@ -0,0 +1,18 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Portlet Core Plug-in
+Bundle-SymbolicName: org.jboss.tools.portlet.core;singleton:=true
+Bundle-Version: 1.0.0
+Bundle-Activator: org.jboss.tools.portlet.core.PortletCoreActivator
+Bundle-Vendor: Red Hat, Inc.
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.wst.common.project.facet.core,
+ org.eclipse.core.resources,
+ org.eclipse.wst.common.frameworks,
+ org.eclipse.jst.j2ee,
+ org.eclipse.jdt.core,
+ org.jboss.ide.eclipse.as.classpath.core
+Bundle-ActivationPolicy: lazy
+Export-Package: org.jboss.tools.portlet.core,
+ org.jboss.tools.portlet.core.internal,
+ org.jboss.tools.portlet.core.internal.project.facet
Added: trunk/portlet/plugins/org.jboss.tools.portlet.core/build.properties
===================================================================
--- trunk/portlet/plugins/org.jboss.tools.portlet.core/build.properties (rev 0)
+++ trunk/portlet/plugins/org.jboss.tools.portlet.core/build.properties 2008-07-20 01:46:54 UTC (rev 9186)
@@ -0,0 +1,6 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ resources/
Added: trunk/portlet/plugins/org.jboss.tools.portlet.core/plugin.xml
===================================================================
--- trunk/portlet/plugins/org.jboss.tools.portlet.core/plugin.xml (rev 0)
+++ trunk/portlet/plugins/org.jboss.tools.portlet.core/plugin.xml 2008-07-20 01:46:54 UTC (rev 9186)
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+ <extension point="org.eclipse.wst.common.project.facet.core.facets">
+
+ <project-facet id="jboss.portlet">
+ <label>JBoss Portlet</label>
+ <description>
+ Adds support for the Java Portlet API.
+ </description>
+ <default-version version="2.0"/>
+ </project-facet>
+
+ <project-facet-version facet="jboss.portlet" version="1.0">
+ <constraint>
+ <and>
+ <requires facet="jst.java" version="[5.0"/>
+ <requires facet="jst.web" version="[2.3"/>
+ </and>
+ </constraint>
+ </project-facet-version>
+
+ <project-facet-version facet="jboss.portlet" version="2.0">
+ <constraint>
+ <and>
+ <requires facet="jst.java" version="[5.0"/>
+ <requires facet="jst.web" version="[2.5"/>
+ </and>
+ </constraint>
+ </project-facet-version>
+
+ <action id="jboss.portlet.install" facet="jboss.portlet" type="INSTALL" version="[1.0">
+ <delegate class="org.jboss.tools.portlet.core.internal.project.facet.PortletFacetInstallDelegate"/>
+ <config-factory class="org.jboss.tools.portlet.core.internal.project.facet.PortletFacetInstallDataModelProvider"/>
+ </action>
+
+ <action id="jboss.portlet.uninstall" facet="jboss.portlet" type="UNINSTALL" version="[1.0" >
+ <delegate class="org.jboss.tools.portlet.core.internal.project.facet.PortletFacetUninstallDelegate"/>
+ </action>
+
+ </extension>
+
+ <extension
+ point="org.eclipse.wst.common.project.facet.core.presets">
+ <static-preset id="preset.jboss.portlet.v20">
+ <label>Portlet Project v2.0</label>
+ <facet id="jst.java" version="5.0" />
+ <facet id="jst.web" version="2.5"/>
+ <facet id="jboss.portlet" version="2.0" />
+ <description>Portlet Project v2.0</description>
+ </static-preset>
+ </extension>
+
+ <extension
+ point="org.eclipse.wst.common.project.facet.core.presets">
+ <static-preset id="preset.jboss.portlet.v10">
+ <label>Portlet Project v1.0</label>
+ <facet id="jst.java" version="5.0" />
+ <facet id="jst.web" version="2.3"/>
+ <facet id="jboss.portlet" version="1.0" />
+ <description>Portlet Project v1.0</description>
+ </static-preset>
+ </extension>
+
+ <extension point="org.eclipse.wst.common.project.facet.core.runtimes">
+ <supported>
+ <runtime-component any="true"/>
+ <facet id="jboss.portlet" version="1.0,2.0"/>
+ </supported>
+ </extension>
+
+ <extension
+ point="org.eclipse.wst.common.project.facet.core.listeners">
+ <listener
+ class="org.jboss.tools.portlet.core.internal.project.facet.PortletFacetPrimaryRuntimeChangedListener"
+ eventTypes="PRIMARY_RUNTIME_CHANGED">
+ </listener>
+ </extension>
+
+ <extension point="org.eclipse.jdt.core.classpathContainerInitializer">
+ <classpathContainerInitializer class="org.jboss.tools.portlet.core.internal.Portlet10LibrariesContainerInitializer"
+ id="org.jboss.tools.portlet.core.internal.portletlibrarycontainer.v10"/>
+ </extension>
+ <extension point="org.eclipse.jdt.core.classpathContainerInitializer">
+ <classpathContainerInitializer class="org.jboss.tools.portlet.core.internal.Portlet20LibrariesContainerInitializer"
+ id="org.jboss.tools.portlet.core.internal.portletlibrarycontainer.v20"/>
+ </extension>
+
+</plugin>
Added: trunk/portlet/plugins/org.jboss.tools.portlet.core/resources/portlet/1.0/portal-common-lib.jar
===================================================================
(Binary files differ)
Property changes on: trunk/portlet/plugins/org.jboss.tools.portlet.core/resources/portlet/1.0/portal-common-lib.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/portlet/plugins/org.jboss.tools.portlet.core/resources/portlet/1.0/portal-portlet-jsr168api-lib.jar
===================================================================
(Binary files differ)
Property changes on: trunk/portlet/plugins/org.jboss.tools.portlet.core/resources/portlet/1.0/portal-portlet-jsr168api-lib.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/portlet/plugins/org.jboss.tools.portlet.core/resources/portlet/2.0/portal-common-lib.jar
===================================================================
(Binary files differ)
Property changes on: trunk/portlet/plugins/org.jboss.tools.portlet.core/resources/portlet/2.0/portal-common-lib.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/portlet/plugins/org.jboss.tools.portlet.core/resources/portlet/2.0/portlet-api.jar
===================================================================
(Binary files differ)
Property changes on: trunk/portlet/plugins/org.jboss.tools.portlet.core/resources/portlet/2.0/portlet-api.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/IPortletConstants.java
===================================================================
--- trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/IPortletConstants.java (rev 0)
+++ trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/IPortletConstants.java 2008-07-20 01:46:54 UTC (rev 9186)
@@ -0,0 +1,36 @@
+/*************************************************************************************
+ * Copyright (c) 2008 JBoss, a division of Red Hat and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * JBoss, a division of Red Hat - Initial implementation.
+ ************************************************************************************/
+package org.jboss.tools.portlet.core;
+
+import org.eclipse.core.runtime.IPath;
+
+/**
+ * @author snjeza
+ *
+ */
+
+public interface IPortletConstants {
+
+ static final String PORTLET_FACET_ID="jboss.portlet";
+
+ static final String CONFIG_PATH = "WEB-INF/portlet.xml";
+
+ static final String PORTLET_FACET_VERSION_10 = "1.0";
+
+ static final String PORTLET_FACET_VERSION_20 = "2.0";
+
+ static final String PORTLET_CONTAINER_10_ID = "org.jboss.tools.portlet.core.internal.portletlibrarycontainer.v10";
+
+ static final String PORTLET_CONTAINER_20_ID = "org.jboss.tools.portlet.core.internal.portletlibrarycontainer.v20";
+
+ static final String PORTLET_INSTANCES_FILE = "WEB-INF/portlet-instances.xml";
+
+}
Added: trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/PortletCoreActivator.java
===================================================================
--- trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/PortletCoreActivator.java (rev 0)
+++ trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/PortletCoreActivator.java 2008-07-20 01:46:54 UTC (rev 9186)
@@ -0,0 +1,176 @@
+package org.jboss.tools.portlet.core;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.PrintWriter;
+import java.io.UnsupportedEncodingException;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jst.j2ee.model.IModelProvider;
+import org.eclipse.jst.j2ee.model.ModelProviderManager;
+import org.eclipse.wst.common.componentcore.ComponentCore;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class PortletCoreActivator extends Plugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.jboss.tools.portlet.core";
+
+ // The shared instance
+ private static PortletCoreActivator plugin;
+
+ /**
+ * The constructor
+ */
+ public PortletCoreActivator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static PortletCoreActivator getDefault() {
+ return plugin;
+ }
+
+ /**
+ * @param webProject
+ * @return IModelProvider
+ */
+ public static IModelProvider getModelProvider(IProject webProject) {
+ IModelProvider provider = ModelProviderManager.getModelProvider(webProject);
+ Object webAppObj = provider.getModelObject();
+ if (webAppObj == null){
+ return null;
+ }
+ return provider;
+ }
+
+ public static IStatus getStatus(String message) {
+ return new Status(IStatus.ERROR,PLUGIN_ID,message);
+
+ }
+
+ public static void createPortletXml(String versionString,IProject project, IProgressMonitor monitor) {
+ IPath portletXmlPath = ComponentCore.createComponent(project)
+ .getRootFolder().getUnderlyingFolder().getRawLocation().append(
+ new Path(IPortletConstants.CONFIG_PATH));
+ StringBuffer buffer = new StringBuffer();
+ buffer.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
+
+ if (IPortletConstants.PORTLET_FACET_VERSION_20.equals(versionString)) {
+ buffer.append("<portlet-app xmlns=\"http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd\"");
+ buffer.append("\n\t");
+ buffer.append("xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ");
+ buffer.append("\n\t");
+ buffer.append("xsi:schemaLocation=\"http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd\" ");
+ buffer.append("\n\t");
+ buffer.append("version=\"2.0\">");
+ } else {
+ buffer.append("<portlet-app xmlns=\"http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd\"");
+ buffer.append("\n\t");
+ buffer.append("xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"");
+ buffer.append("\n\t");
+ buffer.append("xsi:schemaLocation=\"http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd\"");
+ buffer.append("\n\t");
+ buffer.append("version=\"1.0\">");
+ }
+ buffer.append("\n\n");
+ buffer.append("</portlet-app>");
+ buffer.append("\n");
+ OutputStream outputStream = null;
+ try {
+ IPath directory = portletXmlPath.removeLastSegments(1);
+ directory.toFile().mkdirs();
+ File file = portletXmlPath.toFile();
+ file.createNewFile();
+ outputStream = new FileOutputStream(file);
+ PrintWriter printWriter = new PrintWriter(outputStream);
+ printWriter.write(buffer.toString());
+ printWriter.close();
+ } catch (Exception e) {
+ log(e);
+ } finally {
+ if (outputStream != null) {
+ try {
+ outputStream.close();
+ } catch (IOException e) {
+ }
+ }
+ }
+
+ }
+
+ public static void log(Exception e, String message) {
+ IStatus status = new Status(IStatus.ERROR,PLUGIN_ID,message,e);
+ PortletCoreActivator.getDefault().getLog().log(status);
+ }
+
+ public static void log(Throwable e) {
+ IStatus status = new Status(IStatus.ERROR,PLUGIN_ID,e.getLocalizedMessage(),e);
+ PortletCoreActivator.getDefault().getLog().log(status);
+ }
+
+ public static void createPortletInstances(IProject project, IFile file) throws CoreException, UnsupportedEncodingException {
+
+ StringBuffer buffer = new StringBuffer();
+ buffer.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
+ buffer.append("<!DOCTYPE deployments PUBLIC \n");
+ buffer.append("\"-//JBoss Portal//DTD Portlet Instances 2.6//EN\"\n");
+ buffer.append("\"http://www.jboss.org/portal/dtd/portlet-instances_2_6.dtd\">");
+ buffer.append("<deployments>");
+ buffer.append("</deployments>");
+
+ ByteArrayInputStream source = new ByteArrayInputStream(buffer.toString().getBytes("UTF8"));
+ file.create(source, true, new NullProgressMonitor());
+ }
+
+public static void createPortletObject(IProject project, IFile file) throws CoreException, UnsupportedEncodingException {
+
+ StringBuffer buffer = new StringBuffer();
+ buffer.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
+ buffer.append("<!DOCTYPE deployments PUBLIC \n");
+ buffer.append("\"-//JBoss Portal//DTD Portal Object 2.6//EN\"\n");
+ buffer.append("\"http://www.jboss.org/portal/dtd/portal-object_2_6.dtd\">");
+ buffer.append("<deployments>");
+ buffer.append("</deployments>");
+
+ ByteArrayInputStream source = new ByteArrayInputStream(buffer.toString().getBytes("UTF8"));
+ file.create(source, true, new NullProgressMonitor());
+ }
+}
Added: trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/BasePortletClasspathContainer.java
===================================================================
--- trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/BasePortletClasspathContainer.java (rev 0)
+++ trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/BasePortletClasspathContainer.java 2008-07-20 01:46:54 UTC (rev 9186)
@@ -0,0 +1,95 @@
+package org.jboss.tools.portlet.core.internal;
+
+import java.io.File;
+import java.io.FileFilter;
+import java.io.IOException;
+import java.net.URL;
+import java.util.ArrayList;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jdt.core.IAccessRule;
+import org.eclipse.jdt.core.IClasspathAttribute;
+import org.eclipse.jdt.core.IClasspathEntry;
+import org.eclipse.jdt.core.JavaCore;
+import org.jboss.ide.eclipse.as.classpath.core.jee.AbstractClasspathContainer;
+import org.jboss.ide.eclipse.as.classpath.core.xpl.ClasspathDecorations;
+import org.jboss.tools.portlet.core.PortletCoreActivator;
+
+public abstract class BasePortletClasspathContainer extends AbstractClasspathContainer {
+ private static final String PORTLET_FOLDER = "portlet";
+ public final static String SUFFIX = PORTLET_FOLDER;//$NON-NLS-1$
+ public final static String PREFIX = "org.jboss.tools.portlet.core";
+ private static final String RESOURCES_FOLDER = "resources";
+
+ public BasePortletClasspathContainer(IPath path, String description,String suffix) {
+ super(path, description, suffix);
+ }
+
+ @Override
+ protected String getBaseDir() {
+ try {
+ URL installURL = FileLocator.toFileURL(PortletCoreActivator
+ .getDefault().getBundle().getEntry("/"));
+ return installURL.getFile().toString();
+ } catch (IOException e) {
+ PortletCoreActivator
+ .log(e, "Error loading classpath container");
+ }
+ return null;
+ }
+
+ @Override
+ protected IClasspathEntry[] computeEntries() {
+ ArrayList<IClasspathEntry> entries = new ArrayList<IClasspathEntry>();
+
+ String baseDir = getBaseDir();
+ if (baseDir == null)
+ return new IClasspathEntry[0];
+
+ String version = getPortletVersion();
+ File libDir = new File(baseDir
+ + "/" + RESOURCES_FOLDER + "/" + PORTLET_FOLDER + "/" + version);//$NON-NLS-1$ //$NON-NLS-2$
+
+ File[] jars = libDir.listFiles(new FileFilter() {
+ public boolean accept(File file) {
+ return (file.toString().endsWith(".jar"));//$NON-NLS-1$
+ }
+ });
+
+ if (jars != null) {
+ for (int i = 0; i < jars.length; i++) {
+ File jarFile = jars[i];
+
+ IPath entryPath = new Path(jarFile.toString());
+
+ IPath sourceAttachementPath = null;
+ IPath sourceAttachementRootPath = null;
+
+ final ClasspathDecorations dec = decorations
+ .getDecorations(getDecorationManagerKey(getPath()
+ .toString()), entryPath.toString());
+
+ IClasspathAttribute[] attrs = {};
+ if (dec != null) {
+ sourceAttachementPath = dec.getSourceAttachmentPath();
+ sourceAttachementRootPath = dec
+ .getSourceAttachmentRootPath();
+ attrs = dec.getExtraAttributes();
+ }
+
+ IAccessRule[] access = {};
+ IClasspathEntry entry = JavaCore.newLibraryEntry(entryPath,
+ sourceAttachementPath, sourceAttachementRootPath,
+ access, attrs, false);
+ entries.add(entry);
+ }
+ }
+
+ return entries.toArray(new IClasspathEntry[entries.size()]);
+ }
+
+ protected abstract String getPortletVersion();
+
+}
Added: trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/Portlet10LibrariesContainerInitializer.java
===================================================================
--- trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/Portlet10LibrariesContainerInitializer.java (rev 0)
+++ trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/Portlet10LibrariesContainerInitializer.java 2008-07-20 01:46:54 UTC (rev 9186)
@@ -0,0 +1,54 @@
+/*************************************************************************************
+ * Copyright (c) 2008 JBoss, a division of Red Hat and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * JBoss, a division of Red Hat - Initial implementation.
+ ************************************************************************************/
+package org.jboss.tools.portlet.core.internal;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.jdt.core.IJavaProject;
+import org.jboss.ide.eclipse.as.classpath.core.jee.AbstractClasspathContainer;
+import org.jboss.ide.eclipse.as.classpath.core.jee.AbstractClasspathContainerInitializer;
+import org.jboss.tools.portlet.core.IPortletConstants;
+
+/**
+ * @author snjeza
+ *
+ */
+public class Portlet10LibrariesContainerInitializer extends
+ AbstractClasspathContainerInitializer {
+
+ public String getDescription(IPath containerPath, IJavaProject project) {
+ return "JBoss Portlet Classpath Container Initializer v1.0";
+ }
+
+ @Override
+ protected AbstractClasspathContainer createClasspathContainer(IPath path) {
+ return new Portlet10ClasspathContainer(path);
+ }
+
+ @Override
+ protected String getClasspathContainerID() {
+ return IPortletConstants.PORTLET_CONTAINER_10_ID;
+ }
+
+ private class Portlet10ClasspathContainer extends BasePortletClasspathContainer {
+
+ public final static String DESCRIPTION = "JBoss Portlet Libraries v1.0";
+
+ public Portlet10ClasspathContainer(IPath path) {
+ super(path, DESCRIPTION, SUFFIX);
+ }
+
+ @Override
+ protected String getPortletVersion() {
+ return IPortletConstants.PORTLET_FACET_VERSION_10;
+ }
+
+ }
+}
Added: trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/Portlet20LibrariesContainerInitializer.java
===================================================================
--- trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/Portlet20LibrariesContainerInitializer.java (rev 0)
+++ trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/Portlet20LibrariesContainerInitializer.java 2008-07-20 01:46:54 UTC (rev 9186)
@@ -0,0 +1,54 @@
+/*************************************************************************************
+ * Copyright (c) 2008 JBoss, a division of Red Hat and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * JBoss, a division of Red Hat - Initial implementation.
+ ************************************************************************************/
+package org.jboss.tools.portlet.core.internal;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.jdt.core.IJavaProject;
+import org.jboss.ide.eclipse.as.classpath.core.jee.AbstractClasspathContainer;
+import org.jboss.ide.eclipse.as.classpath.core.jee.AbstractClasspathContainerInitializer;
+import org.jboss.tools.portlet.core.IPortletConstants;
+
+/**
+ * @author snjeza
+ *
+ */
+public class Portlet20LibrariesContainerInitializer extends
+ AbstractClasspathContainerInitializer {
+
+ public String getDescription(IPath containerPath, IJavaProject project) {
+ return "JBoss Portlet Classpath Container Initializer v2.0";
+ }
+
+ @Override
+ protected AbstractClasspathContainer createClasspathContainer(IPath path) {
+ return new Portlet10ClasspathContainer(path);
+ }
+
+ @Override
+ protected String getClasspathContainerID() {
+ return IPortletConstants.PORTLET_CONTAINER_20_ID;
+ }
+
+ private class Portlet10ClasspathContainer extends BasePortletClasspathContainer {
+
+ public final static String DESCRIPTION = "JBoss Portlet Libraries v2.0";
+
+ public Portlet10ClasspathContainer(IPath path) {
+ super(path, DESCRIPTION, SUFFIX);
+ }
+
+ @Override
+ protected String getPortletVersion() {
+ return IPortletConstants.PORTLET_FACET_VERSION_20;
+ }
+
+ }
+}
Added: trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/project/facet/PortletFacetInstallDataModelProvider.java
===================================================================
--- trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/project/facet/PortletFacetInstallDataModelProvider.java (rev 0)
+++ trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/project/facet/PortletFacetInstallDataModelProvider.java 2008-07-20 01:46:54 UTC (rev 9186)
@@ -0,0 +1,31 @@
+/*************************************************************************************
+ * Copyright (c) 2008 JBoss, a division of Red Hat and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * JBoss, a division of Red Hat - Initial implementation.
+ ************************************************************************************/
+package org.jboss.tools.portlet.core.internal.project.facet;
+
+import org.eclipse.wst.common.componentcore.datamodel.FacetInstallDataModelProvider;
+import org.jboss.tools.portlet.core.IPortletConstants;
+
+/**
+ * @author snjeza
+ *
+ */
+public class PortletFacetInstallDataModelProvider extends
+ FacetInstallDataModelProvider implements IPortletConstants {
+
+ @Override
+ public Object getDefaultProperty(String propertyName) {
+ if(propertyName.equals(FACET_ID)){
+ return IPortletConstants.PORTLET_FACET_ID;
+ }
+ return super.getDefaultProperty(propertyName);
+ }
+
+}
Added: trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/project/facet/PortletFacetInstallDelegate.java
===================================================================
--- trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/project/facet/PortletFacetInstallDelegate.java (rev 0)
+++ trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/project/facet/PortletFacetInstallDelegate.java 2008-07-20 01:46:54 UTC (rev 9186)
@@ -0,0 +1,127 @@
+/*************************************************************************************
+ * Copyright (c) 2008 JBoss, a division of Red Hat and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * JBoss, a division of Red Hat - Initial implementation.
+ ************************************************************************************/
+package org.jboss.tools.portlet.core.internal.project.facet;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspaceRunnable;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jdt.core.IClasspathEntry;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jst.j2ee.model.IModelProvider;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+import org.eclipse.wst.common.project.facet.core.IDelegate;
+import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
+import org.jboss.tools.portlet.core.IPortletConstants;
+import org.jboss.tools.portlet.core.PortletCoreActivator;
+
+/**
+ * @author snjeza
+ *
+ */
+public class PortletFacetInstallDelegate implements IDelegate {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.wst.common.project.facet.core.IDelegate#execute(org.eclipse
+ * .core.resources.IProject,
+ * org.eclipse.wst.common.project.facet.core.IProjectFacetVersion,
+ * java.lang.Object, org.eclipse.core.runtime.IProgressMonitor)
+ */
+ public void execute(final IProject project, final IProjectFacetVersion fv,
+ final Object cfg, final IProgressMonitor monitor)
+ throws CoreException {
+
+ if (monitor != null) {
+ monitor.beginTask("", 1);
+ }
+ try {
+ IDataModel config = null;
+
+ if (cfg != null) {
+ config = (IDataModel) cfg;
+ } else {
+ throw new CoreException(
+ PortletCoreActivator
+ .getStatus("Internal Error creating JBoss Portlet Facet. Missing configuration."));
+ }
+
+ // check whether web.xml is available for update
+ IModelProvider provider = PortletCoreActivator
+ .getModelProvider(project);
+ if (provider == null) {
+ throw new CoreException(
+ PortletCoreActivator
+ .getStatus("Cannot configure web module for JBoss Portlet Facet"));
+ } else if (!(provider.validateEdit(null, null).isOK())) {
+ if (!(provider.validateEdit(null, null).isOK())) {
+ throw new CoreException(PortletCoreActivator
+ .getStatus("The web.xml file is not updateable"));
+ }
+ }
+
+ IJavaProject javaProject = JavaCore.create(project);
+
+ IPath containerPath = null;
+ if (IPortletConstants.PORTLET_FACET_VERSION_10.equals(fv.getVersionString())) {
+ containerPath = new Path(IPortletConstants.PORTLET_CONTAINER_10_ID);
+ } else {
+ containerPath = new Path(IPortletConstants.PORTLET_CONTAINER_20_ID);
+ }
+
+ IClasspathEntry entry = JavaCore.newContainerEntry(containerPath, true);
+ IClasspathEntry[] entries = javaProject.getRawClasspath();
+ IClasspathEntry[] newEntries = new IClasspathEntry[entries.length + 1];
+ System.arraycopy( entries, 0, newEntries, 0, entries.length );
+ newEntries[entries.length] = entry;
+ javaProject.setRawClasspath(newEntries, monitor);
+
+
+ createPortletXml(project, fv, config, monitor);
+
+ if (monitor != null) {
+ monitor.worked(1);
+ }
+
+ } finally {
+ if (monitor != null) {
+ monitor.done();
+ }
+ }
+ }
+
+ private void createPortletXml(final IProject project,
+ final IProjectFacetVersion fv, IDataModel config,
+ final IProgressMonitor monitor) {
+
+ try {
+ final IWorkspaceRunnable op = new IWorkspaceRunnable() {
+ public void run(IProgressMonitor monitor_inner)
+ throws CoreException {
+ PortletCoreActivator
+ .createPortletXml(fv.getVersionString(),project, monitor);
+ project.refreshLocal(IResource.DEPTH_INFINITE,
+ monitor_inner);
+ }
+ };
+ op.run(monitor);
+ } catch (CoreException e) {
+ PortletCoreActivator.log(e,
+ "Exception occured while creating portlet.xml");
+ }
+ }
+}
Added: trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/project/facet/PortletFacetPrimaryRuntimeChangedListener.java
===================================================================
--- trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/project/facet/PortletFacetPrimaryRuntimeChangedListener.java (rev 0)
+++ trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/project/facet/PortletFacetPrimaryRuntimeChangedListener.java 2008-07-20 01:46:54 UTC (rev 9186)
@@ -0,0 +1,14 @@
+package org.jboss.tools.portlet.core.internal.project.facet;
+
+import org.eclipse.wst.common.project.facet.core.events.IFacetedProjectEvent;
+import org.eclipse.wst.common.project.facet.core.events.IFacetedProjectListener;
+
+public class PortletFacetPrimaryRuntimeChangedListener implements
+ IFacetedProjectListener {
+
+ public void handleEvent(IFacetedProjectEvent event) {
+ // TODO Auto-generated method stub
+
+ }
+
+}
Added: trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/project/facet/PortletFacetUninstallDelegate.java
===================================================================
--- trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/project/facet/PortletFacetUninstallDelegate.java (rev 0)
+++ trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/project/facet/PortletFacetUninstallDelegate.java 2008-07-20 01:46:54 UTC (rev 9186)
@@ -0,0 +1,34 @@
+/*************************************************************************************
+ * Copyright (c) 2008 JBoss, a division of Red Hat and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * JBoss, a division of Red Hat - Initial implementation.
+ ************************************************************************************/
+package org.jboss.tools.portlet.core.internal.project.facet;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.wst.common.project.facet.core.IDelegate;
+import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
+
+/**
+ * @author snjeza
+ *
+ */
+public class PortletFacetUninstallDelegate implements IDelegate {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.common.project.facet.core.IDelegate#execute(org.eclipse.core.resources.IProject, org.eclipse.wst.common.project.facet.core.IProjectFacetVersion, java.lang.Object, org.eclipse.core.runtime.IProgressMonitor)
+ */
+ public void execute(IProject project, IProjectFacetVersion fv,
+ Object config, IProgressMonitor monitor) throws CoreException {
+ // TODO Auto-generated method stub
+
+ }
+
+}
16 years, 5 months
JBoss Tools SVN: r9185 - trunk/portlet/plugins.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2008-07-19 21:45:39 -0400 (Sat, 19 Jul 2008)
New Revision: 9185
Added:
trunk/portlet/plugins/org.jboss.tools.portlet.core/
Log:
JBIDE-2233 Ability to create a new "Portlet" project
16 years, 5 months
JBoss Tools SVN: r9184 - trunk/portlet/features/org.jboss.tools.portlet.feature.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2008-07-19 21:44:46 -0400 (Sat, 19 Jul 2008)
New Revision: 9184
Added:
trunk/portlet/features/org.jboss.tools.portlet.feature/.project
trunk/portlet/features/org.jboss.tools.portlet.feature/build.properties
trunk/portlet/features/org.jboss.tools.portlet.feature/feature.properties
trunk/portlet/features/org.jboss.tools.portlet.feature/feature.xml
Log:
JBIDE-2233 Ability to create a new "Portlet" project
Added: trunk/portlet/features/org.jboss.tools.portlet.feature/.project
===================================================================
--- trunk/portlet/features/org.jboss.tools.portlet.feature/.project (rev 0)
+++ trunk/portlet/features/org.jboss.tools.portlet.feature/.project 2008-07-20 01:44:46 UTC (rev 9184)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.portlet.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
Added: trunk/portlet/features/org.jboss.tools.portlet.feature/build.properties
===================================================================
--- trunk/portlet/features/org.jboss.tools.portlet.feature/build.properties (rev 0)
+++ trunk/portlet/features/org.jboss.tools.portlet.feature/build.properties 2008-07-20 01:44:46 UTC (rev 9184)
@@ -0,0 +1,2 @@
+bin.includes = feature.xml,\
+ feature.properties
Added: trunk/portlet/features/org.jboss.tools.portlet.feature/feature.properties
===================================================================
Added: trunk/portlet/features/org.jboss.tools.portlet.feature/feature.xml
===================================================================
--- trunk/portlet/features/org.jboss.tools.portlet.feature/feature.xml (rev 0)
+++ trunk/portlet/features/org.jboss.tools.portlet.feature/feature.xml 2008-07-20 01:44:46 UTC (rev 9184)
@@ -0,0 +1,241 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.jboss.tools.portlet.feature"
+ label="JBoss Portlet"
+ version="1.0.0"
+ provider-name="Red Hat, Inc."
+ plugin="org.jboss.tools.portlet.ui">
+
+ <description url="http://www.example.com/description">
+ JBoss Portlet
+ </description>
+
+ <copyright>
+ Copyright (c) 2008 Red Hat, Inc.
+Distributed under license by Red Hat, Inc. All rights reserved.
+This program is made available under the terms of the
+Eclipse Public License v1.0 which accompanies this distribution,
+and is available at http://www.eclipse.org/legal/epl-v10.html
+Contributors:
+Red Hat, Inc. - initial API and implementation
+ </copyright>
+
+ <license url="http://www.eclipse.org/legal/epl-v10.html">
+ Eclipse Public License - v 1.0
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS
+ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
+DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.
+1. DEFINITIONS
+"Contribution" means:
+a) in the case of the initial Contributor, the initial code and
+documentation distributed under this Agreement, and
+b) in the case of each subsequent Contributor:
+i) changes to the Program, and
+ii) additions to the Program;
+where such changes and/or additions to the Program originate
+from and are distributed by that particular Contributor. A Contribution
+'originates' from a Contributor if it was added to the Program
+by such Contributor itself or anyone acting on such Contributor's
+behalf. Contributions do not include additions to the Program
+which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii)
+are not derivative works of the Program.
+"Contributor" means any person or entity that distributes the
+Program.
+"Licensed Patents " mean patent claims licensable by a Contributor
+which are necessarily infringed by the use or sale of its Contribution
+alone or when combined with the Program.
+"Program" means the Contributions distributed in accordance with
+this Agreement.
+"Recipient" means anyone who receives the Program under this
+Agreement, including all Contributors.
+2. GRANT OF RIGHTS
+a) Subject to the terms of this Agreement, each Contributor hereby
+grants Recipient a non-exclusive, worldwide, royalty-free copyright
+license to reproduce, prepare derivative works of, publicly display,
+publicly perform, distribute and sublicense the Contribution
+of such Contributor, if any, and such derivative works, in source
+code and object code form.
+b) Subject to the terms of this Agreement, each Contributor hereby
+grants Recipient a non-exclusive, worldwide, royalty-free patent
+license under Licensed Patents to make, use, sell, offer to sell,
+import and otherwise transfer the Contribution of such Contributor,
+if any, in source code and object code form. This patent license
+shall apply to the combination of the Contribution and the Program
+if, at the time the Contribution is added by the Contributor,
+such addition of the Contribution causes such combination to
+be covered by the Licensed Patents. The patent license shall
+not apply to any other combinations which include the Contribution.
+No hardware per se is licensed hereunder.
+c) Recipient understands that although each Contributor grants
+the licenses to its Contributions set forth herein, no assurances
+are provided by any Contributor that the Program does not infringe
+the patent or other intellectual property rights of any other
+entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement
+of intellectual property rights or otherwise. As a condition
+to exercising the rights and licenses granted hereunder, each
+Recipient hereby assumes sole responsibility to secure any other
+intellectual property rights needed, if any. For example, if
+a third party patent license is required to allow Recipient to
+distribute the Program, it is Recipient's responsibility to acquire
+that license before distributing the Program.
+d) Each Contributor represents that to its knowledge it has sufficient
+copyright rights in its Contribution, if any, to grant the copyright
+license set forth in this Agreement.
+3. REQUIREMENTS
+A Contributor may choose to distribute the Program in object
+code form under its own license agreement, provided that:
+a) it complies with the terms and conditions of this Agreement;
+and
+b) its license agreement:
+i) effectively disclaims on behalf of all Contributors all warranties
+and conditions, express and implied, including warranties or
+conditions of title and non-infringement, and implied warranties
+or conditions of merchantability and fitness for a particular
+purpose;
+ii) effectively excludes on behalf of all Contributors all liability
+for damages, including direct, indirect, special, incidental
+and consequential damages, such as lost profits;
+iii) states that any provisions which differ from this Agreement
+are offered by that Contributor alone and not by any other party;
+and
+iv) states that source code for the Program is available from
+such Contributor, and informs licensees how to obtain it in a
+reasonable manner on or through a medium customarily used for
+software exchange.
+When the Program is made available in source code form:
+a) it must be made available under this Agreement; and
+b) a copy of this Agreement must be included with each copy of
+the Program.
+Contributors may not remove or alter any copyright notices contained
+within the Program.
+Each Contributor must identify itself as the originator of its
+Contribution, if any, in a manner that reasonably allows subsequent
+Recipients to identify the originator of the Contribution.
+4. COMMERCIAL DISTRIBUTION
+Commercial distributors of software may accept certain responsibilities
+with respect to end users, business partners and the like. While
+this license is intended to facilitate the commercial use of
+the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create
+potential liability for other Contributors. Therefore, if a Contributor
+includes the Program in a commercial product offering, such Contributor
+("Commercial Contributor") hereby agrees to defend and indemnify
+every other Contributor ("Indemnified Contributor") against any
+losses, damages and costs (collectively "Losses") arising from
+claims, lawsuits and other legal actions brought by a third party
+against the Indemnified Contributor to the extent caused by the
+acts or omissions of such Commercial Contributor in connection
+with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any
+claims or Losses relating to any actual or alleged intellectual
+property infringement. In order to qualify, an Indemnified Contributor
+must: a) promptly notify the Commercial Contributor in writing
+of such claim, and b) allow the Commercial Contributor to control,
+and cooperate with the Commercial Contributor in, the defense
+and any related settlement negotiations. The Indemnified Contributor
+may participate in any such claim at its own expense.
+For example, a Contributor might include the Program in a commercial
+product offering, Product X. That Contributor is then a Commercial
+Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance
+claims and warranties are such Commercial Contributor's responsibility
+alone. Under this section, the Commercial Contributor would have
+to defend claims against the other Contributors related to those
+performance claims and warranties, and if a court requires any
+other Contributor to pay any damages as a result, the Commercial
+Contributor must pay those damages.
+5. NO WARRANTY
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM
+IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
+OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION,
+ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
+OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and
+distributing the Program and assumes all risks associated with
+its exercise of rights under this Agreement , including but not
+limited to the risks and costs of program errors, compliance
+with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations.
+6. DISCLAIMER OF LIABILITY
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT
+NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), 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 OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE
+OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY
+OF SUCH DAMAGES.
+7. GENERAL
+If any provision of this Agreement is invalid or unenforceable
+under applicable law, it shall not affect the validity or enforceability
+of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be
+reformed to the minimum extent necessary to make such provision
+valid and enforceable.
+If Recipient institutes patent litigation against any entity
+(including a cross-claim or counterclaim in a lawsuit) alleging
+that the Program itself (excluding combinations of the Program
+with other software or hardware) infringes such Recipient's patent(s),
+then such Recipient's rights granted under Section 2(b) shall
+terminate as of the date such litigation is filed.
+All Recipient's rights under this Agreement shall terminate if
+it fails to comply with any of the material terms or conditions
+of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If
+all Recipient's rights under this Agreement terminate, Recipient
+agrees to cease use and distribution of the Program as soon as
+reasonably practicable. However, Recipient's obligations under
+this Agreement and any licenses granted by Recipient relating
+to the Program shall continue and survive.
+Everyone is permitted to copy and distribute copies of this Agreement,
+but in order to avoid inconsistency the Agreement is copyrighted
+and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including
+revisions) of this Agreement from time to time. No one other
+than the Agreement Steward has the right to modify this Agreement.
+The Eclipse Foundation is the initial Agreement Steward. The
+Eclipse Foundation may assign the responsibility to serve as
+the Agreement Steward to a suitable separate entity. Each new
+version of the Agreement will be given a distinguishing version
+number. The Program (including Contributions) may always be distributed
+subject to the version of the Agreement under which it was received.
+In addition, after a new version of the Agreement is published,
+Contributor may elect to distribute the Program (including its
+Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights
+or licenses to the intellectual property of any Contributor under
+this Agreement, whether expressly, by implication, estoppel or
+otherwise. All rights in the Program not expressly granted under
+this Agreement are reserved.
+This Agreement is governed by the laws of the State of New York
+and the intellectual property laws of the United States of America.
+No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose.
+Each party waives its rights to a jury trial in any resulting
+litigation.
+ </license>
+
+ <url>
+ <update label="JBossTools Update Site" url="http://download.jboss.org/jbosstools/updates/stable"/>
+ </url>
+
+
+ <plugin
+ id="org.jboss.tools.portlet.core"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.jboss.tools.portlet.ui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
16 years, 5 months
JBoss Tools SVN: r9183 - trunk/portlet/features.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2008-07-19 21:44:29 -0400 (Sat, 19 Jul 2008)
New Revision: 9183
Added:
trunk/portlet/features/org.jboss.tools.portlet.feature/
Log:
JBIDE-2233 Ability to create a new "Portlet" project
16 years, 5 months
JBoss Tools SVN: r9182 - trunk/portlet.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2008-07-19 21:38:07 -0400 (Sat, 19 Jul 2008)
New Revision: 9182
Added:
trunk/portlet/plugins/
Log:
16 years, 5 months
JBoss Tools SVN: r9181 - trunk/portlet.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2008-07-19 21:37:51 -0400 (Sat, 19 Jul 2008)
New Revision: 9181
Added:
trunk/portlet/features/
Log:
JBIDE-2233 Ability to create a new "Portlet" project
16 years, 5 months
JBoss Tools SVN: r9180 - trunk.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2008-07-19 21:37:13 -0400 (Sat, 19 Jul 2008)
New Revision: 9180
Added:
trunk/portlet/
Log:
JBIDE-2233 Ability to create a new "Portlet" project
16 years, 5 months
JBoss Tools SVN: r9179 - in trunk/as/tests/org.jboss.ide.eclipse.as.test: projects and 17 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-07-19 17:17:37 -0400 (Sat, 19 Jul 2008)
New Revision: 9179
Added:
trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ear/
trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ear/.project
trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ear/.settings/
trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ear/.settings/org.eclipse.wst.common.component
trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ear/.settings/org.eclipse.wst.common.project.facet.core.xml
trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ear/EarContent/
trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ear/EarContent/META-INF/
trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ear/EarContent/META-INF/application.xml
trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/
trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/.classpath
trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/.project
trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/.settings/
trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/.settings/org.eclipse.jdt.core.prefs
trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/.settings/org.eclipse.jst.common.project.facet.core.prefs
trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/.settings/org.eclipse.wst.common.component
trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/.settings/org.eclipse.wst.common.project.facet.core.xml
trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/build/
trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/build/classes/
trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/build/classes/META-INF/
trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/build/classes/META-INF/MANIFEST.MF
trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/build/classes/META-INF/ejb-jar.xml
trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/build/classes/my/
trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/build/classes/my/bean/
trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/build/classes/my/bean/Tiger.class
trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/build/classes/my/bean/TigerBean.class
trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/ejbModule/
trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/ejbModule/META-INF/
trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/ejbModule/META-INF/MANIFEST.MF
trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/ejbModule/META-INF/ejb-jar.xml
trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/ejbModule/my/
trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/ejbModule/my/bean/
trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/ejbModule/my/bean/Tiger.java
trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/ejbModule/my/bean/TigerBean.java
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/JBIDE2512bTest.java
Modified:
trunk/as/tests/org.jboss.ide.eclipse.as.test/META-INF/MANIFEST.MF
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/ASTestSuite.java
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/AbstractDeploymentTest.java
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/JBIDE1104Test.java
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/JBIDE2512aTest.java
Log:
Committing new test which proves WTP failures
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.test/META-INF/MANIFEST.MF 2008-07-19 01:45:52 UTC (rev 9178)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.test/META-INF/MANIFEST.MF 2008-07-19 21:17:37 UTC (rev 9179)
@@ -16,6 +16,8 @@
org.eclipse.wst.common.project.facet.core,
org.eclipse.wst.common.project.facet.ui,
org.eclipse.debug.core,
- org.eclipse.jdt.launching
+ org.eclipse.jdt.launching,
+ org.eclipse.jst.jee;bundle-version="1.0.100",
+ org.eclipse.jst.server.core;bundle-version="1.1.0"
Eclipse-LazyStart: true
Bundle-ClassPath: jbossastest.jar
Added: trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ear/.project
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ear/.project (rev 0)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ear/.project 2008-07-19 21:17:37 UTC (rev 9179)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>JBIDE2512b-ear</name>
+ <comment></comment>
+ <projects>
+ <project>Seam99-ejb</project>
+ <project>2512b-ejb</project>
+ <project>JBIDE2512b-ejb</project>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ </natures>
+</projectDescription>
Added: trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ear/.settings/org.eclipse.wst.common.component
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ear/.settings/org.eclipse.wst.common.component (rev 0)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ear/.settings/org.eclipse.wst.common.component 2008-07-19 21:17:37 UTC (rev 9179)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+ <wb-module deploy-name="JBIDE2512b-ear">
+ <wb-resource deploy-path="/" source-path="/EarContent"/>
+ <dependent-module deploy-path="/lib/" handle="module:/resource/JBIDE2512b-ejb/JBIDE2512b-ejb">
+ <dependent-object/>
+ <dependency-type>uses</dependency-type>
+ </dependent-module>
+ </wb-module>
+</project-modules>
Added: trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ear/.settings/org.eclipse.wst.common.project.facet.core.xml
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ear/.settings/org.eclipse.wst.common.project.facet.core.xml (rev 0)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ear/.settings/org.eclipse.wst.common.project.facet.core.xml 2008-07-19 21:17:37 UTC (rev 9179)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <runtime name="JBoss 4.2 Runtime"/>
+ <fixed facet="jst.ear"/>
+ <installed facet="jst.ear" version="5.0"/>
+</faceted-project>
Added: trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ear/EarContent/META-INF/application.xml
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ear/EarContent/META-INF/application.xml (rev 0)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ear/EarContent/META-INF/application.xml 2008-07-19 21:17:37 UTC (rev 9179)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:application="http://java.sun.com/xml/ns/javaee/application_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd" version="5">
+ <display-name>JBIDE2512b-ear</display-name>
+ <module>
+ <ejb>lib/Seam99-ejb.jar</ejb>
+ </module>
+ <module>
+ <ejb>JBIDE2512b-ejb.jar</ejb>
+ </module>
+</application>
\ No newline at end of file
Added: trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/.classpath
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/.classpath (rev 0)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/.classpath 2008-07-19 21:17:37 UTC (rev 9179)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="ejbModule"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
+ <classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.jboss.ide.eclipse.as.core.server.runtime.runtimeTarget/JBoss 4.2 Runtime"/>
+ <classpathentry kind="output" path="build/classes"/>
+</classpath>
Added: trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/.project
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/.project (rev 0)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/.project 2008-07-19 21:17:37 UTC (rev 9179)
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>JBIDE2512b-ejb</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
+ <triggers>full,incremental,</triggers>
+ <arguments>
+ <dictionary>
+ <key>LaunchConfigHandle</key>
+ <value><project>/.externalToolBuilders/org.jboss.tools.seam.core.seambuilder.launch</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
+ <triggers>full,incremental,</triggers>
+ <arguments>
+ <dictionary>
+ <key>LaunchConfigHandle</key>
+ <value><project>/.externalToolBuilders/org.hibernate.eclipse.console.hibernateBuilder.launch</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ <nature>org.jboss.tools.seam.core.seamnature</nature>
+ <nature>org.hibernate.eclipse.console.hibernateNature</nature>
+ </natures>
+</projectDescription>
Added: trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/.settings/org.eclipse.jdt.core.prefs 2008-07-19 21:17:37 UTC (rev 9179)
@@ -0,0 +1,7 @@
+#Thu Jul 19 17:20:50 PDT 2007
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
Added: trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/.settings/org.eclipse.jst.common.project.facet.core.prefs
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/.settings/org.eclipse.jst.common.project.facet.core.prefs (rev 0)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/.settings/org.eclipse.jst.common.project.facet.core.prefs 2008-07-19 21:17:37 UTC (rev 9179)
@@ -0,0 +1,3 @@
+#Thu Jul 17 15:17:36 EDT 2008
+classpath.helper/org.eclipse.jst.server.core.container\:\:org.jboss.ide.eclipse.as.core.server.runtime.runtimeTarget\:\:JBoss\ 4.2\ Runtime/owners=jst.ejb\:3.0
+eclipse.preferences.version=1
Added: trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/.settings/org.eclipse.wst.common.component
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/.settings/org.eclipse.wst.common.component (rev 0)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/.settings/org.eclipse.wst.common.component 2008-07-19 21:17:37 UTC (rev 9179)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+<wb-module deploy-name="JBIDE2512b-ejb">
+<wb-resource deploy-path="/" source-path="/ejbModule"/>
+<property name="java-output-path" value="build/classes"/>
+</wb-module>
+</project-modules>
Added: trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/.settings/org.eclipse.wst.common.project.facet.core.xml
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/.settings/org.eclipse.wst.common.project.facet.core.xml (rev 0)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/.settings/org.eclipse.wst.common.project.facet.core.xml 2008-07-19 21:17:37 UTC (rev 9179)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <runtime name="JBoss 4.2 Runtime"/>
+ <fixed facet="jst.java"/>
+ <fixed facet="jst.ejb"/>
+ <installed facet="jst.java" version="5.0"/>
+ <installed facet="jst.ejb" version="3.0"/>
+</faceted-project>
Added: trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/build/classes/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/build/classes/META-INF/MANIFEST.MF (rev 0)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/build/classes/META-INF/MANIFEST.MF 2008-07-19 21:17:37 UTC (rev 9179)
@@ -0,0 +1,2 @@
+Manifest-Version: 1.0
+
Added: trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/build/classes/META-INF/ejb-jar.xml
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/build/classes/META-INF/ejb-jar.xml (rev 0)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/build/classes/META-INF/ejb-jar.xml 2008-07-19 21:17:37 UTC (rev 9179)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ejb-jar xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:ejb="http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd" version="3.0">
+ <interceptors>
+ <interceptor>
+ <interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
+ </interceptor>
+ </interceptors>
+ <assembly-descriptor>
+ <interceptor-binding>
+ <ejb-name>*</ejb-name>
+ <interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
+ </interceptor-binding>
+ </assembly-descriptor>
+</ejb-jar>
\ No newline at end of file
Added: trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/build/classes/my/bean/Tiger.class
===================================================================
(Binary files differ)
Property changes on: trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/build/classes/my/bean/Tiger.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/build/classes/my/bean/TigerBean.class
===================================================================
(Binary files differ)
Property changes on: trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/build/classes/my/bean/TigerBean.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/ejbModule/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/ejbModule/META-INF/MANIFEST.MF (rev 0)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/ejbModule/META-INF/MANIFEST.MF 2008-07-19 21:17:37 UTC (rev 9179)
@@ -0,0 +1,2 @@
+Manifest-Version: 1.0
+
Added: trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/ejbModule/META-INF/ejb-jar.xml
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/ejbModule/META-INF/ejb-jar.xml (rev 0)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/ejbModule/META-INF/ejb-jar.xml 2008-07-19 21:17:37 UTC (rev 9179)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ejb-jar xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:ejb="http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd" version="3.0">
+ <interceptors>
+ <interceptor>
+ <interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
+ </interceptor>
+ </interceptors>
+ <assembly-descriptor>
+ <interceptor-binding>
+ <ejb-name>*</ejb-name>
+ <interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
+ </interceptor-binding>
+ </assembly-descriptor>
+</ejb-jar>
\ No newline at end of file
Added: trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/ejbModule/my/bean/Tiger.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/ejbModule/my/bean/Tiger.java (rev 0)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/ejbModule/my/bean/Tiger.java 2008-07-19 21:17:37 UTC (rev 9179)
@@ -0,0 +1,8 @@
+package my.bean;
+
+import javax.ejb.Remote;
+
+@Remote
+public interface Tiger {
+
+}
Added: trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/ejbModule/my/bean/TigerBean.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/ejbModule/my/bean/TigerBean.java (rev 0)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.test/projects/JBIDE2512b-ejb/ejbModule/my/bean/TigerBean.java 2008-07-19 21:17:37 UTC (rev 9179)
@@ -0,0 +1,8 @@
+package my.bean;
+
+import javax.ejb.Stateless;
+import my.bean.Tiger;
+
+public @Stateless class TigerBean implements Tiger {
+
+}
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/ASTestSuite.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/ASTestSuite.java 2008-07-19 01:45:52 UTC (rev 9178)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/ASTestSuite.java 2008-07-19 21:17:37 UTC (rev 9179)
@@ -29,6 +29,7 @@
import org.jboss.ide.eclipse.as.test.classpath.ProjectRuntimeTest;
import org.jboss.ide.eclipse.as.test.classpath.RuntimeServerModelTest;
import org.jboss.ide.eclipse.as.test.publishing.JBIDE2512aTest;
+import org.jboss.ide.eclipse.as.test.publishing.JBIDE2512bTest;
public class ASTestSuite extends TestSuite {
public static Test suite() {
@@ -39,6 +40,7 @@
suite.addTestSuite(ProjectRuntimeTest.class);
suite.addTestSuite(JBIDE1657Test.class);
suite.addTestSuite(JBIDE2512aTest.class);
+ suite.addTestSuite(JBIDE2512bTest.class);
return suite;
}
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/AbstractDeploymentTest.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/AbstractDeploymentTest.java 2008-07-19 01:45:52 UTC (rev 9178)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/AbstractDeploymentTest.java 2008-07-19 21:17:37 UTC (rev 9179)
@@ -34,32 +34,39 @@
public abstract class AbstractDeploymentTest extends TestCase {
protected String BUNDLE_NAME = "org.jboss.ide.eclipse.as.test";
- private TestProjectProvider provider;
- protected IProject workspaceProject;
- protected String sourceProjectName;
- protected String testProperties;
+ private TestProjectProvider[] provider;
+ protected IProject[] workspaceProject;
+ protected String[] sourceProjectName;
+ protected String[] testProperties;
protected IRuntime runtime;
protected IServer server;
protected String deployLocation;
- public AbstractDeploymentTest(String projectName, String testProperties) {
+ public AbstractDeploymentTest(String[] projectNames, String[] testProperties) {
try {
- this.sourceProjectName = projectName;
+ this.sourceProjectName = projectNames;
this.testProperties = testProperties;
this.deployLocation = getFileLocation("/testOutputs").getAbsolutePath();
+ this.provider = new TestProjectProvider[sourceProjectName.length];
+ this.workspaceProject = new IProject[sourceProjectName.length];
} catch( CoreException ce ) {
fail("Could not access deploy location");
}
}
+ public AbstractDeploymentTest(String projectName, String testProperties) {
+ this(new String[]{projectName}, new String[] {testProperties});
+ }
protected void setUp() throws Exception {
- cleanFolder(getProjectLocation("TempProject").getAbsolutePath());
- assembleInTempProject();
createServer();
- String path = "/projects/TempProject/" + sourceProjectName;
- provider = new TestProjectProvider(BUNDLE_NAME, path, sourceProjectName, true);
- workspaceProject = provider.getProject();
- workspaceProject.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
+ for( int i = 0; i < sourceProjectName.length; i++ ) {
+ cleanFolder(getProjectLocation("TempProject").getAbsolutePath());
+ assembleInTempProject(i);
+ String path = "/projects/TempProject/" + sourceProjectName[i];
+ provider[i] = new TestProjectProvider(BUNDLE_NAME, path, sourceProjectName[i], true);
+ workspaceProject[i] = provider[i].getProject();
+ workspaceProject[i].refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
+ }
}
protected void cleanFolder(String folder) throws CoreException {
@@ -97,30 +104,33 @@
* jars or archives all over the place and to keep the size
* of the test plugin small
*/
- protected void assembleInTempProject() throws CoreException {
+ protected void assembleInTempProject(int index) throws CoreException {
+ String sourceProjectName = this.sourceProjectName[index];
File tempProject = getProjectLocation("TempProject");
File srcProject = getProjectLocation(sourceProjectName);
File destProject = new File(tempProject, sourceProjectName);
FileUtil.fileSafeCopy(srcProject, destProject);
// now copy files over from the properties file
- File propertiesFile = getFileLocation("projectPieces/" + testProperties);
- Properties props = new Properties();
- try {
- props.load(new FileInputStream(propertiesFile));
- boolean done = false;
- String srcKey, destKey;
- int i = 1;
- while( !done ) {
- srcKey = "copy" + i + "src";
- destKey = "copy" + i + "dest";
- done = copy(props.getProperty(srcKey), props.getProperty(destKey));
- i++;
+ if( testProperties[index] != null ) {
+ File propertiesFile = getFileLocation("projectPieces/" + testProperties[index]);
+ Properties props = new Properties();
+ try {
+ props.load(new FileInputStream(propertiesFile));
+ boolean done = false;
+ String srcKey, destKey;
+ int i = 1;
+ while( !done ) {
+ srcKey = "copy" + i + "src";
+ destKey = "copy" + i + "dest";
+ done = copy(props.getProperty(srcKey), props.getProperty(destKey));
+ i++;
+ }
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
}
- } catch (FileNotFoundException e) {
- e.printStackTrace();
- } catch (IOException e) {
- e.printStackTrace();
}
}
@@ -159,11 +169,12 @@
}
protected void tearDown() throws Exception {
- provider.dispose();
+ for( int i = 0; i < sourceProjectName.length; i++ )
+ provider[i].dispose();
+
cleanFolder(getProjectLocation("TempProject").getAbsolutePath());
cleanFolder(getFileLocation("testOutputs"));
runtime.delete();
server.delete();
- }
-
+ }
}
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/JBIDE1104Test.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/JBIDE1104Test.java 2008-07-19 01:45:52 UTC (rev 9178)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/JBIDE1104Test.java 2008-07-19 21:17:37 UTC (rev 9179)
@@ -14,7 +14,7 @@
}
public void testJBIDE1104() throws Exception {
- IModuleArtifact[] artifacts = ServerPlugin.getModuleArtifacts(workspaceProject);
+ IModuleArtifact[] artifacts = ServerPlugin.getModuleArtifacts(workspaceProject[0]);
assertNotNull(artifacts);
assertEquals(1, artifacts.length);
assertNotNull(artifacts[0]);
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/JBIDE2512aTest.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/JBIDE2512aTest.java 2008-07-19 01:45:52 UTC (rev 9178)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/JBIDE2512aTest.java 2008-07-19 21:17:37 UTC (rev 9179)
@@ -15,7 +15,7 @@
}
public void testJBIDE2512a() throws Exception {
- IModuleArtifact[] artifacts = ServerPlugin.getModuleArtifacts(workspaceProject);
+ IModuleArtifact[] artifacts = ServerPlugin.getModuleArtifacts(workspaceProject[0]);
assertNotNull(artifacts);
assertEquals(1, artifacts.length);
assertNotNull(artifacts[0]);
Added: trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/JBIDE2512bTest.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/JBIDE2512bTest.java (rev 0)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/JBIDE2512bTest.java 2008-07-19 21:17:37 UTC (rev 9179)
@@ -0,0 +1,39 @@
+package org.jboss.ide.eclipse.as.test.publishing;
+
+import org.eclipse.jst.server.core.IEnterpriseApplication;
+import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.IModuleArtifact;
+import org.eclipse.wst.server.core.IModuleType;
+import org.eclipse.wst.server.core.internal.ServerPlugin;
+
+// associated with eclipse bug id 241466
+public class JBIDE2512bTest extends AbstractDeploymentTest {
+
+ public JBIDE2512bTest() {
+ super(new String[] { "JBIDE2512b-ear", "JBIDE2512b-ejb"}, new String[] {null, null});
+ }
+
+ public void testJBIDE2512b() throws Exception {
+ IModuleArtifact[] earArtifacts = ServerPlugin.getModuleArtifacts(workspaceProject[0]);
+ assertNotNull(earArtifacts);
+ assertEquals(1, earArtifacts.length);
+ assertNotNull(earArtifacts[0]);
+ IModule earModule = earArtifacts[0].getModule();
+
+ IModuleArtifact[] ejbArtifacts = ServerPlugin.getModuleArtifacts(workspaceProject[1]);
+ assertNotNull(ejbArtifacts);
+ assertEquals(1, ejbArtifacts.length);
+ assertNotNull(ejbArtifacts[0]);
+ IModule ejbModule = ejbArtifacts[0].getModule();
+
+ IModuleType moduleType = earModule.getModuleType();
+ assertTrue("jst.ear".equals(moduleType.getId()));
+ IEnterpriseApplication enterpriseApplication = (IEnterpriseApplication) earModule
+ .loadAdapter(IEnterpriseApplication.class, null);
+ assertNotNull(enterpriseApplication);
+
+ String uri = enterpriseApplication.getURI(ejbModule);
+ assertNotNull(uri);
+ assertFalse("JBIDE2512b-ejb.jar".equals(uri));
+ }
+}
16 years, 5 months
JBoss Tools SVN: r9178 - trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-07-18 21:45:52 -0400 (Fri, 18 Jul 2008)
New Revision: 9178
Modified:
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/ASTestSuite.java
Log:
Test Case
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/ASTestSuite.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/ASTestSuite.java 2008-07-19 01:44:55 UTC (rev 9177)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/ASTestSuite.java 2008-07-19 01:45:52 UTC (rev 9178)
@@ -28,6 +28,7 @@
import org.jboss.ide.eclipse.as.test.classpath.JEEClasspathContainerTest;
import org.jboss.ide.eclipse.as.test.classpath.ProjectRuntimeTest;
import org.jboss.ide.eclipse.as.test.classpath.RuntimeServerModelTest;
+import org.jboss.ide.eclipse.as.test.publishing.JBIDE2512aTest;
public class ASTestSuite extends TestSuite {
public static Test suite() {
@@ -37,6 +38,7 @@
suite.addTestSuite(JEEClasspathContainerTest.class);
suite.addTestSuite(ProjectRuntimeTest.class);
suite.addTestSuite(JBIDE1657Test.class);
+ suite.addTestSuite(JBIDE2512aTest.class);
return suite;
}
16 years, 5 months
JBoss Tools SVN: r9177 - in trunk/as/tests/org.jboss.ide.eclipse.as.test: src/org/jboss/ide/eclipse/as/test/publishing and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-07-18 21:44:55 -0400 (Fri, 18 Jul 2008)
New Revision: 9177
Added:
trunk/as/tests/org.jboss.ide.eclipse.as.test/projectPieces/2512a.properties
trunk/as/tests/org.jboss.ide.eclipse.as.test/projectPieces/EJB3NoDescriptor.jar
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/JBIDE2512aTest.java
Removed:
trunk/as/tests/org.jboss.ide.eclipse.as.test/projectPieces/Ejb3NoDescriptor.jar
Log:
Test Case
Added: trunk/as/tests/org.jboss.ide.eclipse.as.test/projectPieces/2512a.properties
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.test/projectPieces/2512a.properties (rev 0)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.test/projectPieces/2512a.properties 2008-07-19 01:44:55 UTC (rev 9177)
@@ -0,0 +1,2 @@
+copy1src=EJB3NoDescriptor.jar
+copy1dest=EarContent/lib/EJB3WithDescriptor.jar
Copied: trunk/as/tests/org.jboss.ide.eclipse.as.test/projectPieces/EJB3NoDescriptor.jar (from rev 8855, trunk/as/tests/org.jboss.ide.eclipse.as.test/projectPieces/Ejb3NoDescriptor.jar)
===================================================================
(Binary files differ)
Deleted: trunk/as/tests/org.jboss.ide.eclipse.as.test/projectPieces/Ejb3NoDescriptor.jar
===================================================================
(Binary files differ)
Added: trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/JBIDE2512aTest.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/JBIDE2512aTest.java (rev 0)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/JBIDE2512aTest.java 2008-07-19 01:44:55 UTC (rev 9177)
@@ -0,0 +1,43 @@
+package org.jboss.ide.eclipse.as.test.publishing;
+
+import java.io.File;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.IModuleArtifact;
+import org.eclipse.wst.server.core.internal.ServerPlugin;
+
+// associated with eclipse bug id 241332
+public class JBIDE2512aTest extends AbstractDeploymentTest {
+
+ public JBIDE2512aTest() {
+ super("SimpleEar", "2512a.properties");
+ }
+
+ public void testJBIDE2512a() throws Exception {
+ IModuleArtifact[] artifacts = ServerPlugin.getModuleArtifacts(workspaceProject);
+ assertNotNull(artifacts);
+ assertEquals(1, artifacts.length);
+ assertNotNull(artifacts[0]);
+ IModule module = artifacts[0].getModule();
+ assertNotNull(module);
+ IStatus result = publish(module);
+ assertEquals(IStatus.OK, result.getSeverity());
+
+ // now verify the deployment
+ // now do my asserts regarding the output structure
+ File depLoc = new File(deployLocation);
+ File projLoc = new File(depLoc, "SimpleEar.ear");
+ assertNotNull(projLoc);
+ assertTrue(projLoc.exists());
+ assertTrue(projLoc.isDirectory());
+
+ // new stuff
+ File shouldNotExist = new File(projLoc, "EJB3WithDescriptor.jar");
+ File libFolder = new File(projLoc, "lib");
+ File shouldExist = new File(libFolder, "EJB3WithDescriptor.jar");
+
+ assertTrue(shouldExist.exists());
+ assertFalse(shouldNotExist.exists());
+ }
+}
16 years, 5 months