[webbeans-commits] Webbeans SVN: r2864 - in ri/trunk: impl/src/main/java/org/jboss/webbeans/resources and 3 other directories.

webbeans-commits at lists.jboss.org webbeans-commits at lists.jboss.org
Tue Jun 23 06:22:14 EDT 2009


Author: pete.muir at jboss.org
Date: 2009-06-23 06:22:14 -0400 (Tue, 23 Jun 2009)
New Revision: 2864

Added:
   ri/trunk/jboss-tck-runner/src/test/java/org/jboss/webbeans/WebBeansProfileServiceDeploymentExceptionTransformer.java
Modified:
   ri/trunk/impl/src/main/java/org/jboss/webbeans/metadata/AnnotationModel.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/resources/ClassTransformer.java
   ri/trunk/parent/pom.xml
   ri/trunk/version-matrix/pom.xml
Log:
fix minor errors

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/metadata/AnnotationModel.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/metadata/AnnotationModel.java	2009-06-23 10:21:40 UTC (rev 2863)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/metadata/AnnotationModel.java	2009-06-23 10:22:14 UTC (rev 2864)
@@ -18,7 +18,6 @@
 
 import java.lang.annotation.Annotation;
 
-
 import org.jboss.webbeans.DefinitionException;
 import org.jboss.webbeans.introspector.WBAnnotation;
 import org.jboss.webbeans.resources.ClassTransformer;
@@ -42,7 +41,7 @@
     */
    public AnnotationModel(Class<T> type, ClassTransformer transformer)
    {
-      this.annotatedAnnotation = transformer.classForName(type);
+      this.annotatedAnnotation = transformer.annotationTypeForName(type);
       init();
    }
 

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/resources/ClassTransformer.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/resources/ClassTransformer.java	2009-06-23 10:21:40 UTC (rev 2863)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/resources/ClassTransformer.java	2009-06-23 10:22:14 UTC (rev 2864)
@@ -28,11 +28,11 @@
 
 public class ClassTransformer implements Service 
 {
-   
+
    private final ConcurrentCache<Class<?>, WBClass<?>> classes;
    private final ConcurrentCache<Class<?>, WBAnnotation<?>> annotations;
    private final ClassTransformer transformer = this;
-   
+
    /**
     * 
     */
@@ -41,31 +41,31 @@
       classes = new ConcurrentCache<Class<?>, WBClass<?>>();
       annotations = new ConcurrentCache<Class<?>, WBAnnotation<?>>();
    }
-   
+
    public <T> WBClass<T> classForName(final Class<T> clazz)
    {
       return classes.putIfAbsent(clazz, new Callable<WBClass<T>>()
-      {
+            {
 
          public WBClass<T> call() throws Exception
          {
             return WBClassImpl.of(clazz, transformer);
          }
-            
-      });
+
+            });
    }
-   
-   public <T extends Annotation> WBAnnotation<T> classForName(final Class<T> clazz)
+
+   public <T extends Annotation> WBAnnotation<T> annotationTypeForName(final Class<T> clazz)
    {
       return annotations.putIfAbsent(clazz, new Callable<WBAnnotation<T>>()
-      {
+            {
 
          public WBAnnotation<T> call() throws Exception
          {
             return WBAnnotationImpl.of(clazz, transformer);
          }
-            
-      });
+
+            });
    }
 
 }

Added: ri/trunk/jboss-tck-runner/src/test/java/org/jboss/webbeans/WebBeansProfileServiceDeploymentExceptionTransformer.java
===================================================================
--- ri/trunk/jboss-tck-runner/src/test/java/org/jboss/webbeans/WebBeansProfileServiceDeploymentExceptionTransformer.java	                        (rev 0)
+++ ri/trunk/jboss-tck-runner/src/test/java/org/jboss/webbeans/WebBeansProfileServiceDeploymentExceptionTransformer.java	2009-06-23 10:22:14 UTC (rev 2864)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,  
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans;
+
+import java.util.Map.Entry;
+
+import org.jboss.deployers.client.spi.IncompleteDeploymentException;
+import org.jboss.testharness.api.DeploymentException;
+import org.jboss.testharness.api.DeploymentExceptionTransformer;
+
+/**
+ * An implementation which can transform deployment exceptions from JBoss AS
+ * reported via the Profile Service
+ * 
+ * @author Pete Muir
+ *
+ */
+public class WebBeansProfileServiceDeploymentExceptionTransformer implements DeploymentExceptionTransformer
+{
+
+   public DeploymentException transform(DeploymentException exception)
+   {
+      Throwable failure = exception.getCause();
+      if (failure.getCause() instanceof IncompleteDeploymentException)
+      {
+         IncompleteDeploymentException incompleteDeploymentException = (IncompleteDeploymentException) failure.getCause();
+         for (Entry<String, Throwable> entry : incompleteDeploymentException.getIncompleteDeployments().getContextsInError().entrySet())
+         {
+            if (entry.getKey().endsWith(exception.getName() + "/_WebBeansBootstrapBean"))
+            {
+               return new DeploymentException(exception, entry.getValue());
+            }
+         }
+      }
+      return exception;
+   }
+
+}


