[jboss-svn-commits] JBoss Common SVN: r3434 - tmpdpl and 35 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Wed Aug 5 23:26:23 EDT 2009
Author: ALRubinger
Date: 2009-08-05 23:26:22 -0400 (Wed, 05 Aug 2009)
New Revision: 3434
Added:
tmpdpl/
tmpdpl/tags/
tmpdpl/trunk/
tmpdpl/trunk/api/
tmpdpl/trunk/api/pom.xml
tmpdpl/trunk/api/src/
tmpdpl/trunk/api/src/main/
tmpdpl/trunk/api/src/main/java/
tmpdpl/trunk/api/src/main/java/org/
tmpdpl/trunk/api/src/main/java/org/jboss/
tmpdpl/trunk/api/src/main/java/org/jboss/tmpdpl/
tmpdpl/trunk/api/src/main/java/org/jboss/tmpdpl/api/
tmpdpl/trunk/api/src/main/java/org/jboss/tmpdpl/api/Deployable.java
tmpdpl/trunk/api/src/main/java/org/jboss/tmpdpl/api/DeploymentException.java
tmpdpl/trunk/api/src/main/java/org/jboss/tmpdpl/api/SecurityActions.java
tmpdpl/trunk/api/src/main/java/org/jboss/tmpdpl/api/VfsVdfDeployableFactory.java
tmpdpl/trunk/build/
tmpdpl/trunk/build/pom.xml
tmpdpl/trunk/impl-vdf/
tmpdpl/trunk/impl-vdf/pom.xml
tmpdpl/trunk/impl-vdf/src/
tmpdpl/trunk/impl-vdf/src/main/
tmpdpl/trunk/impl-vdf/src/main/java/
tmpdpl/trunk/impl-vdf/src/main/java/org/
tmpdpl/trunk/impl-vdf/src/main/java/org/jboss/
tmpdpl/trunk/impl-vdf/src/main/java/org/jboss/tmpdpl/
tmpdpl/trunk/impl-vdf/src/main/java/org/jboss/tmpdpl/impl/
tmpdpl/trunk/impl-vdf/src/main/java/org/jboss/tmpdpl/impl/vdf/
tmpdpl/trunk/impl-vdf/src/main/java/org/jboss/tmpdpl/impl/vdf/VfsVdfDeployableImpl.java
tmpdpl/trunk/impl-vdf/src/main/resources/
tmpdpl/trunk/impl-vdf/src/test/
tmpdpl/trunk/impl-vdf/src/test/java/
tmpdpl/trunk/impl-vdf/src/test/java/org/
tmpdpl/trunk/impl-vdf/src/test/java/org/jboss/
tmpdpl/trunk/impl-vdf/src/test/java/org/jboss/tmpdpl/
tmpdpl/trunk/impl-vdf/src/test/java/org/jboss/tmpdpl/impl/
tmpdpl/trunk/impl-vdf/src/test/java/org/jboss/tmpdpl/impl/vdf/
tmpdpl/trunk/impl-vdf/src/test/java/org/jboss/tmpdpl/impl/vdf/VfsVdfDeployableFactoryTestCase.java
tmpdpl/trunk/impl-vdf/src/test/java/org/jboss/tmpdpl/impl/vdf/VfsVdfDeployableImplTestCase.java
tmpdpl/trunk/impl-vdf/src/test/resources/
tmpdpl/trunk/pom.xml
tmpdpl/trunk/spi-vdf/
tmpdpl/trunk/spi-vdf/pom.xml
tmpdpl/trunk/spi-vdf/src/
tmpdpl/trunk/spi-vdf/src/main/
tmpdpl/trunk/spi-vdf/src/main/java/
tmpdpl/trunk/spi-vdf/src/main/java/org/
tmpdpl/trunk/spi-vdf/src/main/java/org/jboss/
tmpdpl/trunk/spi-vdf/src/main/java/org/jboss/tmpdpl/
tmpdpl/trunk/spi-vdf/src/main/java/org/jboss/tmpdpl/spi/
tmpdpl/trunk/spi-vdf/src/main/java/org/jboss/tmpdpl/spi/vdf/
tmpdpl/trunk/spi-vdf/src/main/java/org/jboss/tmpdpl/spi/vdf/VdfDeployable.java
Log:
[TMPDPL-1] Create the project structure for Deployable types, SPIs, and VDF impl. Port the existing VDF VFS implementation and tests from EMB-32
Property changes on: tmpdpl/trunk
___________________________________________________________________
Name: svn:ignore
+ target
eclipse-target
target-eclipse
.settings
bin
.classpath
.project
Property changes on: tmpdpl/trunk/api
___________________________________________________________________
Name: svn:ignore
+ target
eclipse-target
target-eclipse
.settings
bin
.classpath
.project
Added: tmpdpl/trunk/api/pom.xml
===================================================================
--- tmpdpl/trunk/api/pom.xml (rev 0)
+++ tmpdpl/trunk/api/pom.xml 2009-08-06 03:26:22 UTC (rev 3434)
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+ <!--
+ vi:ts=2:sw=2:expandtab:
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <!-- Parent -->
+ <parent>
+ <groupId>org.jboss.tmpdpl</groupId>
+ <artifactId>tmpdpl-build</artifactId>
+ <version>0.1.0-SNAPSHOT</version>
+ <relativePath>../build/pom.xml</relativePath>
+ </parent>
+
+ <!-- Model Version -->
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- Artifact Configuration -->
+ <artifactId>tmpdpl-api</artifactId>
+ <version>0.1.0-SNAPSHOT</version>
+ <name>TMPDPL API</name>
+ <description>Client View of the TMPDPL Project</description>
+
+
+ <!-- Properties -->
+ <properties>
+
+ <!-- Versioning -->
+
+ </properties>
+
+ <!-- Dependencies -->
+ <dependencies>
+
+ <dependency>
+ <groupId>org.jboss.declarchive</groupId>
+ <artifactId>declarchive-api</artifactId>
+ </dependency>
+
+ </dependencies>
+
+</project>
+
Added: tmpdpl/trunk/api/src/main/java/org/jboss/tmpdpl/api/Deployable.java
===================================================================
--- tmpdpl/trunk/api/src/main/java/org/jboss/tmpdpl/api/Deployable.java (rev 0)
+++ tmpdpl/trunk/api/src/main/java/org/jboss/tmpdpl/api/Deployable.java 2009-08-06 03:26:22 UTC (rev 3434)
@@ -0,0 +1,39 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.tmpdpl.api;
+
+/**
+ * Deployable
+ *
+ * Represents an entity which is eligible for deployment into an
+ * Embedded Server.
+ *
+ * In practice, this is a marker interface, where an embedded server may
+ * support a finite set of the children of this type.
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface Deployable
+{
+
+}
Added: tmpdpl/trunk/api/src/main/java/org/jboss/tmpdpl/api/DeploymentException.java
===================================================================
--- tmpdpl/trunk/api/src/main/java/org/jboss/tmpdpl/api/DeploymentException.java (rev 0)
+++ tmpdpl/trunk/api/src/main/java/org/jboss/tmpdpl/api/DeploymentException.java 2009-08-06 03:26:22 UTC (rev 3434)
@@ -0,0 +1,79 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.tmpdpl.api;
+
+/**
+ * DeploymentException
+ *
+ * Indicates a problem encountered during deployment to the server
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class DeploymentException extends Exception
+{
+ //-------------------------------------------------------------------------------------||
+ // Class Members ----------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * serialVersionUID
+ */
+ private static final long serialVersionUID = 1L;
+
+ //-------------------------------------------------------------------------------------||
+ // Constructors -----------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ *
+ */
+ public DeploymentException()
+ {
+ super();
+ }
+
+ /**
+ * @param message
+ * @param cause
+ */
+ public DeploymentException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+ /**
+ * @param message
+ */
+ public DeploymentException(String message)
+ {
+ super(message);
+ }
+
+ /**
+ * @param cause
+ */
+ public DeploymentException(Throwable cause)
+ {
+ super(cause);
+ }
+}
Added: tmpdpl/trunk/api/src/main/java/org/jboss/tmpdpl/api/SecurityActions.java
===================================================================
--- tmpdpl/trunk/api/src/main/java/org/jboss/tmpdpl/api/SecurityActions.java (rev 0)
+++ tmpdpl/trunk/api/src/main/java/org/jboss/tmpdpl/api/SecurityActions.java 2009-08-06 03:26:22 UTC (rev 3434)
@@ -0,0 +1,108 @@
+package org.jboss.tmpdpl.api;
+
+import java.lang.reflect.Constructor;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
+
+/**
+ * SecurityActions
+ *
+ * A set of privileged actions that are not to leak out
+ * of this package
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+class SecurityActions
+{
+
+ //-------------------------------------------------------------------------------||
+ // Constructor ------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------||
+
+ /**
+ * No external instantiation
+ */
+ private SecurityActions()
+ {
+
+ }
+
+ //-------------------------------------------------------------------------------||
+ // Utility Methods --------------------------------------------------------------||
+ //-------------------------------------------------------------------------------||
+
+ /**
+ * Obtains the Thread Context ClassLoader
+ */
+ static ClassLoader getThreadContextClassLoader()
+ {
+ return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>()
+ {
+ public ClassLoader run()
+ {
+ return Thread.currentThread().getContextClassLoader();
+ }
+ });
+ }
+
+ /**
+ * Obtains the constructor for the specified class with the specified param types
+ * according to the contract of {@link Class#getConstructor(Class...)}
+ *
+ * @param clazz
+ * @param paramTypes
+ * @return
+ * @throws NoSuchMethodException
+ * @throws SecurityException
+ * @throws IllegalArgumentException If the class or param types were not specified
+ */
+ static Constructor<?> getConstructor(final Class<?> clazz, final Class<?>... paramTypes)
+ throws NoSuchMethodException, SecurityException, IllegalArgumentException
+ {
+ // Precondition checks
+ if (clazz == null)
+ {
+ throw new IllegalArgumentException("class must be specified");
+ }
+ if (paramTypes == null)
+ {
+ throw new IllegalArgumentException("param types must be specified");
+ }
+
+ try
+ {
+ return AccessController.doPrivileged(new PrivilegedExceptionAction<Constructor<?>>()
+ {
+
+ @Override
+ public Constructor<?> run() throws Exception
+ {
+ return clazz.getConstructor(paramTypes);
+ }
+ });
+ }
+ catch (final PrivilegedActionException pae)
+ {
+ // Throw nsme and se
+ final Throwable unwrapped = pae.getCause();
+ if (unwrapped instanceof NoSuchMethodException)
+ {
+ final NoSuchMethodException nsme = (NoSuchMethodException) unwrapped;
+ throw nsme;
+ }
+ if (unwrapped instanceof SecurityException)
+ {
+ final SecurityException se = (SecurityException) unwrapped;
+ throw se;
+ }
+
+ // Throw the cause as encountered
+ throw new RuntimeException("Error in obtaining constructor", unwrapped);
+
+ }
+ }
+
+}
Property changes on: tmpdpl/trunk/api/src/main/java/org/jboss/tmpdpl/api/SecurityActions.java
___________________________________________________________________
Name: svn:executable
+ *
Added: tmpdpl/trunk/api/src/main/java/org/jboss/tmpdpl/api/VfsVdfDeployableFactory.java
===================================================================
--- tmpdpl/trunk/api/src/main/java/org/jboss/tmpdpl/api/VfsVdfDeployableFactory.java (rev 0)
+++ tmpdpl/trunk/api/src/main/java/org/jboss/tmpdpl/api/VfsVdfDeployableFactory.java 2009-08-06 03:26:22 UTC (rev 3434)
@@ -0,0 +1,228 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.tmpdpl.api;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import org.jboss.declarchive.api.Archive;
+
+/**
+ * VfsVdfDeployableFactory
+ *
+ * Factory to create {@link Deployable} instances from
+ * {@link VfsArchive}s. This removes the API
+ * dependency upon internals for the client view and additionally
+ * acts as a convenience mechanism.
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class VfsVdfDeployableFactory
+{
+
+ //-------------------------------------------------------------------------------------||
+ // Class Members ----------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Logger
+ */
+ private static final Logger log = Logger.getLogger(VfsVdfDeployableFactory.class.getName());
+
+ /**
+ * FQN of implementation Class used in creating new Deployables
+ */
+ private static final String CLASS_NAME_VFS_VDF_DEPLOYABLE = "org.jboss.tmpdpl.impl.vdf.VfsVdfDeployableImpl";
+
+ /**
+ * FQN of the archive type actually supported by {@link VfsVdfDeployableFactory#createDeployable(VirtualArchive)}
+ */
+ private static final String CLASS_NAME_ARCHIVE_TYPE = "org.jboss.declarchive.spi.vfs.VfsArchive";
+
+ /**
+ * Constructor used in creating new {@link Deployable} instances
+ */
+ private static Constructor<?> constructor;
+
+ /**
+ * The actual type expected of archives passed to
+ * {@link VfsVdfDeployableFactory#createDeployable(Archive)};
+ * used here to do runtime type checking so we hide the internals and don't
+ * leak out APIs to the client. Will have FQN of {@link VfsVdfDeployableFactory#CLASS_NAME_ARCHIVE_TYPE}.
+ */
+ private static Class<?> supportedArchiveType;
+
+ //-------------------------------------------------------------------------------------||
+ // Constructor ------------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Internal Constructor to prohibit external
+ * instantiation
+ */
+ private VfsVdfDeployableFactory()
+ {
+ }
+
+ //-------------------------------------------------------------------------------------||
+ // Functional Methods -----------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Creates a {@link Deployable} from the specified archive
+ *
+ * @param archive
+ * @throws IllegalArgumentException If the archive is not specified or an unsupported type
+ */
+ public static Deployable createDeployable(final Archive archive) throws IllegalArgumentException
+ {
+ // Precondition check
+ final Class<?> supportedArchiveType = getSupportedArchiveType();
+ if (!supportedArchiveType.isAssignableFrom(archive.getClass()))
+ {
+ final ClassLoader archiveCl = archive.getClass().getClassLoader();
+ final ClassLoader supportedCl = supportedArchiveType.getClassLoader();
+ log.log(Level.WARNING, "Archive CL: " + archiveCl);
+ log.log(Level.WARNING, "Expected CL: " + supportedCl);
+ throw new IllegalArgumentException("Specified archive must be of type " + supportedArchiveType.getName()
+ + "; was instead: " + archive);
+ }
+
+ // Get the implementation ctor
+ final Constructor<?> constructor = getConstructor();
+
+ // Make a new instance
+ final Object obj;
+ try
+ {
+ obj = constructor.newInstance(archive);
+ if (log.isLoggable(Level.FINER))
+ {
+ log.log(Level.FINER, "Created: " + obj);
+ }
+ }
+ catch (final InstantiationException e)
+ {
+ throw new RuntimeException("Error in creating new " + Deployable.class.getName(), e);
+ }
+ catch (final IllegalAccessException e)
+ {
+ throw new RuntimeException("Error in creating new " + Deployable.class.getName(), e);
+ }
+ catch (final InvocationTargetException e)
+ {
+ throw new RuntimeException("Error in creating new " + Deployable.class.getName(), e);
+ }
+
+ // Cast
+ final Deployable deployable;
+ try
+ {
+ deployable = Deployable.class.cast(obj);
+ }
+ catch (final ClassCastException cce)
+ {
+ throw new RuntimeException("New instance should be of type " + Deployable.class.getName(), cce);
+ }
+
+ // Return
+ return deployable;
+ }
+
+ //-------------------------------------------------------------------------------------||
+ // Internal Helper Methods ------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Obtains the constructor used in creating new Deployable instances.
+ * Uses a cached copy unless not yet initialized.
+ */
+ private synchronized static Constructor<?> getConstructor()
+ {
+ // If we haven't yet cached the ctor
+ if (constructor == null)
+ {
+ // Load the impl class
+ final String implClassName = CLASS_NAME_VFS_VDF_DEPLOYABLE;
+ final Class<?> implClass = getClass(implClassName);
+
+ // Load the ctor param class
+ final String paramClassName = CLASS_NAME_ARCHIVE_TYPE;
+ final Class<?> paramClass = getClass(paramClassName);
+
+ // Get and set the ctor
+ try
+ {
+ constructor = SecurityActions.getConstructor(implClass, paramClass);
+ }
+ catch (final NoSuchMethodException nsme)
+ {
+ throw new RuntimeException("Could not find constructor to be used in factory creation of a new "
+ + Deployable.class.getSimpleName(), nsme);
+ }
+
+ }
+
+ // Return
+ return constructor;
+ }
+
+ /**
+ * Obtains the class with the specified name from the TCCL
+ *
+ * @param className
+ * @return
+ */
+ private static Class<?> getClass(final String className)
+ {
+ final ClassLoader cl = SecurityActions.getThreadContextClassLoader();
+ try
+ {
+ return Class.forName(className, false, cl);
+ }
+ catch (ClassNotFoundException cnfe)
+ {
+ throw new RuntimeException("Could not find implementation class \"" + className + "\" in " + cl, cnfe);
+ }
+ }
+
+ /**
+ * Obtains the Class representing supported archive types to be used
+ * in creation of new Deployables
+ * @return
+ */
+ private synchronized static Class<?> getSupportedArchiveType()
+ {
+ // If not yet initialized/cached
+ if (supportedArchiveType == null)
+ {
+ // Load and set
+ supportedArchiveType = getClass(CLASS_NAME_ARCHIVE_TYPE);
+ }
+
+ // Return
+ return supportedArchiveType;
+ }
+}
Property changes on: tmpdpl/trunk/build
___________________________________________________________________
Name: svn:ignore
+ target
eclipse-target
target-eclipse
.settings
bin
.classpath
.project
Added: tmpdpl/trunk/build/pom.xml
===================================================================
--- tmpdpl/trunk/build/pom.xml (rev 0)
+++ tmpdpl/trunk/build/pom.xml 2009-08-06 03:26:22 UTC (rev 3434)
@@ -0,0 +1,178 @@
+<?xml version="1.0" encoding="UTF-8"?>
+ <!--
+ vi:ts=2:sw=2:expandtab:
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <!-- Parent -->
+ <parent>
+ <groupId>org.jboss</groupId>
+ <artifactId>jboss-parent</artifactId>
+ <version>4</version>
+ </parent>
+
+ <!-- Model Version -->
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- Artifact Configuration -->
+ <groupId>org.jboss.tmpdpl</groupId>
+ <artifactId>tmpdpl-build</artifactId>
+ <version>0.1.0-SNAPSHOT</version>
+ <name>TMPDPL Build</name>
+ <description>TMPDPL Build Configuration</description>
+ <packaging>pom</packaging>
+
+ <!-- Properties -->
+ <properties>
+
+ <!-- Versioning -->
+ <version.junit_junit>4.6</version.junit_junit>
+ <version.org.jboss.declarchive_declarchive.api>0.1.0-SNAPSHOT</version.org.jboss.declarchive_declarchive.api>
+ <version.org.jboss.declarchive_declarchive.spi.vfs>0.1.0-SNAPSHOT</version.org.jboss.declarchive_declarchive.spi.vfs>
+ <version.org.jboss.deployers_jboss.deployers.spi>2.2.0.M2</version.org.jboss.deployers_jboss.deployers.spi>
+ <version.org.jboss.deployers_jboss.deployers.vfs.spi>2.2.0.M2</version.org.jboss.deployers_jboss.deployers.vfs.spi>
+ <version.org.jboss.deployers_jboss.deployers.vfs>2.2.0.M2</version.org.jboss.deployers_jboss.deployers.vfs>
+
+ </properties>
+
+ <!-- SCM -->
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/common/tmpdpl/trunk</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/common/tmpdpl/trunk</developerConnection>
+ <url>http://anonsvn.jboss.org/repos/common/tmpdpl/trunk</url>
+ </scm>
+
+ <issueManagement>
+ <system>jira</system>
+ <url>http://jira.jboss.com/jira/browse/TMPDPL</url>
+ </issueManagement>
+
+ <!-- Build -->
+ <build>
+
+ <plugins>
+
+ <!-- JBoss-specific Packaging -->
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>jboss-packaging-maven-plugin</artifactId>
+ <version>2.0-beta-1</version>
+ <extensions>true</extensions>
+ </plugin>
+
+ <!-- Compiler -->
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <inherited>true</inherited>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ <showDeprecation>false</showDeprecation>
+ <showWarnings>true</showWarnings>
+ <optimize>true</optimize>
+ <compilerVersion>1.6</compilerVersion>
+ <fork>true</fork>
+ <argLine>-Xmx512M</argLine>
+ <executable>${JAVA_HOME}/bin/javac</executable>
+ </configuration>
+ </plugin>
+
+ <!-- Surefire -->
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <redirectTestOutputToFile>true</redirectTestOutputToFile>
+ <trimStackTrace>false</trimStackTrace>
+ <printSummary>true</printSummary>
+ <includes>
+ <include>**/*TestCase.java</include>
+ <include>**/*TestSuite.java</include>
+ </includes>
+ <forkMode>always</forkMode>
+ </configuration>
+ </plugin>
+
+ <!-- Maven Release Plugin Configuration -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-release-plugin</artifactId>
+ <configuration>
+ <tagBase>https://svn.jboss.org/repos/common/tmpdpl/tags</tagBase>
+ </configuration>
+ </plugin>
+
+ <!-- Enforce Maven Environment -->
+ <plugin>
+ <artifactId>maven-enforcer-plugin
+ </artifactId>
+ <executions>
+ <execution>
+ <id>enforce-maven-environment</id>
+ <goals>
+ <goal>enforce</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <rules>
+ <requireMavenVersion>
+ <version>[2.0.9,2.1)</version> <!-- Must be Maven 2.0.9 >= x > 2.1 -->
+ </requireMavenVersion>
+ <requireJavaVersion>
+ <version>1.6.0</version> <!-- Must be JDK6 -->
+ </requireJavaVersion>
+ </rules>
+ </configuration>
+ </plugin>
+
+ </plugins>
+
+ </build>
+
+ <!-- Dependency Management -->
+ <dependencyManagement>
+ <dependencies>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>${version.junit_junit}</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.declarchive</groupId>
+ <artifactId>declarchive-api</artifactId>
+ <version>${version.org.jboss.declarchive_declarchive.api}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.declarchive</groupId>
+ <artifactId>declarchive-spi-vfs</artifactId>
+ <version>${version.org.jboss.declarchive_declarchive.spi.vfs}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.deployers</groupId>
+ <artifactId>jboss-deployers-spi</artifactId>
+ <version>${version.org.jboss.deployers_jboss.deployers.spi}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.deployers</groupId>
+ <artifactId>jboss-deployers-vfs-spi</artifactId>
+ <version>${version.org.jboss.deployers_jboss.deployers.vfs.spi}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.deployers</groupId>
+ <artifactId>jboss-deployers-vfs</artifactId>
+ <version>${version.org.jboss.deployers_jboss.deployers.vfs}</version>
+ </dependency>
+
+ </dependencies>
+ </dependencyManagement>
+
+</project>
+
Property changes on: tmpdpl/trunk/impl-vdf
___________________________________________________________________
Name: svn:ignore
+ target
eclipse-target
target-eclipse
.settings
bin
.classpath
.project
Added: tmpdpl/trunk/impl-vdf/pom.xml
===================================================================
--- tmpdpl/trunk/impl-vdf/pom.xml (rev 0)
+++ tmpdpl/trunk/impl-vdf/pom.xml 2009-08-06 03:26:22 UTC (rev 3434)
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>
+ <!--
+ vi:ts=2:sw=2:expandtab:
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <!-- Parent -->
+ <parent>
+ <groupId>org.jboss.tmpdpl</groupId>
+ <artifactId>tmpdpl-build</artifactId>
+ <version>0.1.0-SNAPSHOT</version>
+ <relativePath>../build/pom.xml</relativePath>
+ </parent>
+
+ <!-- Model Version -->
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- Artifact Configuration -->
+ <artifactId>tmpdpl-impl-vdf</artifactId>
+ <version>0.1.0-SNAPSHOT</version>
+ <name>TMPDPL Implementations for VDF</name>
+ <description>TMPDPL Implementations for JBoss Virtual Deployer Framework</description>
+
+
+ <!-- Properties -->
+ <properties>
+
+ <!-- Versioning -->
+ <version.org.jboss.tmpdpl_tmpdpl.spi.vdf>0.1.0-SNAPSHOT</version.org.jboss.tmpdpl_tmpdpl.spi.vdf>
+ <version.org.jboss.declarchive_declarchive.impl.vfs>0.1.0-SNAPSHOT</version.org.jboss.declarchive_declarchive.impl.vfs>
+
+ </properties>
+
+ <!-- Dependencies -->
+ <dependencies>
+
+ <!--
+ org.jboss.tmpdpl
+ -->
+ <dependency>
+ <groupId>org.jboss.tmpdpl</groupId>
+ <artifactId>tmpdpl-spi-vdf</artifactId>
+ <version>${version.org.jboss.tmpdpl_tmpdpl.spi.vdf}</version>
+ </dependency>
+
+ <!--
+ External Projects
+ -->
+ <dependency>
+ <groupId>org.jboss.declarchive</groupId>
+ <artifactId>declarchive-spi-vfs</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.deployers</groupId>
+ <artifactId>jboss-deployers-vfs-spi</artifactId>
+ </dependency>
+
+ <!--
+ Test Dependencies
+ -->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.declarchive</groupId>
+ <artifactId>declarchive-impl-vfs</artifactId>
+ <version>${version.org.jboss.declarchive_declarchive.impl.vfs}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.deployers</groupId>
+ <artifactId>jboss-deployers-vfs</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+
+</project>
+
Added: tmpdpl/trunk/impl-vdf/src/main/java/org/jboss/tmpdpl/impl/vdf/VfsVdfDeployableImpl.java
===================================================================
--- tmpdpl/trunk/impl-vdf/src/main/java/org/jboss/tmpdpl/impl/vdf/VfsVdfDeployableImpl.java (rev 0)
+++ tmpdpl/trunk/impl-vdf/src/main/java/org/jboss/tmpdpl/impl/vdf/VfsVdfDeployableImpl.java 2009-08-06 03:26:22 UTC (rev 3434)
@@ -0,0 +1,192 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.tmpdpl.impl.vdf;
+
+import java.util.logging.Logger;
+
+import org.jboss.declarchive.spi.vfs.VfsArchive;
+import org.jboss.deployers.client.spi.Deployment;
+import org.jboss.deployers.vfs.spi.client.VFSDeploymentFactory;
+import org.jboss.tmpdpl.spi.vdf.VdfDeployable;
+import org.jboss.virtual.VirtualFile;
+
+/**
+ * VfsVdfDeployableImpl
+ *
+ * A Virtual Deployer's Framework Deployment backed by
+ * a Virtual File System root
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class VfsVdfDeployableImpl implements VdfDeployable
+{
+
+ //-------------------------------------------------------------------------------------||
+ // Class Members ----------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Logger
+ */
+ private static final Logger log = Logger.getLogger(VfsVdfDeployableImpl.class.getName());
+
+ //-------------------------------------------------------------------------------------||
+ // Instance Members -------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * The underlying deployment
+ */
+ private Deployment deployment;
+
+ /**
+ * The underlying archive; used in calculating equals() and hashCode() only
+ */
+ private VfsArchive archive;
+
+ //-------------------------------------------------------------------------------------||
+ // Constructor ------------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Constructor
+ *
+ * Creates a new Deployable from the specified archive
+ * @throws IllegalArgumentException If the archive is not specified
+ */
+ public VfsVdfDeployableImpl(final VfsArchive archive) throws IllegalArgumentException
+ {
+ // Precondition check
+ if (archive == null)
+ {
+ throw new IllegalArgumentException("archive must be specified");
+ }
+
+ // Obtain file
+ final VirtualFile file = archive.getRoot();
+
+ // Check
+ if (file == null)
+ {
+ throw new IllegalArgumentException("file must be obtained from the specified archive");
+ }
+
+ // Create Deployment
+ final Deployment deployment = VFSDeploymentFactory.getInstance().createVFSDeployment(file);
+ log.fine("Created deployment: " + deployment);
+
+ // Set
+ this.setDeployment(deployment);
+ this.setArchive(archive);
+ }
+
+ //-------------------------------------------------------------------------------------||
+ // Required Implementations -----------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /* (non-Javadoc)
+ * @see org.jboss.embedded.core.incubation.deployable.spi.vdf.VdfDeployable#getDeployment()
+ */
+ @Override
+ public Deployment getDeployment()
+ {
+ return this.deployment;
+ }
+
+ //-------------------------------------------------------------------------------------||
+ // Accessors / Mutators ---------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * @param deployment the deployment to set
+ */
+ private void setDeployment(final Deployment deployment)
+ {
+ this.deployment = deployment;
+ }
+
+ /**
+ * @return the archive
+ */
+ private VfsArchive getArchive()
+ {
+ return archive;
+ }
+
+ /**
+ * @param archive the archive to set
+ */
+ private void setArchive(final VfsArchive archive)
+ {
+ this.archive = archive;
+ }
+
+ /**
+ * Calculates the hash code for this Deployable, taking into
+ * account the hash code of the underlying virtual archive
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((archive == null) ? 0 : archive.hashCode());
+ return result;
+ }
+
+ /**
+ * Determines whether this reference is equal by value to
+ * the specified object. Equal if and only if the objects compared are
+ * the same type and have equal references to underlying archives.
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(final Object obj)
+ {
+ // Equal references are equal
+ if (this == obj)
+ return true;
+ // Specified is null cannot be equal
+ if (obj == null)
+ return false;
+ // Different types are not equal
+ if (getClass() != obj.getClass())
+ return false;
+ // Equal refs to underlying archives are equal
+ final VfsVdfDeployableImpl other = (VfsVdfDeployableImpl) obj;
+ final VfsArchive ourArchive = this.getArchive();
+ if (ourArchive == null)
+ {
+ throw new IllegalStateException("Underlying archive can never be null");
+ }
+ final VfsArchive otherArchive = other.getArchive();
+ if (ourArchive == otherArchive)
+ {
+ return true;
+ }
+ // Otherwise not equal
+ return false;
+ }
+
+}
Added: tmpdpl/trunk/impl-vdf/src/test/java/org/jboss/tmpdpl/impl/vdf/VfsVdfDeployableFactoryTestCase.java
===================================================================
--- tmpdpl/trunk/impl-vdf/src/test/java/org/jboss/tmpdpl/impl/vdf/VfsVdfDeployableFactoryTestCase.java (rev 0)
+++ tmpdpl/trunk/impl-vdf/src/test/java/org/jboss/tmpdpl/impl/vdf/VfsVdfDeployableFactoryTestCase.java 2009-08-06 03:26:22 UTC (rev 3434)
@@ -0,0 +1,95 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.tmpdpl.impl.vdf;
+
+import java.util.logging.Logger;
+
+import junit.framework.Assert;
+
+import org.jboss.declarchive.api.Archive;
+import org.jboss.declarchive.impl.vfs.MemoryArchiveImpl;
+import org.jboss.tmpdpl.api.Deployable;
+import org.jboss.tmpdpl.api.VfsVdfDeployableFactory;
+import org.jboss.virtual.VFS;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * VfsVdfDeployableFactoryTestCase
+ *
+ * Test Cases to assert that the {@link VfsVdfDeployableFactory} is
+ * working correctly
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class VfsVdfDeployableFactoryTestCase
+{
+
+ //-------------------------------------------------------------------------------------||
+ // Class Members ----------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Logger
+ */
+ private static final Logger log = Logger.getLogger(VfsVdfDeployableFactoryTestCase.class.getName());
+
+ //-------------------------------------------------------------------------------------||
+ // Lifecycle --------------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Initializes the virtual file system
+ */
+ @BeforeClass
+ public static void initVfs() throws Exception
+ {
+ // Init VFS
+ VFS.init();
+ }
+
+ //-------------------------------------------------------------------------------------||
+ // Tests ------------------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Tests that using a {@link VfsVdfDeployableFactory} to create a deployable
+ * type results in a new instance backed by VFS/VDF
+ */
+ @Test
+ public void testDeployableFactory() throws Exception
+ {
+ // Log
+ log.info("testDeployableFactory");
+
+ // Make an archive
+ final Archive archive = new MemoryArchiveImpl("test.jar").addClass(this.getClass());
+
+ // Make a Deployable
+ final Deployable deployable = VfsVdfDeployableFactory.createDeployable(archive);
+
+ // Ensure exists
+ Assert.assertNotNull("Deployable was not created/null", deployable);
+ Assert.assertTrue("Created deployable was not of expected type", deployable instanceof VfsVdfDeployableImpl);
+ }
+}
Added: tmpdpl/trunk/impl-vdf/src/test/java/org/jboss/tmpdpl/impl/vdf/VfsVdfDeployableImplTestCase.java
===================================================================
--- tmpdpl/trunk/impl-vdf/src/test/java/org/jboss/tmpdpl/impl/vdf/VfsVdfDeployableImplTestCase.java (rev 0)
+++ tmpdpl/trunk/impl-vdf/src/test/java/org/jboss/tmpdpl/impl/vdf/VfsVdfDeployableImplTestCase.java 2009-08-06 03:26:22 UTC (rev 3434)
@@ -0,0 +1,115 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.tmpdpl.impl.vdf;
+
+import java.util.logging.Logger;
+
+import org.jboss.declarchive.impl.vfs.MemoryArchiveImpl;
+import org.jboss.declarchive.spi.vfs.VfsArchive;
+import org.jboss.tmpdpl.api.Deployable;
+import org.jboss.virtual.VFS;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * VfsVdfDeployableImplTestCase
+ *
+ * Test Cases to ensure that that {@link VfsVdfDeployableImpl}
+ * is working as contracted
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class VfsVdfDeployableImplTestCase
+{
+
+ //-------------------------------------------------------------------------------------||
+ // Class Members ----------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Logger
+ */
+ private static final Logger log = Logger.getLogger(VfsVdfDeployableImplTestCase.class.getName());
+
+ //-------------------------------------------------------------------------------------||
+ // Lifecycle --------------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Initializes the Virtual File System
+ */
+ @BeforeClass
+ public static void initVfs() throws Exception
+ {
+ VFS.init();
+ }
+
+ //-------------------------------------------------------------------------------------||
+ // Tests ------------------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Ensures that the equals() contract is correct; archive types
+ * are equal if and only if they have equal references to backing
+ * archives.
+ * @throws Exception
+ */
+ @Test
+ public void testEqualsAndHashCode() throws Exception
+ {
+ // Log
+ log.info("testEquals");
+
+ // Make some test archives
+ final VfsArchive archive1 = new MemoryArchiveImpl("archive1");
+ final VfsArchive archive2 = new MemoryArchiveImpl("archive2");
+
+ // Make some test Deployables from the archives
+ final Deployable deployable1 = new VfsVdfDeployableImpl(archive1);
+ final Deployable deployable2 = new VfsVdfDeployableImpl(archive2);
+ final Deployable deployable3 = new VfsVdfDeployableImpl(archive1);
+
+ // Test equals
+ Assert.assertTrue("Deployables pointing to same archive should be equal by value", deployable1
+ .equals(deployable3));
+ Assert.assertTrue("Deployables must be equal by symmetry; a == b then b == a", deployable3.equals(deployable1));
+ Assert.assertFalse("Deployables pointing to different archives should not be equal by value", deployable1
+ .equals(deployable2));
+ Assert.assertFalse("Deployables must not be equal to null value", deployable1.equals(null));
+
+ // Get hashCodes
+ final int deployable1HashCode = deployable1.hashCode();
+ final int deployable3HashCode = deployable3.hashCode();
+
+ // Test hashCodes
+ Assert.assertEquals("Deployables with equal values must have equal hash codes", deployable1HashCode,
+ deployable3HashCode);
+
+ /*
+ * Note we don't check for inequal hash codes between deployable1 and deployable2 because technically
+ * they could collide
+ */
+ }
+
+}
Added: tmpdpl/trunk/pom.xml
===================================================================
--- tmpdpl/trunk/pom.xml (rev 0)
+++ tmpdpl/trunk/pom.xml 2009-08-06 03:26:22 UTC (rev 3434)
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+ <!--
+ vi:ts=2:sw=2:expandtab:
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <!-- Parent -->
+ <parent>
+ <groupId>org.jboss</groupId>
+ <artifactId>jboss-parent</artifactId>
+ <version>4</version>
+ </parent>
+
+ <!-- Model Information -->
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- Artifact Information -->
+ <groupId>org.jboss.tmpdpl</groupId>
+ <artifactId>tmpdpl-parent</artifactId>
+ <version>0.1.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+ <name>TMPDPL Aggregator</name>
+ <url>http://www.jboss.org</url>
+ <description>TMPDPL Aggregator</description>
+
+ <!-- Aggregate Modules -->
+ <modules>
+ <module>api</module>
+ <module>build</module>
+ <module>impl-vdf</module>
+ <module>spi-vdf</module>
+ </modules>
+
+</project>
Property changes on: tmpdpl/trunk/spi-vdf
___________________________________________________________________
Name: svn:ignore
+ target
eclipse-target
target-eclipse
.settings
bin
.classpath
.project
Added: tmpdpl/trunk/spi-vdf/pom.xml
===================================================================
--- tmpdpl/trunk/spi-vdf/pom.xml (rev 0)
+++ tmpdpl/trunk/spi-vdf/pom.xml 2009-08-06 03:26:22 UTC (rev 3434)
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+ <!--
+ vi:ts=2:sw=2:expandtab:
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <!-- Parent -->
+ <parent>
+ <groupId>org.jboss.tmpdpl</groupId>
+ <artifactId>tmpdpl-build</artifactId>
+ <version>0.1.0-SNAPSHOT</version>
+ <relativePath>../build/pom.xml</relativePath>
+ </parent>
+
+ <!-- Model Version -->
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- Artifact Configuration -->
+ <artifactId>tmpdpl-spi-vdf</artifactId>
+ <version>0.1.0-SNAPSHOT</version>
+ <name>TMPDPL Service Provider Contract for VDF Implementations</name>
+ <description>TMPDPL Service Provider Contract for JBoss Virtual Deployer Framework Implementations</description>
+
+
+ <!-- Properties -->
+ <properties>
+
+ <!-- Versioning -->
+ <version.org.jboss.tmpdpl_tmpdpl.api>0.1.0-SNAPSHOT</version.org.jboss.tmpdpl_tmpdpl.api>
+
+ </properties>
+
+ <!-- Dependencies -->
+ <dependencies>
+
+ <!--
+ org.jboss.tmpdpl
+ -->
+ <dependency>
+ <groupId>org.jboss.tmpdpl</groupId>
+ <artifactId>tmpdpl-api</artifactId>
+ <version>${version.org.jboss.tmpdpl_tmpdpl.api}</version>
+ </dependency>
+
+ <!--
+ External Projects
+ -->
+ <dependency>
+ <groupId>org.jboss.deployers</groupId>
+ <artifactId>jboss-deployers-spi</artifactId>
+ </dependency>
+
+ </dependencies>
+
+</project>
+
Added: tmpdpl/trunk/spi-vdf/src/main/java/org/jboss/tmpdpl/spi/vdf/VdfDeployable.java
===================================================================
--- tmpdpl/trunk/spi-vdf/src/main/java/org/jboss/tmpdpl/spi/vdf/VdfDeployable.java (rev 0)
+++ tmpdpl/trunk/spi-vdf/src/main/java/org/jboss/tmpdpl/spi/vdf/VdfDeployable.java 2009-08-06 03:26:22 UTC (rev 3434)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.tmpdpl.spi.vdf;
+
+import org.jboss.deployers.client.spi.Deployment;
+import org.jboss.tmpdpl.api.Deployable;
+
+/**
+ * VdfDeployable
+ *
+ * Represents a deployable entity which may be exposed
+ * as a JBoss Virtual Deployers Framework (VDF) implementation
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface VdfDeployable extends Deployable
+{
+ /**
+ * Returns the VDF view of this deployment
+ *
+ * @return
+ */
+ Deployment getDeployment();
+}
More information about the jboss-svn-commits
mailing list