[jboss-cvs] JBossAS SVN: r83552 - in trunk/system/src: main/org/jboss/system/server/profile/repository/metadata and 7 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Jan 28 07:18:14 EST 2009


Author: emuckenhuber
Date: 2009-01-28 07:18:14 -0500 (Wed, 28 Jan 2009)
New Revision: 83552

Added:
   trunk/system/src/main/org/jboss/system/server/profile/repository/metadata/FilteredProfileMetaData.java
   trunk/system/src/main/org/jboss/system/server/profile/repository/metadata/HotDeploymentProfileMetaData.java
   trunk/system/src/main/org/jboss/system/server/profile/repository/metadata/ImmutableProfileMetaData.java
   trunk/system/src/tests/org/jboss/test/server/profileservice/bootstrap/
   trunk/system/src/tests/org/jboss/test/server/profileservice/bootstrap/BootstrapUnitTestCase.java
   trunk/system/src/tests/org/jboss/test/server/profileservice/support/MavenProfileMetaData.java
Removed:
   trunk/system/src/tests/org/jboss/test/server/profileservice/support/MavenProfileSourceMetaData.java
Modified:
   trunk/system/src/main/org/jboss/system/server/profile/repository/AbstractProfile.java
   trunk/system/src/main/org/jboss/system/server/profile/repository/metadata/BasicProfileMetaData.java
   trunk/system/src/main/org/jboss/system/server/profile/repository/metadata/HotDeploymentProfileSourceMetaData.java
   trunk/system/src/main/org/jboss/system/server/profile/repository/metadata/ImmutableProfileSourceMetaData.java
   trunk/system/src/main/org/jboss/system/server/profile/repository/metadata/ProfilesMetaData.java
   trunk/system/src/main/org/jboss/system/server/profileservice/repository/AbstractProfileFactory.java
   trunk/system/src/main/org/jboss/system/server/profileservice/repository/TypedProfileRepository.java
   trunk/system/src/main/org/jboss/system/server/profileservice/repository/XmlProfileFactory.java
   trunk/system/src/resources/parsing-tests/common/profiles/metadata-deployers.profile
   trunk/system/src/resources/parsing-tests/parsing/test.xml
   trunk/system/src/tests/org/jboss/test/server/profileservice/test/BootstrapProfileFactoryUnitTestCase.java
   trunk/system/src/tests/org/jboss/test/server/profileservice/test/ProfileParsingUnitTestCase.java
   trunk/system/src/tests/org/jboss/test/server/profileservice/test/ProfileServiceUnitTestCase.java
Log:
update profile xml format and processing

Modified: trunk/system/src/main/org/jboss/system/server/profile/repository/AbstractProfile.java
===================================================================
--- trunk/system/src/main/org/jboss/system/server/profile/repository/AbstractProfile.java	2009-01-28 11:51:18 UTC (rev 83551)
+++ trunk/system/src/main/org/jboss/system/server/profile/repository/AbstractProfile.java	2009-01-28 12:18:14 UTC (rev 83552)
@@ -44,9 +44,6 @@
 public class AbstractProfile implements Profile
 {
 
-   /** TODO The version */
-   private String version;
-   
    /** The profile key */
    final private ProfileKey key;
    
@@ -133,11 +130,6 @@
       return this.repository.getModifiedDeployments();
    }
 
-   public String getVersion()
-   {
-      return this.version;
-   }
-
    public boolean hasDeployment(String name)
    {
       if(name == null)

Modified: trunk/system/src/main/org/jboss/system/server/profile/repository/metadata/BasicProfileMetaData.java
===================================================================
--- trunk/system/src/main/org/jboss/system/server/profile/repository/metadata/BasicProfileMetaData.java	2009-01-28 11:51:18 UTC (rev 83551)
+++ trunk/system/src/main/org/jboss/system/server/profile/repository/metadata/BasicProfileMetaData.java	2009-01-28 12:18:14 UTC (rev 83552)
@@ -23,10 +23,8 @@
 
 import java.util.List;
 
-import javax.xml.bind.annotation.XmlAnyElement;
 import javax.xml.bind.annotation.XmlAttribute;
 import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElements;
 
 import org.jboss.profileservice.spi.metadata.ProfileDeploymentMetaData;
 import org.jboss.profileservice.spi.metadata.ProfileMetaData;
@@ -91,12 +89,7 @@
       this.domain = domain;
    }
 