Property changes on: ri/trunk/jboss-tck-runner/src/test/java/org/jboss/webbeans/WebBeansProfileServiceDeploymentExceptionTransformer.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Modified: ri/trunk/parent/pom.xml
===================================================================
--- ri/trunk/parent/pom.xml	2009-06-23 10:21:40 UTC (rev 2863)
+++ ri/trunk/parent/pom.xml	2009-06-23 10:22:14 UTC (rev 2864)
@@ -97,6 +97,24 @@
                            true
                         </addDefaultSpecificationEntries>
                      </manifest>
+                     <manifestEntries>
+                        <Implementation-URL>${pom.url}</Implementation-URL>
+                     </manifestEntries>
+                     <manifestSections>
+                        <manifestSection>
+                           <name>Build-Information</name>
+                           <manifestEntries>
+                              <Maven-Version>${maven.version}</Maven-Version>
+                              <Java-Version>${java.version}</Java-Version>
+                              <Java-Vendor>${java.vendor}</Java-Vendor>
+                              <Os-Name>${os.name}</Os-Name>
+                              <Os-Arch>${os.arch}</Os-Arch>
+                              <Os-Version>${os.version}</Os-Version>
+                              <Scm-Revision>${buildNumber}</Scm-Revision>
+                              <Build-Time>${timestamp}</Build-Time>
+                           </manifestEntries>
+                        </manifestSection>
+                     </manifestSections>
                   </archive>
                </configuration>
             </plugin>
@@ -109,6 +127,38 @@
                   <outputDirectory>${project.build.directory}/generated-classes</outputDirectory>
                </configuration>
             </plugin>
+            <plugin>
+               <groupId>org.codehaus.mojo</groupId>
+               <artifactId>build-helper-maven-plugin</artifactId>
+               <executions>
+                  <execution>
+                     <phase>validate</phase>
+                     <goals>
+                        <goal>maven-version</goal>
+                     </goals>
+                  </execution>
+               </executions>
+            </plugin>
+            <plugin>
+               <groupId>org.codehaus.mojo</groupId>
+               <artifactId>buildnumber-maven-plugin</artifactId>
+               <executions>
+                  <execution>
+                     <id>set-build-properties</id>
+                     <goals>
+                        <goal>create</goal>
+                     </goals>
+                     <phase>validate</phase>
+                  </execution>
+               </executions>
+               <inherited>true</inherited>
+               <configuration>
+                  <!-- If the plugin fails to get the scm revision, set it to "unavailable" -->
+                  <getRevisionOnlyOnce>true</getRevisionOnlyOnce>
+                  <revisionOnScmFailure>unavailable</revisionOnScmFailure>
+                  <timestampFormat>{0, date, long} {0, time, long}</timestampFormat>
+               </configuration>
+            </plugin> 
          </plugins>
       </pluginManagement>
    </build>

Modified: ri/trunk/version-matrix/pom.xml
===================================================================
--- ri/trunk/version-matrix/pom.xml	2009-06-23 10:21:40 UTC (rev 2863)
+++ ri/trunk/version-matrix/pom.xml	2009-06-23 10:22:14 UTC (rev 2864)
@@ -477,6 +477,11 @@
                <version>0.6.3.CR2</version>
             </plugin>
             <plugin>
+               <groupId>org.codehaus.mojo</groupId>
+               <artifactId>buildnumber-maven-plugin</artifactId>
+               <version>1.0-beta-3</version>
+            </plugin>
+            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>1.0-beta-1</version>




More information about the weld-commits mailing list