[jboss-cvs] JBossAS SVN: r109352 - in projects/metadata/common/trunk: src/main/java/org/jboss/metadata/annotation/creator and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Nov 17 01:37:39 EST 2010


Author: jaikiran
Date: 2010-11-17 01:37:39 -0500 (Wed, 17 Nov 2010)
New Revision: 109352

Modified:
   projects/metadata/common/trunk/pom.xml
   projects/metadata/common/trunk/src/main/java/org/jboss/metadata/annotation/creator/AbstractResourceProcessor.java
Log:
JBMETA-314 Set the lookup() value while creating metadata from @Resource annotation

Modified: projects/metadata/common/trunk/pom.xml
===================================================================
--- projects/metadata/common/trunk/pom.xml	2010-11-17 04:15:43 UTC (rev 109351)
+++ projects/metadata/common/trunk/pom.xml	2010-11-17 06:37:39 UTC (rev 109352)
@@ -36,11 +36,14 @@
     <plugins>
       <plugin>
         <artifactId>maven-compiler-plugin</artifactId>
+        <version>2.0.2.SP1</version>
         <configuration>
           <showDeprecation>false</showDeprecation>
           <compilerArguments>
             <endorseddirs>${project.build.directory}/endorsed</endorseddirs>
           </compilerArguments>
+          <source>1.6</source>
+          <target>1.6</target>
         </configuration>
       </plugin>
       <plugin>
@@ -60,6 +63,16 @@
                   <overWrite>true</overWrite>
                   <outputDirectory>${project.build.directory}/endorsed</outputDirectory>
                 </artifactItem>
+                <!-- org.jboss.spec.javax.annotation:jboss-annotations-api_1.1_spec needs to be
+                in endorsed because Java SE too ships javax.annotation.Resource which doesn't have the
+                lookup() method -->
+                <artifactItem>
+                  <groupId>org.jboss.spec.javax.annotation</groupId>
+                  <artifactId>jboss-annotations-api_1.1_spec</artifactId>
+                  <type>jar</type>
+                  <overWrite>true</overWrite>
+                  <outputDirectory>${project.build.directory}/endorsed</outputDirectory>
+                </artifactItem>
               </artifactItems>
             </configuration>
           </execution>
@@ -108,6 +121,30 @@
           </execution>
         </executions>
       </plugin>
+      <plugin>
+            <artifactId>maven-enforcer-plugin</artifactId>
+            <version>1.0-beta-1</version>
+            <executions>
+                <!--  Banned dependencies -->
+                <execution>
+                    <id>enforce-banned-dependencies</id>
+                    <goals>
+                      <goal>enforce</goal>
+                    </goals>
+                </execution>
+            </executions>
+            <configuration>
+                <rules>
+                    <bannedDependencies>
+                        <excludes>
+                            <!-- JBMETA-262  Use org.jboss.spec.javax.ejb:jboss-ejb-api_3.1_spec -->
+                            <exclude>org.jboss.ejb3:jboss-ejb3-api</exclude>
+                            <exclude>org.jboss.javaee:jboss-ejb-api_3.1</exclude>
+                        </excludes>
+                    </bannedDependencies>
+                </rules>
+            </configuration>
+      </plugin>
     </plugins>
   </build>
 
@@ -165,6 +202,12 @@
   <dependencies>
 
     <dependency>
+      <groupId>org.jboss.spec.javax.annotation</groupId>
+      <artifactId>jboss-annotations-api_1.1_spec</artifactId>
+      <version>1.0.0.Final</version>
+    </dependency>
+
+    <dependency>
       <groupId>org.jboss.spec.javax.xml.ws</groupId>
       <artifactId>jboss-jaxws-api_2.2_spec</artifactId>
       <version>1.0.0.Final</version>
@@ -189,11 +232,13 @@
       <version>2.2.14.GA</version>
     </dependency>
 
+    
     <dependency>
-      <groupId>org.jboss.javaee</groupId>
-      <artifactId>jboss-ejb-api</artifactId>
-      <version>3.0.0.GA</version>
+      <groupId>org.jboss.spec.javax.ejb</groupId>
+      <artifactId>jboss-ejb-api_3.1_spec</artifactId>
+      <version>1.0.0.CR2</version>
     </dependency>
+    
 
     <dependency>
       <groupId>org.hibernate</groupId>

Modified: projects/metadata/common/trunk/src/main/java/org/jboss/metadata/annotation/creator/AbstractResourceProcessor.java
===================================================================
--- projects/metadata/common/trunk/src/main/java/org/jboss/metadata/annotation/creator/AbstractResourceProcessor.java	2010-11-17 04:15:43 UTC (rev 109351)
+++ projects/metadata/common/trunk/src/main/java/org/jboss/metadata/annotation/creator/AbstractResourceProcessor.java	2010-11-17 06:37:39 UTC (rev 109352)
@@ -263,6 +263,8 @@
       ref.setResAuth(resAuthType);
       if(annotation.mappedName().length() > 0)
          ref.setMappedName(annotation.mappedName());
+      // set lookup
+      ref.setLookupName(annotation.lookup());
       Descriptions descriptions = ProcessorUtils.getDescription(annotation.description());
       if(descriptions != null)
       {
@@ -288,6 +290,8 @@
       if(name.length() == 0)
          name = getName(element);
       entry.setEnvEntryName(name);
+      // set lookup
+      entry.setLookupName(annotation.lookup());
       Descriptions descriptions = ProcessorUtils.getDescription(annotation.description());
       if(descriptions != null)
          entry.setDescriptions(descriptions);
@@ -314,6 +318,8 @@
       ref.setServiceRefName(name);
       if(annotation.mappedName().length() > 0)
          ref.setMappedName(annotation.mappedName());
+      // set lookup
+      ref.setLookupName(annotation.lookup());
       ref.setAnnotatedElement(element);
       DescriptionGroupMetaData dg = ProcessorUtils.getDescriptionGroup(annotation.description());
       if(dg != null)
@@ -337,6 +343,8 @@
       if(name.length() == 0)
          name = getName(element);
       ref.setMessageDestinationRefName(name);
+      // set lookup
+      ref.setLookupName(annotation.lookup());
       if(annotation.mappedName().length() > 0)
          ref.setMappedName(annotation.mappedName());
       if(annotation.type() != Object.class)
@@ -361,6 +369,8 @@
       if(name.length() == 0)
          name = getName(element);
       ref.setResourceEnvRefName(name);
+      // set lookup
+      ref.setLookupName(annotation.lookup());
       if(annotation.mappedName().length() > 0)
          ref.setMappedName(annotation.mappedName());
       if(annotation.type() != Object.class)



More information about the jboss-cvs-commits mailing list