-   @XmlElements
-   ({
-     @XmlElement(name = "profile-source", type = FilteredProfileSourceMetaData.class),
-     @XmlElement(name = "hotdeployment-source", type = HotDeploymentProfileSourceMetaData.class)
-   })
-   @XmlAnyElement
+   @XmlElement(name = "profile-source", type = FilteredProfileSourceMetaData.class)
    public ProfileSourceMetaData getSource()
    {
       return source;

Added: trunk/system/src/main/org/jboss/system/server/profile/repository/metadata/FilteredProfileMetaData.java
===================================================================
--- trunk/system/src/main/org/jboss/system/server/profile/repository/metadata/FilteredProfileMetaData.java	                        (rev 0)
+++ trunk/system/src/main/org/jboss/system/server/profile/repository/metadata/FilteredProfileMetaData.java	2009-01-28 12:18:14 UTC (rev 83552)
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, 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.system.server.profile.repository.metadata;
+
+import javax.xml.bind.annotation.XmlNsForm;
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.jboss.xb.annotations.JBossXmlSchema;
+
+/**
+ * The meta data defining a filtered profile. This is the
+ * standard type of a profile.
+ * 
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+ at JBossXmlSchema(namespace="urn:jboss:profileservice:profile:filtered:1.0", elementFormDefault=XmlNsForm.QUALIFIED)
+ at XmlRootElement(name = "profile")
+public class FilteredProfileMetaData extends BasicProfileMetaData
+{
+
+}
+

Added: trunk/system/src/main/org/jboss/system/server/profile/repository/metadata/HotDeploymentProfileMetaData.java
===================================================================
--- trunk/system/src/main/org/jboss/system/server/profile/repository/metadata/HotDeploymentProfileMetaData.java	                        (rev 0)
+++ trunk/system/src/main/org/jboss/system/server/profile/repository/metadata/HotDeploymentProfileMetaData.java	2009-01-28 12:18:14 UTC (rev 83552)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, 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.system.server.profile.repository.metadata;
+
+import javax.xml.bind.annotation.XmlNsForm;
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.jboss.xb.annotations.JBossXmlSchema;
+
+/**
+ * The meta data defining a hot deployment profile.
+ * 
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+ at JBossXmlSchema(namespace="urn:jboss:profileservice:profile:hotdeployment:1.0", elementFormDefault=XmlNsForm.QUALIFIED)
+ at XmlRootElement(name = "hotdeployment-profile")
+public class HotDeploymentProfileMetaData extends BasicProfileMetaData
+{
+
+}
+

Modified: trunk/system/src/main/org/jboss/system/server/profile/repository/metadata/HotDeploymentProfileSourceMetaData.java
===================================================================
--- trunk/system/src/main/org/jboss/system/server/profile/repository/metadata/HotDeploymentProfileSourceMetaData.java	2009-01-28 11:51:18 UTC (rev 83551)
+++ trunk/system/src/main/org/jboss/system/server/profile/repository/metadata/HotDeploymentProfileSourceMetaData.java	2009-01-28 12:18:14 UTC (rev 83552)
@@ -21,18 +21,13 @@
  */ 
 package org.jboss.system.server.profile.repository.metadata;
 
-import javax.xml.bind.annotation.XmlNsForm;
-import javax.xml.bind.annotation.XmlRootElement;
-
-import org.jboss.xb.annotations.JBossXmlSchema;
-
-
 /**
+ * 
+ * 
  * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
  * @version $Revision$
  */
- at JBossXmlSchema(namespace="urn:jboss:profileservice:source:hotdeployment:1.0", elementFormDefault=XmlNsForm.QUALIFIED)
- at XmlRootElement(name = "hotdeployment-source")
+ at Deprecated
 public class HotDeploymentProfileSourceMetaData extends AbstractProfileSourceMetaData
 {
 

Added: trunk/system/src/main/org/jboss/system/server/profile/repository/metadata/ImmutableProfileMetaData.java
===================================================================
--- trunk/system/src/main/org/jboss/system/server/profile/repository/metadata/ImmutableProfileMetaData.java	                        (rev 0)
+++ trunk/system/src/main/org/jboss/system/server/profile/repository/metadata/ImmutableProfileMetaData.java	2009-01-28 12:18:14 UTC (rev 83552)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, 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.system.server.profile.repository.metadata;
+
+
+/**
+ * The meta data defining a immutable profile.
+ * 
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class ImmutableProfileMetaData extends BasicProfileMetaData
+{
+
+}
+

Modified: trunk/system/src/main/org/jboss/system/server/profile/repository/metadata/ImmutableProfileSourceMetaData.java
===================================================================
--- trunk/system/src/main/org/jboss/system/server/profile/repository/metadata/ImmutableProfileSourceMetaData.java	2009-01-28 11:51:18 UTC (rev 83551)
+++ trunk/system/src/main/org/jboss/system/server/profile/repository/metadata/ImmutableProfileSourceMetaData.java	2009-01-28 12:18:14 UTC (rev 83552)
@@ -25,6 +25,7 @@
  * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
  * @version $Revision$
  */
+ at Deprecated
 public class ImmutableProfileSourceMetaData extends AbstractProfileSourceMetaData
 {
 

Modified: trunk/system/src/main/org/jboss/system/server/profile/repository/metadata/ProfilesMetaData.java
===================================================================
--- trunk/system/src/main/org/jboss/system/server/profile/repository/metadata/ProfilesMetaData.java	2009-01-28 11:51:18 UTC (rev 83551)
+++ trunk/system/src/main/org/jboss/system/server/profile/repository/metadata/ProfilesMetaData.java	2009-01-28 12:18:14 UTC (rev 83552)
@@ -23,8 +23,10 @@
 
 import java.util.List;
 
+import javax.xml.bind.annotation.XmlAnyElement;
 import javax.xml.bind.annotation.XmlAttribute;
 import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElements;
 import javax.xml.bind.annotation.XmlNsForm;
 import javax.xml.bind.annotation.XmlRootElement;
 
@@ -93,7 +95,11 @@
       this.domain = domain;
    }
    
-   @XmlElement(name = "profile", type = BasicProfileMetaData.class)
+   @XmlElements({
+      @XmlElement(name = "profile", type = FilteredProfileMetaData.class),
+      @XmlElement(name = "hotdeployment-profile", type = HotDeploymentProfileMetaData.class)
+   })
+   @XmlAnyElement
    public List<ProfileMetaData> getProfiles()
    {
       return profiles;

Modified: trunk/system/src/main/org/jboss/system/server/profileservice/repository/AbstractProfileFactory.java
===================================================================
--- trunk/system/src/main/org/jboss/system/server/profileservice/repository/AbstractProfileFactory.java	2009-01-28 11:51:18 UTC (rev 83551)
+++ trunk/system/src/main/org/jboss/system/server/profileservice/repository/AbstractProfileFactory.java	2009-01-28 12:18:14 UTC (rev 83552)
@@ -36,7 +36,7 @@
  * The abstract profile factory.
  * This does actually just creates a abstract profile for now!
  * 
- * TODO maybe create put in spi ?
+ * TODO maybe move to spi ?
  * 
  * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
  * @version $Revision$
@@ -80,4 +80,5 @@
       
       return profile;
    }
+
 }
\ No newline at end of file

Modified: trunk/system/src/main/org/jboss/system/server/profileservice/repository/TypedProfileRepository.java
===================================================================
--- trunk/system/src/main/org/jboss/system/server/profileservice/repository/TypedProfileRepository.java	2009-01-28 11:51:18 UTC (rev 83551)
+++ trunk/system/src/main/org/jboss/system/server/profileservice/repository/TypedProfileRepository.java	2009-01-28 12:18:14 UTC (rev 83552)
@@ -93,6 +93,7 @@
    
          ProfileSourceMetaData source = metaData.getSource();
          
+         // NOTE this is a hack :)
          // TODO the filtering should be done by the profile itself!
          if(source instanceof FilteredProfileSourceMetaData)
          {

Modified: trunk/system/src/main/org/jboss/system/server/profileservice/repository/XmlProfileFactory.java
===================================================================
--- trunk/system/src/main/org/jboss/system/server/profileservice/repository/XmlProfileFactory.java	2009-01-28 11:51:18 UTC (rev 83551)
+++ trunk/system/src/main/org/jboss/system/server/profileservice/repository/XmlProfileFactory.java	2009-01-28 12:18:14 UTC (rev 83552)
@@ -201,8 +201,9 @@
       VirtualFile vf = getProfileFile(key, null);
       // parse
       ProfilesMetaData profiles = parse(vf);
-      // Override the profiles key (as it should be the same - filename and profiles name
-      processProfilesMetaData(key, profiles);
+      // TODO maybe override the profiles key (as it should be the same - filename and profiles name
+      // processProfilesMetaData(key, profiles);
+      processProfilesMetaData(profiles);
    }
    
    /**

Modified: trunk/system/src/resources/parsing-tests/common/profiles/metadata-deployers.profile
===================================================================
--- trunk/system/src/resources/parsing-tests/common/profiles/metadata-deployers.profile	2009-01-28 11:51:18 UTC (rev 83551)
+++ trunk/system/src/resources/parsing-tests/common/profiles/metadata-deployers.profile	2009-01-28 12:18:14 UTC (rev 83552)
@@ -1,7 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<profiles xmlns="urn:jboss:profileservice:profiles:1.0">
+<profiles 
+	xmlns="urn:jboss:profileservice:profiles:1.0">
 
-	<profile name="metadata-deployers">
+	<profile name="metadata-deployer-beans">
 		<profile-source>
 			<source>${jboss.server.base.url}deployers</source>
 		</profile-source>

Modified: trunk/system/src/resources/parsing-tests/parsing/test.xml
===================================================================
--- trunk/system/src/resources/parsing-tests/parsing/test.xml	2009-01-28 11:51:18 UTC (rev 83551)
+++ trunk/system/src/resources/parsing-tests/parsing/test.xml	2009-01-28 12:18:14 UTC (rev 83552)
@@ -11,20 +11,20 @@
 		<deployment>myEjb3Deployment.ear</deployment>
 	</profile>
 	
-	<profile name="mutable-source">
-		<hotdeployment-source>
+	<hotdeployment-profile name="mutable">
+		<profile-source>
 			<source>${jboss.server.home.url}deploy</source>
 			<source>${jboss.server.home.url}deploy2</source>
-		</hotdeployment-source>
+		</profile-source>
 		<sub-profile>immutable</sub-profile>
-	</profile>
+	</hotdeployment-profile>
 
-	<profile name="maven-source">
-		<maven-source xmlns="urn:jboss:profileservice:source:maven:1.0">
+	<maven-profile name="maven" xmlns="urn:jboss:profileservice:profile:maven:1.0">
+		<profile-source>
 			<source>http://repository.jboss.org/maven2</source>
-		</maven-source>
+		</profile-source>
 		<sub-profile>hotdeployment</sub-profile>
 		<deployment>org/jboss/jboss-profileservice/6.0.0-GA/profileservice-spi.jar</deployment>
-	</profile>
+	</maven-profile>
 
 </profiles>
\ No newline at end of file

Added: trunk/system/src/tests/org/jboss/test/server/profileservice/bootstrap/BootstrapUnitTestCase.java
===================================================================
--- trunk/system/src/tests/org/jboss/test/server/profileservice/bootstrap/BootstrapUnitTestCase.java	                        (rev 0)
+++ trunk/system/src/tests/org/jboss/test/server/profileservice/bootstrap/BootstrapUnitTestCase.java	2009-01-28 12:18:14 UTC (rev 83552)
@@ -0,0 +1,96 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, 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.test.server.profileservice.bootstrap;
+
+import java.io.File;
+import java.net.URL;
+import java.net.URLConnection;
+import java.util.Properties;
+
+import org.jboss.bootstrap.spi.Server;
+import org.jboss.bootstrap.spi.ServerConfig;
+import org.jboss.system.server.ServerLoader;
+import org.jboss.test.BaseTestCase;
+
+/**
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class BootstrapUnitTestCase extends BaseTestCase
+{
+
+   public BootstrapUnitTestCase(String name)
+   {
+      super(name);
+   }
+
+   public void test() throws Exception
+   {
+      Properties props = System.getProperties();
+      
+      File home = new File("../build/output/jboss-6.0.0.Alpha1/");
+      props.put(ServerConfig.HOME_URL, home.toURL().toString());
+      props.put(ServerConfig.HOME_DIR, home.toURL().toString());
+      props.setProperty(ServerConfig.SERVER_BIND_ADDRESS, "127.0.0.1");
+      
+      File bootstrap = new File("src/resources/test/bootstrap/bootstrap.xml");
+      props.put("jboss.bootstrap.url", bootstrap.toURL().toString());
+      
+      ServerLoader loader = new ServerLoader(props);
+      loader.addEndorsedJars();
+      Server server = loader.load(Thread.currentThread().getContextClassLoader());      
+      try
+      {
+         // Init
+         server.init(props);
+         // Start
+         server.start();
+         
+         URL url = new URL("http://localhost:8080");
+         URLConnection connection = url.openConnection();
+         connection.connect();
+      
+      }
+      finally
+      {
+         // Stop
+         server.shutdown();
+      }
+      getLog().debug("java classpath: " + System.getProperty("java.class.path"));      
+   }
+   
+   protected void fixProperties(Properties props)
+   {
+      String bindAddress = System.getProperty(ServerConfig.SERVER_BIND_ADDRESS);
+      if (System.getProperty("java.rmi.server.hostname") == null)
+         System.setProperty("java.rmi.server.hostname", bindAddress);
+      if (System.getProperty("jgroups.bind_addr") == null)
+         System.setProperty("jgroups.bind_addr", bindAddress);
+      
+      // Enable jboss.vfs.forceCopy by default, if unspecified
+      if (System.getProperty("jboss.vfs.forceCopy") == null)
+         System.setProperty("jboss.vfs.forceCopy", "true");
+   }
+   
+   
+}
+

Copied: trunk/system/src/tests/org/jboss/test/server/profileservice/support/MavenProfileMetaData.java (from rev 83548, trunk/system/src/tests/org/jboss/test/server/profileservice/support/MavenProfileSourceMetaData.java)
===================================================================
--- trunk/system/src/tests/org/jboss/test/server/profileservice/support/MavenProfileMetaData.java	                        (rev 0)
+++ trunk/system/src/tests/org/jboss/test/server/profileservice/support/MavenProfileMetaData.java	2009-01-28 12:18:14 UTC (rev 83552)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, 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.test.server.profileservice.support;
+
+import javax.xml.bind.annotation.XmlNsForm;
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.jboss.system.server.profile.repository.metadata.BasicProfileMetaData;
+import org.jboss.xb.annotations.JBossXmlSchema;
+
+/**
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+ at JBossXmlSchema(namespace="urn:jboss:profileservice:profile:maven:1.0", elementFormDefault=XmlNsForm.QUALIFIED)
+ at XmlRootElement(name = "maven-profile")
+public class MavenProfileMetaData extends BasicProfileMetaData
+{
+
+}
+


Property changes on: trunk/system/src/tests/org/jboss/test/server/profileservice/support/MavenProfileMetaData.java
___________________________________________________________________
Name: svn:mergeinfo
   + 

Deleted: trunk/system/src/tests/org/jboss/test/server/profileservice/support/MavenProfileSourceMetaData.java
===================================================================
--- trunk/system/src/tests/org/jboss/test/server/profileservice/support/MavenProfileSourceMetaData.java	2009-01-28 11:51:18 UTC (rev 83551)
+++ trunk/system/src/tests/org/jboss/test/server/profileservice/support/MavenProfileSourceMetaData.java	2009-01-28 12:18:14 UTC (rev 83552)
@@ -1,57 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, 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.test.server.profileservice.support;
-
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlNsForm;
-import javax.xml.bind.annotation.XmlRootElement;
-
-import org.jboss.system.server.profile.repository.metadata.AbstractProfileSourceMetaData;
-import org.jboss.xb.annotations.JBossXmlSchema;
-
-
-/**
- * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
- * @version $Revision$
- */
- at JBossXmlSchema(namespace="urn:jboss:profileservice:source:maven:1.0", elementFormDefault=XmlNsForm.QUALIFIED)
- at XmlRootElement(name = "maven-source")
-public class MavenProfileSourceMetaData extends AbstractProfileSourceMetaData
-{
-   /** The sources */
-   List<String> sources;
-
-   @XmlElement(name = "source")
-   public List<String> getSources()
-   {
-      return null;
-   }
-   
-   public void setSources(List<String> sources)
-   {
-      this.sources = sources;
-   }
-
-}
-

Modified: trunk/system/src/tests/org/jboss/test/server/profileservice/test/BootstrapProfileFactoryUnitTestCase.java
===================================================================
--- trunk/system/src/tests/org/jboss/test/server/profileservice/test/BootstrapProfileFactoryUnitTestCase.java	2009-01-28 11:51:18 UTC (rev 83551)
+++ trunk/system/src/tests/org/jboss/test/server/profileservice/test/BootstrapProfileFactoryUnitTestCase.java	2009-01-28 12:18:14 UTC (rev 83552)
@@ -114,34 +114,34 @@
       assertProfile("bootstrap", 0);
 
       // Assert ejb3-runtime profile
-      assertProfile("metadata-deployers", 1,
+      assertProfile("metadata-deployer-beans", 1,
             new String[] { "bootstrap" } );
       
       // Assert ejb3-deployers profile
       assertProfile("ejb3-deployers", 2,
-            new String[] { "metadata-deployers", "bootstrap" } );
+            new String[] { "metadata-deployer-beans", "bootstrap" } );
 
       // Assert ejb3-runtime profile
       assertProfile("ejb3-runtime", 3,
-            new String[] { "ejb3-deployers", "metadata-deployers", "bootstrap" } );
+            new String[] { "ejb3-deployers", "metadata-deployer-beans", "bootstrap" } );
       
       // Assert seam profile
       assertProfile("seam-deployers", 4,
-            new String[] { "ejb3-deployers", "ejb3-runtime", "metadata-deployers", "bootstrap" });
+            new String[] { "ejb3-deployers", "ejb3-runtime", "metadata-deployer-beans", "bootstrap" });
     
       // Assert web-deployers profile
       assertProfile("jboss-web-deployers", 5,
-            new String[] { "seam-deployers", "ejb3-deployers", "ejb3-runtime", "metadata-deployers", "bootstrap" } );
+            new String[] { "seam-deployers", "ejb3-deployers", "ejb3-runtime", "metadata-deployer-beans", "bootstrap" } );
       
       // Assert web-runtime profile
       assertProfile("jboss-web-runtime", 6,
             new String[] { "jboss-web-deployers",
-            "seam-deployers", "ejb3-deployers", "ejb3-runtime", "metadata-deployers", "bootstrap" } );
+            "seam-deployers", "ejb3-deployers", "ejb3-runtime", "metadata-deployer-beans", "bootstrap" } );
       
       // Assert clustering-deployers
       assertProfile("clustering-deployers", 7, new String[] {
             "bootstrap",
-            "metadata-deployers",
+            "metadata-deployer-beans",
             "ejb3-deployers",
             "ejb3-runtime",
             "seam-deployers",
@@ -151,7 +151,7 @@
       // Assert hasingleton
       assertProfile("clustering-runtime", 8, new String[] {
             "bootstrap",
-            "metadata-deployers",
+            "metadata-deployer-beans",
             "ejb3-deployers",
             "ejb3-runtime",
             "seam-deployers",
@@ -162,7 +162,7 @@
       // Assert default profile
       assertProfile("default", 9, new String[] {
                "bootstrap",
-               "metadata-deployers",
+               "metadata-deployer-beans",
                "ejb3-deployers",
                "ejb3-runtime",
                "seam-deployers",

Modified: trunk/system/src/tests/org/jboss/test/server/profileservice/test/ProfileParsingUnitTestCase.java
===================================================================
--- trunk/system/src/tests/org/jboss/test/server/profileservice/test/ProfileParsingUnitTestCase.java	2009-01-28 11:51:18 UTC (rev 83551)
+++ trunk/system/src/tests/org/jboss/test/server/profileservice/test/ProfileParsingUnitTestCase.java	2009-01-28 12:18:14 UTC (rev 83552)
@@ -24,10 +24,10 @@
 import java.io.File;
 
 import org.jboss.profileservice.spi.metadata.ProfileMetaData;
-import org.jboss.system.server.profile.repository.metadata.FilteredProfileSourceMetaData;
-import org.jboss.system.server.profile.repository.metadata.HotDeploymentProfileSourceMetaData;
+import org.jboss.system.server.profile.repository.metadata.FilteredProfileMetaData;
+import org.jboss.system.server.profile.repository.metadata.HotDeploymentProfileMetaData;
 import org.jboss.system.server.profile.repository.metadata.ProfilesMetaData;
-import org.jboss.test.server.profileservice.support.MavenProfileSourceMetaData;
+import org.jboss.test.server.profileservice.support.MavenProfileMetaData;
 import org.jboss.xb.binding.Unmarshaller;
 import org.jboss.xb.binding.UnmarshallerFactory;
 import org.jboss.xb.binding.sunday.unmarshalling.DefaultSchemaResolver;
@@ -49,9 +49,9 @@
    {
       // Add schema bindings
       resolver.addClassBinding("urn:jboss:profileservice:profiles:1.0", ProfilesMetaData.class);
-      resolver.addClassBinding("urn:jboss:profileservice:source:filtered:1.0", FilteredProfileSourceMetaData.class);
-      resolver.addClassBinding("urn:jboss:profileservice:source:hotdeployment:1.0", HotDeploymentProfileSourceMetaData.class);
-      resolver.addClassBinding("urn:jboss:profileservice:source:maven:1.0", MavenProfileSourceMetaData.class);
+      resolver.addClassBinding("urn:jboss:profileservice:profile:filtered:1.0", FilteredProfileMetaData.class);
+      resolver.addClassBinding("urn:jboss:profileservice:profile:hotdeployment:1.0", HotDeploymentProfileMetaData.class);
+      resolver.addClassBinding("urn:jboss:profileservice:profile:maven:1.0", MavenProfileMetaData.class);
    }
    
    
@@ -76,15 +76,15 @@
          
          // test immutable
          ProfileMetaData immutable = md.getProfiles().get(0);
-         assertTrue(immutable.getSource() instanceof FilteredProfileSourceMetaData);
+         assertTrue(immutable instanceof FilteredProfileMetaData);
          
          // test hotdeployment
          ProfileMetaData hotdeployment = md.getProfiles().get(1);
-         assertTrue(hotdeployment.getSource() instanceof HotDeploymentProfileSourceMetaData);
+         assertTrue(hotdeployment instanceof HotDeploymentProfileMetaData);
          
-         // test maven as wildcard
+         // test wildcard
          ProfileMetaData maven = md.getProfiles().get(2);
-         assertTrue(maven.getSource() instanceof MavenProfileSourceMetaData);
+         assertTrue(maven instanceof MavenProfileMetaData);
          
          for(ProfileMetaData profile: md.getProfiles())
             log.debug(profile.getSource().getClass());

Modified: trunk/system/src/tests/org/jboss/test/server/profileservice/test/ProfileServiceUnitTestCase.java
===================================================================
--- trunk/system/src/tests/org/jboss/test/server/profileservice/test/ProfileServiceUnitTestCase.java	2009-01-28 11:51:18 UTC (rev 83551)
+++ trunk/system/src/tests/org/jboss/test/server/profileservice/test/ProfileServiceUnitTestCase.java	2009-01-28 12:18:14 UTC (rev 83552)
@@ -121,7 +121,7 @@
       // Assert hasingleton
       assertActive("clustering-runtime");
       // Assert metadata-deployers profile
-      assertActive("metadata-deployers");
+      assertActive("metadata-deployer-beans");
       
       for(ProfileKey key : profileService.getActiveProfileKeys())
       {




More information about the jboss-cvs-commits mailing list