Weld SVN: r6583 - archetypes/trunk/javaee6-webapp-src.
by weld-commits@lists.jboss.org
Author: sboscarine
Date: 2010-06-30 15:28:34 -0400 (Wed, 30 Jun 2010)
New Revision: 6583
Modified:
archetypes/trunk/javaee6-webapp-src/pom.xml
Log:
fixed build error
Modified: archetypes/trunk/javaee6-webapp-src/pom.xml
===================================================================
--- archetypes/trunk/javaee6-webapp-src/pom.xml 2010-06-28 06:24:38 UTC (rev 6582)
+++ archetypes/trunk/javaee6-webapp-src/pom.xml 2010-06-30 19:28:34 UTC (rev 6583)
@@ -57,7 +57,9 @@
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
- <enabled>false</enabled>
+ <!-- Set to true to fix error in which Maven cannot find org.apache.maven.plugins:maven-archetype-plugin:maven-plugin:2.0-alpha-6-SNAPSHOT -->
+ <enabled>true</enabled>
+ <!-- <enabled>false</enabled>-->
<updatePolicy>daily</updatePolicy>
</snapshots>
</pluginRepository>
14 years, 4 months
Weld SVN: r6582 - in extensions/trunk/src: main/java/org/jboss/weld/extensions/autoproxy and 3 other directories.
by weld-commits@lists.jboss.org
Author: swd847
Date: 2010-06-28 02:24:38 -0400 (Mon, 28 Jun 2010)
New Revision: 6582
Added:
extensions/trunk/src/main/java/org/jboss/weld/extensions/autoproxy/
extensions/trunk/src/main/java/org/jboss/weld/extensions/autoproxy/AutoProxy.java
extensions/trunk/src/main/java/org/jboss/weld/extensions/autoproxy/AutoProxyBeanLifecycle.java
extensions/trunk/src/main/java/org/jboss/weld/extensions/autoproxy/AutoProxyExtension.java
extensions/trunk/src/main/java/org/jboss/weld/extensions/autoproxy/DelegatingInjectionTarget.java
extensions/trunk/src/test/java/org/jboss/weld/extensions/test/autoproxy/
extensions/trunk/src/test/java/org/jboss/weld/extensions/test/autoproxy/AutoproxyTest.java
extensions/trunk/src/test/java/org/jboss/weld/extensions/test/autoproxy/HelloBob.java
extensions/trunk/src/test/java/org/jboss/weld/extensions/test/autoproxy/HelloGenerator.java
extensions/trunk/src/test/java/org/jboss/weld/extensions/test/autoproxy/HelloJane.java
extensions/trunk/src/test/java/org/jboss/weld/extensions/test/autoproxy/HelloService.java
extensions/trunk/src/test/java/org/jboss/weld/extensions/test/autoproxy/HelloServiceHandler.java
extensions/trunk/src/test/java/org/jboss/weld/extensions/test/autoproxy/PersonName.java
Modified:
extensions/trunk/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension
Log:
add experimental autoproxy support
Added: extensions/trunk/src/main/java/org/jboss/weld/extensions/autoproxy/AutoProxy.java
===================================================================
--- extensions/trunk/src/main/java/org/jboss/weld/extensions/autoproxy/AutoProxy.java (rev 0)
+++ extensions/trunk/src/main/java/org/jboss/weld/extensions/autoproxy/AutoProxy.java 2010-06-28 06:24:38 UTC (rev 6582)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., 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.weld.extensions.autoproxy;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.lang.reflect.InvocationHandler;
+
+/**
+ * If this annotation is applied to an interface it signifies that any
+ * sub-interfaces that are seen in ProcessAnnotatedType should be proxied
+ * and registered as a Bean
+ *
+ * @author Stuart Douglas <stuart(a)baileyroberts.com.au>
+ *
+ */
+(a)Retention(RetentionPolicy.RUNTIME)
+(a)Target(ElementType.TYPE)
+@Documented
+public @interface AutoProxy
+{
+ /**
+ * the proxy handler to use
+ */
+ Class<? extends InvocationHandler> value();
+}
Added: extensions/trunk/src/main/java/org/jboss/weld/extensions/autoproxy/AutoProxyBeanLifecycle.java
===================================================================
--- extensions/trunk/src/main/java/org/jboss/weld/extensions/autoproxy/AutoProxyBeanLifecycle.java (rev 0)
+++ extensions/trunk/src/main/java/org/jboss/weld/extensions/autoproxy/AutoProxyBeanLifecycle.java 2010-06-28 06:24:38 UTC (rev 6582)
@@ -0,0 +1,71 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., 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.weld.extensions.autoproxy;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationHandler;
+
+import javax.enterprise.context.spi.CreationalContext;
+
+import org.jboss.weld.extensions.bean.BeanImpl;
+import org.jboss.weld.extensions.bean.BeanLifecycle;
+
+public class AutoProxyBeanLifecycle<T> implements BeanLifecycle<T>
+{
+
+ private final Class<? extends T> proxyClass;
+ private final Class<? extends InvocationHandler> handler;
+ private final Constructor<? extends T> constructor;
+
+ public AutoProxyBeanLifecycle(Class<? extends T> proxyClass, Class<? extends InvocationHandler> handler)
+ {
+ this.proxyClass = proxyClass;
+ this.handler = handler;
+ try
+ {
+ constructor = proxyClass.getConstructor(InvocationHandler.class);
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+
+ public T create(BeanImpl<T> bean, CreationalContext<T> creationalContext)
+ {
+ try
+ {
+ Object hinst = handler.newInstance();
+ T instance = constructor.newInstance(hinst);
+ creationalContext.push(instance);
+ bean.getInjectionTarget().inject(instance, creationalContext);
+ bean.getInjectionTarget().postConstruct(instance);
+ return instance;
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+
+ public void destroy(BeanImpl<T> bean, T instance, CreationalContext<T> creationalContext)
+ {
+ bean.getInjectionTarget().preDestroy(instance);
+ creationalContext.release();
+ }
+
+}
Added: extensions/trunk/src/main/java/org/jboss/weld/extensions/autoproxy/AutoProxyExtension.java
===================================================================
--- extensions/trunk/src/main/java/org/jboss/weld/extensions/autoproxy/AutoProxyExtension.java (rev 0)
+++ extensions/trunk/src/main/java/org/jboss/weld/extensions/autoproxy/AutoProxyExtension.java 2010-06-28 06:24:38 UTC (rev 6582)
@@ -0,0 +1,50 @@
+package org.jboss.weld.extensions.autoproxy;
+
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Proxy;
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.enterprise.event.Observes;
+import javax.enterprise.inject.spi.AfterBeanDiscovery;
+import javax.enterprise.inject.spi.Bean;
+import javax.enterprise.inject.spi.BeanManager;
+import javax.enterprise.inject.spi.Extension;
+import javax.enterprise.inject.spi.InjectionTarget;
+import javax.enterprise.inject.spi.ProcessAnnotatedType;
+
+import org.jboss.weld.extensions.bean.BeanBuilder;
+
+public class AutoProxyExtension implements Extension
+{
+ Set<Bean<?>> beans = new HashSet<Bean<?>>();
+
+ public <X> void processAnnotatedType(@Observes ProcessAnnotatedType<X> event, BeanManager beanManager)
+ {
+
+ for(Class<?> c : event.getAnnotatedType().getJavaClass().getInterfaces())
+ {
+ if (c.isAnnotationPresent(AutoProxy.class))
+ {
+ AutoProxy an = c.getAnnotation(AutoProxy.class);
+ Class<? extends InvocationHandler> handlerClass = an.value();
+ Class<? extends X> proxyClass = (Class<? extends X>) Proxy.getProxyClass(event.getAnnotatedType().getJavaClass().getClassLoader(), event.getAnnotatedType().getJavaClass());
+ BeanBuilder<X> builder = new BeanBuilder<X>(event.getAnnotatedType(), beanManager).defineBeanFromAnnotatedType();
+ InjectionTarget<?> tgt = beanManager.createInjectionTarget(beanManager.createAnnotatedType(handlerClass));
+ DelegatingInjectionTarget<X> delegatingTarget = new DelegatingInjectionTarget(tgt);
+ builder.setInjectionTarget(delegatingTarget);
+ AutoProxyBeanLifecycle<X> life = new AutoProxyBeanLifecycle<X>(proxyClass, handlerClass);
+ builder.setBeanLifecycle(life);
+ beans.add(builder.create());
+ }
+ }
+ }
+
+ public void afterBeanDiscovery(@Observes AfterBeanDiscovery event)
+ {
+ for (Bean<?> b : beans)
+ {
+ event.addBean(b);
+ }
+ }
+}
Added: extensions/trunk/src/main/java/org/jboss/weld/extensions/autoproxy/DelegatingInjectionTarget.java
===================================================================
--- extensions/trunk/src/main/java/org/jboss/weld/extensions/autoproxy/DelegatingInjectionTarget.java (rev 0)
+++ extensions/trunk/src/main/java/org/jboss/weld/extensions/autoproxy/DelegatingInjectionTarget.java 2010-06-28 06:24:38 UTC (rev 6582)
@@ -0,0 +1,60 @@
+package org.jboss.weld.extensions.autoproxy;
+
+import java.lang.reflect.Proxy;
+import java.util.Set;
+
+import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.inject.spi.InjectionPoint;
+import javax.enterprise.inject.spi.InjectionTarget;
+
+/**
+ * class that injects the proxy handler rather than a proxy
+ * @author Stuart Douglas <stuart(a)baileyroberts.com.au>
+ *
+ * @param <T>
+ */
+public class DelegatingInjectionTarget<T> implements InjectionTarget<T>
+{
+
+ private final InjectionTarget delegate;
+
+ public DelegatingInjectionTarget(InjectionTarget<T> delegate)
+ {
+ this.delegate = delegate;
+ }
+
+ public void inject(T instance, CreationalContext<T> ctx)
+ {
+ Object handler = Proxy.getInvocationHandler(instance);
+ delegate.inject(handler, ctx);
+ }
+
+ public void postConstruct(T instance)
+ {
+ Object handler = Proxy.getInvocationHandler(instance);
+ delegate.postConstruct(handler);
+ }
+
+ public void preDestroy(T instance)
+ {
+ Object handler = Proxy.getInvocationHandler(instance);
+ delegate.preDestroy(handler);
+ }
+
+ public void dispose(T instance)
+ {
+ Object handler = Proxy.getInvocationHandler(instance);
+ delegate.dispose(handler);
+ }
+
+ public Set<InjectionPoint> getInjectionPoints()
+ {
+ return delegate.getInjectionPoints();
+ }
+
+ public T produce(CreationalContext<T> ctx)
+ {
+ throw new RuntimeException("Not applicable");
+ }
+
+}
Modified: extensions/trunk/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension
===================================================================
--- extensions/trunk/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension 2010-06-28 06:23:02 UTC (rev 6581)
+++ extensions/trunk/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension 2010-06-28 06:24:38 UTC (rev 6582)
@@ -3,4 +3,5 @@
org.jboss.weld.extensions.bean.lookup.IdentifiableBeanExtension
org.jboss.weld.extensions.core.CoreExtension
org.jboss.weld.extensions.interceptor.InterceptorExtension
-org.jboss.weld.extensions.managedproducer.ManagedProducerExtension
\ No newline at end of file
+org.jboss.weld.extensions.managedproducer.ManagedProducerExtension
+org.jboss.weld.extensions.autoproxy.AutoProxyExtension
\ No newline at end of file
Added: extensions/trunk/src/test/java/org/jboss/weld/extensions/test/autoproxy/AutoproxyTest.java
===================================================================
--- extensions/trunk/src/test/java/org/jboss/weld/extensions/test/autoproxy/AutoproxyTest.java (rev 0)
+++ extensions/trunk/src/test/java/org/jboss/weld/extensions/test/autoproxy/AutoproxyTest.java 2010-06-28 06:24:38 UTC (rev 6582)
@@ -0,0 +1,25 @@
+package org.jboss.weld.extensions.test.autoproxy;
+
+import javax.enterprise.inject.Default;
+import javax.enterprise.util.AnnotationLiteral;
+
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.weld.test.AbstractWeldTest;
+import org.testng.annotations.Test;
+
+@Artifact
+public class AutoproxyTest extends AbstractWeldTest
+{
+
+ @Test
+ public void testAutoProxy()
+ {
+ HelloBob bob = getReference(HelloBob.class, new AnnotationLiteral<Default>()
+ {
+ });
+ assert bob.sayHello().equals("Hello Bob");
+ HelloJane jane = getReference(HelloJane.class);
+ assert jane.sayHello().equals("Hello Jane");
+ }
+
+}
Added: extensions/trunk/src/test/java/org/jboss/weld/extensions/test/autoproxy/HelloBob.java
===================================================================
--- extensions/trunk/src/test/java/org/jboss/weld/extensions/test/autoproxy/HelloBob.java (rev 0)
+++ extensions/trunk/src/test/java/org/jboss/weld/extensions/test/autoproxy/HelloBob.java 2010-06-28 06:24:38 UTC (rev 6582)
@@ -0,0 +1,10 @@
+package org.jboss.weld.extensions.test.autoproxy;
+
+import javax.enterprise.inject.Default;
+
+@Default
+public interface HelloBob extends HelloService
+{
+ @PersonName("Bob")
+ public String sayHello();
+}
Added: extensions/trunk/src/test/java/org/jboss/weld/extensions/test/autoproxy/HelloGenerator.java
===================================================================
--- extensions/trunk/src/test/java/org/jboss/weld/extensions/test/autoproxy/HelloGenerator.java (rev 0)
+++ extensions/trunk/src/test/java/org/jboss/weld/extensions/test/autoproxy/HelloGenerator.java 2010-06-28 06:24:38 UTC (rev 6582)
@@ -0,0 +1,9 @@
+package org.jboss.weld.extensions.test.autoproxy;
+
+public class HelloGenerator
+{
+ public String getHelloString()
+ {
+ return "Hello ";
+ }
+}
Added: extensions/trunk/src/test/java/org/jboss/weld/extensions/test/autoproxy/HelloJane.java
===================================================================
--- extensions/trunk/src/test/java/org/jboss/weld/extensions/test/autoproxy/HelloJane.java (rev 0)
+++ extensions/trunk/src/test/java/org/jboss/weld/extensions/test/autoproxy/HelloJane.java 2010-06-28 06:24:38 UTC (rev 6582)
@@ -0,0 +1,10 @@
+package org.jboss.weld.extensions.test.autoproxy;
+
+import javax.enterprise.inject.Default;
+
+@Default
+public interface HelloJane extends HelloService
+{
+ @PersonName("Jane")
+ public String sayHello();
+}
Added: extensions/trunk/src/test/java/org/jboss/weld/extensions/test/autoproxy/HelloService.java
===================================================================
--- extensions/trunk/src/test/java/org/jboss/weld/extensions/test/autoproxy/HelloService.java (rev 0)
+++ extensions/trunk/src/test/java/org/jboss/weld/extensions/test/autoproxy/HelloService.java 2010-06-28 06:24:38 UTC (rev 6582)
@@ -0,0 +1,9 @@
+package org.jboss.weld.extensions.test.autoproxy;
+
+import org.jboss.weld.extensions.autoproxy.AutoProxy;
+
+(a)AutoProxy(HelloServiceHandler.class)
+public interface HelloService
+{
+
+}
Added: extensions/trunk/src/test/java/org/jboss/weld/extensions/test/autoproxy/HelloServiceHandler.java
===================================================================
--- extensions/trunk/src/test/java/org/jboss/weld/extensions/test/autoproxy/HelloServiceHandler.java (rev 0)
+++ extensions/trunk/src/test/java/org/jboss/weld/extensions/test/autoproxy/HelloServiceHandler.java 2010-06-28 06:24:38 UTC (rev 6582)
@@ -0,0 +1,19 @@
+package org.jboss.weld.extensions.test.autoproxy;
+
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
+
+import javax.inject.Inject;
+
+public class HelloServiceHandler implements InvocationHandler
+{
+
+ @Inject
+ HelloGenerator generator;
+
+ public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
+ {
+ return generator.getHelloString() + method.getAnnotation(PersonName.class).value();
+ }
+
+}
Added: extensions/trunk/src/test/java/org/jboss/weld/extensions/test/autoproxy/PersonName.java
===================================================================
--- extensions/trunk/src/test/java/org/jboss/weld/extensions/test/autoproxy/PersonName.java (rev 0)
+++ extensions/trunk/src/test/java/org/jboss/weld/extensions/test/autoproxy/PersonName.java 2010-06-28 06:24:38 UTC (rev 6582)
@@ -0,0 +1,10 @@
+package org.jboss.weld.extensions.test.autoproxy;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+(a)Retention(RetentionPolicy.RUNTIME)
+public @interface PersonName
+{
+ String value();
+}
14 years, 5 months
Weld SVN: r6581 - extensions/trunk/src/main/java/org/jboss/weld/extensions/bean.
by weld-commits@lists.jboss.org
Author: swd847
Date: 2010-06-28 02:23:02 -0400 (Mon, 28 Jun 2010)
New Revision: 6581
Modified:
extensions/trunk/src/main/java/org/jboss/weld/extensions/bean/BeanBuilder.java
Log:
minor enhancements to BeanBuilder
Modified: extensions/trunk/src/main/java/org/jboss/weld/extensions/bean/BeanBuilder.java
===================================================================
--- extensions/trunk/src/main/java/org/jboss/weld/extensions/bean/BeanBuilder.java 2010-06-28 04:42:12 UTC (rev 6580)
+++ extensions/trunk/src/main/java/org/jboss/weld/extensions/bean/BeanBuilder.java 2010-06-28 06:23:02 UTC (rev 6581)
@@ -23,10 +23,12 @@
import javax.enterprise.context.Dependent;
import javax.enterprise.inject.Alternative;
+import javax.enterprise.inject.Default;
import javax.enterprise.inject.spi.AnnotatedType;
import javax.enterprise.inject.spi.Bean;
import javax.enterprise.inject.spi.BeanManager;
import javax.enterprise.inject.spi.InjectionTarget;
+import javax.enterprise.util.AnnotationLiteral;
import javax.inject.Named;
import org.jboss.weld.extensions.annotated.Annotateds;
@@ -62,7 +64,10 @@
public BeanBuilder<T> defineBeanFromAnnotatedType()
{
- this.injectionTarget = beanManager.createInjectionTarget(type);
+ if (!type.getJavaClass().isInterface())
+ {
+ this.injectionTarget = beanManager.createInjectionTarget(type);
+ }
this.qualifiers = new HashSet<Annotation>();
this.stereotypes = new HashSet<Class<? extends Annotation>>();
for (Annotation annotation : type.getAnnotations())
@@ -100,6 +105,12 @@
{
this.types.add(i);
}
+ if (qualifiers.isEmpty())
+ {
+ qualifiers.add(new AnnotationLiteral<Default>()
+ {
+ });
+ }
this.beanLifecycle = new BeanLifecycleImpl<T>();
this.id = BeanImpl.class.getName() + ":" + Annotateds.createTypeId(type);
return this;
14 years, 5 months
Weld SVN: r6580 - in examples/trunk/jsf/permalink: src/main/webapp-jetty/WEB-INF and 1 other directory.
by weld-commits@lists.jboss.org
Author: dan.j.allen
Date: 2010-06-28 00:42:12 -0400 (Mon, 28 Jun 2010)
New Revision: 6580
Modified:
examples/trunk/jsf/permalink/pom.xml
examples/trunk/jsf/permalink/src/main/webapp-jetty/WEB-INF/jetty-env.xml
Log:
fix jetty
Modified: examples/trunk/jsf/permalink/pom.xml
===================================================================
--- examples/trunk/jsf/permalink/pom.xml 2010-06-27 10:52:02 UTC (rev 6579)
+++ examples/trunk/jsf/permalink/pom.xml 2010-06-28 04:42:12 UTC (rev 6580)
@@ -346,6 +346,7 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-jdk14</artifactId>
+ <version>1.5.10</version>
<scope>runtime</scope>
</dependency>
Modified: examples/trunk/jsf/permalink/src/main/webapp-jetty/WEB-INF/jetty-env.xml
===================================================================
--- examples/trunk/jsf/permalink/src/main/webapp-jetty/WEB-INF/jetty-env.xml 2010-06-27 10:52:02 UTC (rev 6579)
+++ examples/trunk/jsf/permalink/src/main/webapp-jetty/WEB-INF/jetty-env.xml 2010-06-28 04:42:12 UTC (rev 6580)
@@ -23,7 +23,7 @@
02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
<Configure id="webAppCtx" class="org.mortbay.jetty.webapp.WebAppContext">
- <New id="beanManager" class="org.mortbay.jetty.plus.naming.Resource">
+ <New class="org.mortbay.jetty.plus.naming.EnvEntry">
<Arg><Ref id="webAppCtx"/></Arg>
<Arg>BeanManager</Arg>
<Arg>
@@ -33,5 +33,6 @@
<Arg/>
</New>
</Arg>
+ <Arg type="boolean">true</Arg>
</New>
</Configure>
14 years, 5 months
Weld SVN: r6579 - in extensions/trunk: src/main/java/org/jboss/weld/extensions/resourceLoader and 3 other directories.
by weld-commits@lists.jboss.org
Author: swd847
Date: 2010-06-27 06:52:02 -0400 (Sun, 27 Jun 2010)
New Revision: 6579
Added:
extensions/trunk/src/main/java/org/jboss/weld/extensions/resourceLoader/DelegatingResourceLoader.java
extensions/trunk/src/main/java/org/jboss/weld/extensions/resourceLoader/servlet/
extensions/trunk/src/main/java/org/jboss/weld/extensions/resourceLoader/servlet/ResourceListener.java
extensions/trunk/src/main/java/org/jboss/weld/extensions/resourceLoader/servlet/ServletContextLoader.java
extensions/trunk/src/main/resources/META-INF/web-fragment.xml
Modified:
extensions/trunk/pom.xml
extensions/trunk/src/main/resources/META-INF/services/org.jboss.weld.extensions.resourceLoader.ResourceLoader
Log:
Added ability to load resources from the ServletContext
Modified: extensions/trunk/pom.xml
===================================================================
--- extensions/trunk/pom.xml 2010-06-27 06:06:05 UTC (rev 6578)
+++ extensions/trunk/pom.xml 2010-06-27 10:52:02 UTC (rev 6579)
@@ -63,6 +63,7 @@
<slf4j.version>1.5.10</slf4j.version>
<testng.version>5.12.1</testng.version>
<jboss.test.harness.version>1.1.0-CR3</jboss.test.harness.version>
+ <servlet.api.version>2.5</servlet.api.version>
</properties>
<!-- Dependency management, including extra repositories if needed -->
@@ -137,6 +138,12 @@
<artifactId>jboss-test-harness-tomcat</artifactId>
<version>${jboss.test.harness.version}</version>
</dependency>
+
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>${servlet.api.version}</version>
+ </dependency>
</dependencies>
</dependencyManagement>
<dependencies>
@@ -193,6 +200,13 @@
<artifactId>jboss-ejb3-api</artifactId>
<scope>test</scope>
</dependency>
+
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <optional>true</optional>
+ <scope>provided</scope>
+ </dependency>
</dependencies>
<scm>
Added: extensions/trunk/src/main/java/org/jboss/weld/extensions/resourceLoader/DelegatingResourceLoader.java
===================================================================
--- extensions/trunk/src/main/java/org/jboss/weld/extensions/resourceLoader/DelegatingResourceLoader.java (rev 0)
+++ extensions/trunk/src/main/java/org/jboss/weld/extensions/resourceLoader/DelegatingResourceLoader.java 2010-06-27 10:52:02 UTC (rev 6579)
@@ -0,0 +1,74 @@
+package org.jboss.weld.extensions.resourceLoader;
+
+import java.io.InputStream;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Resource loader that delegates to a static list of resource loaders.
+ *
+ * @author Stuart Douglas
+ *
+ */
+public class DelegatingResourceLoader implements ResourceLoader
+{
+ private static final Logger log = LoggerFactory.getLogger("org.jboss.weld.extensions.resources");
+
+ // TODO: get rid of the static
+ private static final List<ResourceLoader> resourceLoaders = new ArrayList<ResourceLoader>();
+
+ public static void addResourceLoader(ResourceLoader loader)
+ {
+ resourceLoaders.add(loader);
+ }
+
+ public URL getResource(String resource)
+ {
+ for (ResourceLoader r : resourceLoaders)
+ {
+ URL res = r.getResource(resource);
+ if (res != null)
+ {
+ log.trace("Loaded resource " + resource + " from " + r.toString());
+ return res;
+ }
+ }
+ return null;
+ }
+
+ public InputStream getResourceAsStream(String resource)
+ {
+ for (ResourceLoader r : resourceLoaders)
+ {
+ InputStream res = r.getResourceAsStream(resource);
+ if (res != null)
+ {
+ log.trace("Loaded resource " + resource + " from " + r.toString());
+ return res;
+ }
+ }
+ return null;
+ }
+
+ public Set<URL> getResources(String name)
+ {
+ Set<URL> ret = new HashSet<URL>();
+ for (ResourceLoader r : resourceLoaders)
+ {
+ ret.addAll(r.getResources(name));
+ }
+ return ret;
+ }
+
+ public int getPrecedence()
+ {
+ return 5;
+ }
+
+}
Added: extensions/trunk/src/main/java/org/jboss/weld/extensions/resourceLoader/servlet/ResourceListener.java
===================================================================
--- extensions/trunk/src/main/java/org/jboss/weld/extensions/resourceLoader/servlet/ResourceListener.java (rev 0)
+++ extensions/trunk/src/main/java/org/jboss/weld/extensions/resourceLoader/servlet/ResourceListener.java 2010-06-27 10:52:02 UTC (rev 6579)
@@ -0,0 +1,27 @@
+package org.jboss.weld.extensions.resourceLoader.servlet;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+
+import org.jboss.weld.extensions.resourceLoader.DelegatingResourceLoader;
+
+/**
+ * Servlet context listener than creates and registers a new
+ * ServletContextLoader for each context
+ *
+ * @author Stuart Douglas
+ *
+ */
+public class ResourceListener implements ServletContextListener
+{
+
+ public void contextDestroyed(ServletContextEvent sce)
+ {
+ }
+
+ public void contextInitialized(ServletContextEvent sce)
+ {
+ DelegatingResourceLoader.addResourceLoader(new ServletContextLoader(sce.getServletContext()));
+ }
+
+}
Added: extensions/trunk/src/main/java/org/jboss/weld/extensions/resourceLoader/servlet/ServletContextLoader.java
===================================================================
--- extensions/trunk/src/main/java/org/jboss/weld/extensions/resourceLoader/servlet/ServletContextLoader.java (rev 0)
+++ extensions/trunk/src/main/java/org/jboss/weld/extensions/resourceLoader/servlet/ServletContextLoader.java 2010-06-27 10:52:02 UTC (rev 6579)
@@ -0,0 +1,77 @@
+package org.jboss.weld.extensions.resourceLoader.servlet;
+
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Collections;
+import java.util.Set;
+
+import javax.servlet.ServletContext;
+
+import org.jboss.weld.extensions.resourceLoader.ResourceLoader;
+
+/**
+ * Implementation of ResourceLoader that can load from the servlet context. It
+ * is not used directly but is called by DelegatingResourceLoader
+ *
+ * @author stuart
+ *
+ */
+public class ServletContextLoader implements ResourceLoader
+{
+
+ private final ServletContext context;
+
+ public ServletContextLoader(ServletContext context)
+ {
+ this.context = context;
+ }
+
+ public URL getResource(String resource)
+ {
+ if (!resource.startsWith("/"))
+ {
+ resource = "/" + resource;
+ }
+ try
+ {
+ return context.getResource(resource);
+ }
+ catch (MalformedURLException e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+
+ public InputStream getResourceAsStream(String resource)
+ {
+ if (!resource.startsWith("/"))
+ {
+ resource = "/" + resource;
+ }
+ return context.getResourceAsStream(resource);
+ }
+
+ public Set<URL> getResources(String name)
+ {
+ URL r = getResource(name);
+ if (r != null)
+ {
+ return Collections.singleton(r);
+ }
+ return Collections.emptySet();
+ }
+
+ // not used
+ public int getPrecedence()
+ {
+ return 0;
+ }
+
+ @Override
+ public String toString()
+ {
+ return getClass().getName() + " [" + context.getContextPath() + "]";
+ }
+
+}
Modified: extensions/trunk/src/main/resources/META-INF/services/org.jboss.weld.extensions.resourceLoader.ResourceLoader
===================================================================
--- extensions/trunk/src/main/resources/META-INF/services/org.jboss.weld.extensions.resourceLoader.ResourceLoader 2010-06-27 06:06:05 UTC (rev 6578)
+++ extensions/trunk/src/main/resources/META-INF/services/org.jboss.weld.extensions.resourceLoader.ResourceLoader 2010-06-27 10:52:02 UTC (rev 6579)
@@ -1 +1,2 @@
-org.jboss.weld.extensions.resourceLoader.ClasspathResourceLoader
\ No newline at end of file
+org.jboss.weld.extensions.resourceLoader.ClasspathResourceLoader
+org.jboss.weld.extensions.resourceLoader.DelegatingResourceLoader
\ No newline at end of file
Added: extensions/trunk/src/main/resources/META-INF/web-fragment.xml
===================================================================
--- extensions/trunk/src/main/resources/META-INF/web-fragment.xml (rev 0)
+++ extensions/trunk/src/main/resources/META-INF/web-fragment.xml 2010-06-27 10:52:02 UTC (rev 6579)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-fragment version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-fragment_3_0.xsd">
+ <name>weldextensions</name>
+
+ <listener>
+ <listener-class>org.jboss.weld.extensions.resourceLoader.servlet.ResourceListener</listener-class>
+ </listener>
+
+</web-fragment>
\ No newline at end of file
14 years, 5 months
Weld SVN: r6578 - in extensions/trunk/src: main/java/org/jboss/weld/extensions/util and 2 other directories.
by weld-commits@lists.jboss.org
Author: swd847
Date: 2010-06-27 02:06:05 -0400 (Sun, 27 Jun 2010)
New Revision: 6578
Added:
extensions/trunk/src/test/java/org/jboss/weld/extensions/test/core/
extensions/trunk/src/test/java/org/jboss/weld/extensions/test/core/BorderCollie.java
extensions/trunk/src/test/java/org/jboss/weld/extensions/test/core/CoreTest.java
extensions/trunk/src/test/java/org/jboss/weld/extensions/test/core/Dog.java
extensions/trunk/src/test/java/org/jboss/weld/extensions/test/core/Greyhound.java
extensions/trunk/src/test/java/org/jboss/weld/extensions/test/core/RaceTrack.java
Modified:
extensions/trunk/src/main/java/org/jboss/weld/extensions/core/CoreExtension.java
extensions/trunk/src/main/java/org/jboss/weld/extensions/core/Exact.java
extensions/trunk/src/main/java/org/jboss/weld/extensions/util/Reflections.java
Log:
Changes to the way @Exact is implemented, and tests to make sure it works
Modified: extensions/trunk/src/main/java/org/jboss/weld/extensions/core/CoreExtension.java
===================================================================
--- extensions/trunk/src/main/java/org/jboss/weld/extensions/core/CoreExtension.java 2010-06-24 11:51:42 UTC (rev 6577)
+++ extensions/trunk/src/main/java/org/jboss/weld/extensions/core/CoreExtension.java 2010-06-27 06:06:05 UTC (rev 6578)
@@ -16,19 +16,18 @@
*/
package org.jboss.weld.extensions.core;
-import static org.jboss.weld.extensions.util.Reflections.getAnnotationsWithMetatype;
-import static org.jboss.weld.extensions.util.Reflections.getMemberType;
-
import java.lang.annotation.Annotation;
import java.lang.reflect.Member;
import java.util.ArrayList;
import java.util.Collection;
-import java.util.Set;
import javax.enterprise.event.Observes;
import javax.enterprise.inject.Produces;
import javax.enterprise.inject.spi.AfterBeanDiscovery;
import javax.enterprise.inject.spi.AnnotatedConstructor;
+import javax.enterprise.inject.spi.AnnotatedField;
+import javax.enterprise.inject.spi.AnnotatedMethod;
+import javax.enterprise.inject.spi.AnnotatedParameter;
import javax.enterprise.inject.spi.AnnotatedType;
import javax.enterprise.inject.spi.Bean;
import javax.enterprise.inject.spi.BeanManager;
@@ -36,15 +35,11 @@
import javax.enterprise.inject.spi.ProcessAnnotatedType;
import javax.inject.Inject;
import javax.inject.Named;
-import javax.inject.Qualifier;
import org.jboss.weld.extensions.annotated.AnnotatedTypeBuilder;
import org.jboss.weld.extensions.annotated.AnnotationBuilder;
import org.jboss.weld.extensions.annotated.MemberAnnotationRedefiner;
-import org.jboss.weld.extensions.annotated.Parameter;
-import org.jboss.weld.extensions.annotated.ParameterAnnotationRedefiner;
import org.jboss.weld.extensions.bean.BeanBuilder;
-import org.jboss.weld.extensions.core.Exact.ExactLiteral;
/**
* Extension to install the "core" extensions. Core extensions are those that
@@ -74,7 +69,7 @@
return;
}
- AnnotatedTypeBuilder<X> builder = AnnotatedTypeBuilder.newInstance(pat.getAnnotatedType()).readAnnotationsFromUnderlyingType();
+ AnnotatedTypeBuilder<X> builder = AnnotatedTypeBuilder.newInstance(pat.getAnnotatedType()).mergeAnnotations(pat.getAnnotatedType(), true);
// support for @Named packages
Package pkg = pat.getAnnotatedType().getJavaClass().getPackage();
@@ -84,7 +79,6 @@
builder.redefineMembers(Named.class, new MemberAnnotationRedefiner<Named>()
{
-
public Named redefine(Named annotation, Member member, AnnotationBuilder annotations)
{
if (annotations.isAnnotationPresent(Produces.class))
@@ -111,45 +105,39 @@
}
// support for @Exact
- Set<Annotation> qualfiers = getAnnotationsWithMetatype(pat.getAnnotatedType().getAnnotations(), Qualifier.class);
- if (qualfiers.isEmpty() || (qualfiers.size() == 1 && qualfiers.iterator().next().annotationType() == Named.class))
+ // fields
+ for (AnnotatedField<? super X> f : pat.getAnnotatedType().getFields())
{
- builder.addToClass(DefaultLiteral.INSTANCE);
+ if (f.isAnnotationPresent(Exact.class))
+ {
+ Class<?> type = f.getAnnotation(Exact.class).value();
+ builder.overrideFieldType(f.getJavaMember(), type);
+ }
}
- builder.addToClass(new Exact.ExactLiteral(pat.getAnnotatedType().getJavaClass()));
- builder.redefineMembers(Exact.class, new MemberAnnotationRedefiner<Exact>()
+ // method parameters
+ for (AnnotatedMethod<? super X> m : pat.getAnnotatedType().getMethods())
{
-
- public Exact redefine(Exact annotation, Member annotated, AnnotationBuilder annotations)
+ for (AnnotatedParameter<? super X> p : m.getParameters())
{
- if (annotation.value() == void.class)
+ if (p.isAnnotationPresent(Exact.class))
{
- return new ExactLiteral(getMemberType(annotated));
+ Class<?> type = p.getAnnotation(Exact.class).value();
+ builder.overrideMethodParameterType(m.getJavaMember(), type, p.getPosition());
}
- else
- {
- return annotation;
- }
}
- });
-
- builder.redefineMemberParameters(Exact.class, new ParameterAnnotationRedefiner<Exact>()
+ }
+ // constructor parameters
+ for (AnnotatedConstructor<X> c : pat.getAnnotatedType().getConstructors())
{
-
- public Exact redefine(Exact annotation, Parameter annotated, AnnotationBuilder annotations)
+ for (AnnotatedParameter<? super X> p : c.getParameters())
{
- if (annotation.value() == void.class)
+ if (p.isAnnotationPresent(Exact.class))
{
- return new ExactLiteral(getMemberType(annotated.getDeclaringMember()));
+ Class<?> type = p.getAnnotation(Exact.class).value();
+ builder.overrideConstructorParameterType(c.getJavaMember(), type, p.getPosition());
}
- else
- {
- return annotation;
- }
}
-
- });
-
+ }
pat.setAnnotatedType(builder.create());
// support for @Constructs
@@ -157,7 +145,7 @@
{
if (constructor.isAnnotationPresent(Constructs.class))
{
- AnnotatedTypeBuilder<X> annotatedTypeBuilder = AnnotatedTypeBuilder.newInstance(pat.getAnnotatedType()).readAnnotationsFromUnderlyingType();
+ AnnotatedTypeBuilder<X> annotatedTypeBuilder = AnnotatedTypeBuilder.newInstance(pat.getAnnotatedType()).mergeAnnotations(pat.getAnnotatedType(), true);
// remove class-level @Named annotation
annotatedTypeBuilder.removeFromClass(Named.class);
// remove bean constructors annotated @Inject
Modified: extensions/trunk/src/main/java/org/jboss/weld/extensions/core/Exact.java
===================================================================
--- extensions/trunk/src/main/java/org/jboss/weld/extensions/core/Exact.java 2010-06-24 11:51:42 UTC (rev 6577)
+++ extensions/trunk/src/main/java/org/jboss/weld/extensions/core/Exact.java 2010-06-27 06:06:05 UTC (rev 6578)
@@ -27,7 +27,6 @@
import java.lang.annotation.Target;
import javax.enterprise.util.AnnotationLiteral;
-import javax.inject.Qualifier;
/**
* An injection point qualifier that may be used to select the exact bean to be
@@ -39,7 +38,6 @@
@Retention(RUNTIME)
@Target( { METHOD, TYPE, FIELD, PARAMETER })
@Documented
-@Qualifier
public @interface Exact
{
Class<?> value() default void.class;
Modified: extensions/trunk/src/main/java/org/jboss/weld/extensions/util/Reflections.java
===================================================================
--- extensions/trunk/src/main/java/org/jboss/weld/extensions/util/Reflections.java 2010-06-24 11:51:42 UTC (rev 6577)
+++ extensions/trunk/src/main/java/org/jboss/weld/extensions/util/Reflections.java 2010-06-27 06:06:05 UTC (rev 6578)
@@ -26,6 +26,7 @@
import javax.enterprise.inject.spi.AnnotatedField;
import javax.enterprise.inject.spi.AnnotatedType;
+import javax.enterprise.inject.spi.BeanManager;
/**
* class that provides a way of retrieving all methods and fields from a class
@@ -96,7 +97,20 @@
return set;
}
+ public static Set<Annotation> getQualifiers(Set<Annotation> annotations, BeanManager beanManager)
+ {
+ Set<Annotation> set = new HashSet<Annotation>();
+ for (Annotation annotation : annotations)
+ {
+ if (beanManager.isQualifier(annotation.annotationType()))
+ {
+ set.add(annotation);
+ }
+ }
+ return set;
+ }
+
public static boolean methodExists(Class<?> parent, String name)
{
Class<?> p = parent;
Added: extensions/trunk/src/test/java/org/jboss/weld/extensions/test/core/BorderCollie.java
===================================================================
--- extensions/trunk/src/test/java/org/jboss/weld/extensions/test/core/BorderCollie.java (rev 0)
+++ extensions/trunk/src/test/java/org/jboss/weld/extensions/test/core/BorderCollie.java 2010-06-27 06:06:05 UTC (rev 6578)
@@ -0,0 +1,22 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., 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.weld.extensions.test.core;
+
+public class BorderCollie extends Dog
+{
+
+}
Added: extensions/trunk/src/test/java/org/jboss/weld/extensions/test/core/CoreTest.java
===================================================================
--- extensions/trunk/src/test/java/org/jboss/weld/extensions/test/core/CoreTest.java (rev 0)
+++ extensions/trunk/src/test/java/org/jboss/weld/extensions/test/core/CoreTest.java 2010-06-27 06:06:05 UTC (rev 6578)
@@ -0,0 +1,38 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., 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.weld.extensions.test.core;
+
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.weld.test.AbstractWeldTest;
+import org.testng.annotations.Test;
+
+/**
+ * @author Stuart Douglas
+ *
+ */
+@Artifact
+public class CoreTest extends AbstractWeldTest
+{
+ @Test
+ public void testExact()
+ {
+ // TODO: This needs to be split up into lots of little tests
+ RaceTrack bean = getReference(RaceTrack.class);
+ assert bean.dog instanceof Greyhound;
+ }
+
+}
Added: extensions/trunk/src/test/java/org/jboss/weld/extensions/test/core/Dog.java
===================================================================
--- extensions/trunk/src/test/java/org/jboss/weld/extensions/test/core/Dog.java (rev 0)
+++ extensions/trunk/src/test/java/org/jboss/weld/extensions/test/core/Dog.java 2010-06-27 06:06:05 UTC (rev 6578)
@@ -0,0 +1,22 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., 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.weld.extensions.test.core;
+
+public class Dog
+{
+
+}
Added: extensions/trunk/src/test/java/org/jboss/weld/extensions/test/core/Greyhound.java
===================================================================
--- extensions/trunk/src/test/java/org/jboss/weld/extensions/test/core/Greyhound.java (rev 0)
+++ extensions/trunk/src/test/java/org/jboss/weld/extensions/test/core/Greyhound.java 2010-06-27 06:06:05 UTC (rev 6578)
@@ -0,0 +1,22 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., 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.weld.extensions.test.core;
+
+public class Greyhound extends Dog
+{
+
+}
Added: extensions/trunk/src/test/java/org/jboss/weld/extensions/test/core/RaceTrack.java
===================================================================
--- extensions/trunk/src/test/java/org/jboss/weld/extensions/test/core/RaceTrack.java (rev 0)
+++ extensions/trunk/src/test/java/org/jboss/weld/extensions/test/core/RaceTrack.java 2010-06-27 06:06:05 UTC (rev 6578)
@@ -0,0 +1,28 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., 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.weld.extensions.test.core;
+
+import javax.inject.Inject;
+
+import org.jboss.weld.extensions.core.Exact;
+
+public class RaceTrack
+{
+ @Inject
+ @Exact(Greyhound.class)
+ Dog dog;
+}
14 years, 5 months
Weld SVN: r6577 - in core/trunk/tests/src/test: java/org/jboss/weld/tests/extensions/injectionTarget and 2 other directories.
by weld-commits@lists.jboss.org
Author: jharting
Date: 2010-06-24 07:51:42 -0400 (Thu, 24 Jun 2010)
New Revision: 6577
Added:
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/injectionTarget/
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/injectionTarget/Aircraft.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/injectionTarget/AircraftDecorator.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/injectionTarget/InjectionTargetExtension.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/injectionTarget/InjectionTargetTest.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/injectionTarget/InjectionTargetWrapper.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/injectionTarget/Secured.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/injectionTarget/SecurityInterceptor.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/injectionTarget/Spitfire.java
core/trunk/tests/src/test/resources/org/jboss/weld/tests/extensions/injectionTarget/
core/trunk/tests/src/test/resources/org/jboss/weld/tests/extensions/injectionTarget/beans.xml
core/trunk/tests/src/test/resources/org/jboss/weld/tests/extensions/injectionTarget/javax.enterprise.inject.spi.Extension
Log:
Added tests for WELD-557
Added: core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/injectionTarget/Aircraft.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/injectionTarget/Aircraft.java (rev 0)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/injectionTarget/Aircraft.java 2010-06-24 11:51:42 UTC (rev 6577)
@@ -0,0 +1,22 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., 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.weld.tests.extensions.injectionTarget;
+
+interface Aircraft
+{
+ boolean isFlying();
+}
Added: core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/injectionTarget/AircraftDecorator.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/injectionTarget/AircraftDecorator.java (rev 0)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/injectionTarget/AircraftDecorator.java 2010-06-24 11:51:42 UTC (rev 6577)
@@ -0,0 +1,34 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., 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.weld.tests.extensions.injectionTarget;
+
+import javax.decorator.Decorator;
+import javax.decorator.Delegate;
+import javax.inject.Inject;
+
+@Decorator
+class AircraftDecorator implements Aircraft
+{
+ @Inject @Delegate
+ private Aircraft delegate;
+
+ public boolean isFlying()
+ {
+ return ! delegate.isFlying();
+ }
+
+}
Added: core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/injectionTarget/InjectionTargetExtension.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/injectionTarget/InjectionTargetExtension.java (rev 0)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/injectionTarget/InjectionTargetExtension.java 2010-06-24 11:51:42 UTC (rev 6577)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., 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.weld.tests.extensions.injectionTarget;
+
+import javax.enterprise.event.Observes;
+import javax.enterprise.inject.spi.Extension;
+import javax.enterprise.inject.spi.InjectionTarget;
+import javax.enterprise.inject.spi.ProcessInjectionTarget;
+
+public class InjectionTargetExtension implements Extension
+{
+ public void foo(@Observes ProcessInjectionTarget<Spitfire> event)
+ {
+ InjectionTarget<Spitfire> it = event.getInjectionTarget();
+ event.setInjectionTarget(decorate(it));
+ }
+
+ private <T> InjectionTarget<T> decorate(InjectionTarget<T> delegate)
+ {
+ return new InjectionTargetWrapper<T>(delegate);
+ }
+}
Added: core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/injectionTarget/InjectionTargetTest.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/injectionTarget/InjectionTargetTest.java (rev 0)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/injectionTarget/InjectionTargetTest.java 2010-06-24 11:51:42 UTC (rev 6577)
@@ -0,0 +1,71 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., 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.weld.tests.extensions.injectionTarget;
+
+import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.inject.spi.Bean;
+
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.IntegrationTest;
+import org.jboss.testharness.impl.packaging.Packaging;
+import org.jboss.testharness.impl.packaging.PackagingType;
+import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
+import org.jboss.testharness.impl.packaging.jsr299.Extension;
+import org.jboss.weld.test.AbstractWeldTest;
+import org.testng.annotations.Test;
+
+@Artifact
+@IntegrationTest
+@BeansXml("beans.xml")
+(a)Packaging(PackagingType.EAR)
+@Extension("javax.enterprise.inject.spi.Extension")
+public class InjectionTargetTest extends AbstractWeldTest
+{
+ @Test(description="WELD-557")
+ public void testActualInstanceAndNotProxyPassedToInject()
+ {
+ InjectionTargetWrapper.clear();
+ Spitfire aircraft = getReference(Spitfire.class);
+ aircraft.isFlying();
+ assert aircraft.isTheSameInstance(InjectionTargetWrapper.injectInstance);
+ }
+
+ @Test(description="WELD-557")
+ public void testActualInstanceAndNotProxyPassedToPostConstruct()
+ {
+ InjectionTargetWrapper.clear();
+ Spitfire aircraft = getReference(Spitfire.class);
+ aircraft.isFlying();
+ assert aircraft.isTheSameInstance(InjectionTargetWrapper.postConstructInstance);
+ }
+
+ @Test(description="WELD-557")
+ public void testActualInstanceAndNotProxyPassedToPreDestroy()
+ {
+ // prepare instance
+ InjectionTargetWrapper.clear();
+ Bean<Spitfire> bean = getBean(Spitfire.class);
+ CreationalContext<Spitfire> ctx = getCurrentManager().createCreationalContext(bean);
+ Spitfire aircraft = (Spitfire) getCurrentManager().getReference(bean, Spitfire.class, ctx);
+ // invoke business method
+ aircraft.isFlying();
+ // destroy instance
+ bean.destroy(aircraft, ctx);
+
+ assert aircraft.isTheSameInstance(InjectionTargetWrapper.preDestroyInstance);
+ }
+}
Added: core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/injectionTarget/InjectionTargetWrapper.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/injectionTarget/InjectionTargetWrapper.java (rev 0)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/injectionTarget/InjectionTargetWrapper.java 2010-06-24 11:51:42 UTC (rev 6577)
@@ -0,0 +1,76 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., 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.weld.tests.extensions.injectionTarget;
+
+import java.util.Set;
+
+import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.inject.spi.InjectionPoint;
+import javax.enterprise.inject.spi.InjectionTarget;
+
+class InjectionTargetWrapper<T> implements InjectionTarget<T>
+{
+ private InjectionTarget<T> delegate;
+ public static Object injectInstance;
+ public static Object postConstructInstance;
+ public static Object preDestroyInstance;
+
+ public static void clear()
+ {
+ injectInstance = null;
+ postConstructInstance = null;
+ preDestroyInstance = null;
+ }
+
+ public InjectionTargetWrapper(InjectionTarget<T> delegate)
+ {
+ this.delegate = delegate;
+ }
+
+ public void inject(T instance, CreationalContext<T> ctx)
+ {
+ injectInstance = instance;
+ delegate.inject(instance, ctx);
+ }
+
+ public void postConstruct(T instance)
+ {
+ postConstructInstance = instance;
+ delegate.postConstruct(instance);
+ }
+
+ public void preDestroy(T instance)
+ {
+ preDestroyInstance = instance;
+ delegate.preDestroy(instance);
+ }
+
+ public void dispose(T instance)
+ {
+ delegate.dispose(instance);
+ }
+
+ public Set<InjectionPoint> getInjectionPoints()
+ {
+ return delegate.getInjectionPoints();
+ }
+
+ public T produce(CreationalContext<T> ctx)
+ {
+ return delegate.produce(ctx);
+ }
+}
Added: core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/injectionTarget/Secured.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/injectionTarget/Secured.java (rev 0)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/injectionTarget/Secured.java 2010-06-24 11:51:42 UTC (rev 6577)
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., 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.weld.tests.extensions.injectionTarget;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Documented;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import javax.interceptor.InterceptorBinding;
+
+@InterceptorBinding
+@Retention(RUNTIME)
+(a)Target({ElementType.TYPE, ElementType.METHOD})
+@Documented
+@interface Secured
+{
+}
Added: core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/injectionTarget/SecurityInterceptor.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/injectionTarget/SecurityInterceptor.java (rev 0)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/injectionTarget/SecurityInterceptor.java 2010-06-24 11:51:42 UTC (rev 6577)
@@ -0,0 +1,32 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., 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.weld.tests.extensions.injectionTarget;
+
+import javax.interceptor.AroundInvoke;
+import javax.interceptor.Interceptor;
+import javax.interceptor.InvocationContext;
+
+@Interceptor
+@Secured
+class SecurityInterceptor
+{
+ @AroundInvoke
+ public Object intercept(InvocationContext ctx) throws Exception
+ {
+ return ! (Boolean) ctx.proceed();
+ }
+}
Added: core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/injectionTarget/Spitfire.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/injectionTarget/Spitfire.java (rev 0)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/injectionTarget/Spitfire.java 2010-06-24 11:51:42 UTC (rev 6577)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., 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.weld.tests.extensions.injectionTarget;
+
+import javax.enterprise.context.RequestScoped;
+
+@RequestScoped
+class Spitfire implements Aircraft
+{
+ @Secured
+ public boolean interceptedMethod()
+ {
+ return false;
+ }
+
+ public boolean isFlying()
+ {
+ return false;
+ }
+
+ /*
+ * Cannot use equals() since behavior of all Object class methods
+ * except for toString() is not defined on the client proxy
+ */
+ public boolean isTheSameInstance(Object object)
+ {
+ return this == object;
+ }
+}
Added: core/trunk/tests/src/test/resources/org/jboss/weld/tests/extensions/injectionTarget/beans.xml
===================================================================
--- core/trunk/tests/src/test/resources/org/jboss/weld/tests/extensions/injectionTarget/beans.xml (rev 0)
+++ core/trunk/tests/src/test/resources/org/jboss/weld/tests/extensions/injectionTarget/beans.xml 2010-06-24 11:51:42 UTC (rev 6577)
@@ -0,0 +1,8 @@
+<beans>
+ <interceptors>
+ <class>org.jboss.weld.tests.extensions.injectionTarget.SecurityInterceptor</class>
+ </interceptors>
+ <decorators>
+ <class>org.jboss.weld.tests.extensions.injectionTarget.AircraftDecorator</class>
+ </decorators>
+</beans>
Added: core/trunk/tests/src/test/resources/org/jboss/weld/tests/extensions/injectionTarget/javax.enterprise.inject.spi.Extension
===================================================================
--- core/trunk/tests/src/test/resources/org/jboss/weld/tests/extensions/injectionTarget/javax.enterprise.inject.spi.Extension (rev 0)
+++ core/trunk/tests/src/test/resources/org/jboss/weld/tests/extensions/injectionTarget/javax.enterprise.inject.spi.Extension 2010-06-24 11:51:42 UTC (rev 6577)
@@ -0,0 +1 @@
+org.jboss.weld.tests.extensions.injectionTarget.InjectionTargetExtension
14 years, 5 months
Weld SVN: r6576 - extensions/trunk/src/main/java/org/jboss/weld/extensions/util/properties/query.
by weld-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2010-06-24 00:17:18 -0400 (Thu, 24 Jun 2010)
New Revision: 6576
Modified:
extensions/trunk/src/main/java/org/jboss/weld/extensions/util/properties/query/PropertyQuery.java
Log:
restrict query to accessor methods
Modified: extensions/trunk/src/main/java/org/jboss/weld/extensions/util/properties/query/PropertyQuery.java
===================================================================
--- extensions/trunk/src/main/java/org/jboss/weld/extensions/util/properties/query/PropertyQuery.java 2010-06-24 01:25:21 UTC (rev 6575)
+++ extensions/trunk/src/main/java/org/jboss/weld/extensions/util/properties/query/PropertyQuery.java 2010-06-24 04:17:18 UTC (rev 6576)
@@ -43,15 +43,18 @@
{
List<Property<V>> results = new ArrayList<Property<V>>();
- // First check public methods (we ignore private methods)
+ // First check public accessor methods (we ignore private methods)
for (Method method : targetClass.getMethods())
{
+ if (!(method.getName().startsWith("is") || method.getName().startsWith("get"))) break;
+
boolean match = true;
for (PropertyCriteria c : criteria)
{
if (!c.methodMatches(method))
{
match = false;
+ break;
}
}
if (match) results.add(Properties.<V>createProperty(method));
@@ -69,6 +72,7 @@
if (!c.fieldMatches(field))
{
match = false;
+ break;
}
}
Property<V> prop = Properties.<V>createProperty(field);
14 years, 5 months
Weld SVN: r6575 - extensions/trunk/src/main/java/org/jboss/weld/extensions/util/properties/query.
by weld-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2010-06-23 21:25:21 -0400 (Wed, 23 Jun 2010)
New Revision: 6575
Modified:
extensions/trunk/src/main/java/org/jboss/weld/extensions/util/properties/query/PropertyQuery.java
Log:
fix query logic, exclude duplicate properties from result
Modified: extensions/trunk/src/main/java/org/jboss/weld/extensions/util/properties/query/PropertyQuery.java
===================================================================
--- extensions/trunk/src/main/java/org/jboss/weld/extensions/util/properties/query/PropertyQuery.java 2010-06-21 12:43:30 UTC (rev 6574)
+++ extensions/trunk/src/main/java/org/jboss/weld/extensions/util/properties/query/PropertyQuery.java 2010-06-24 01:25:21 UTC (rev 6575)
@@ -43,36 +43,52 @@
{
List<Property<V>> results = new ArrayList<Property<V>>();
- Class<?> cls = targetClass;
+ // First check public methods (we ignore private methods)
+ for (Method method : targetClass.getMethods())
+ {
+ boolean match = true;
+ for (PropertyCriteria c : criteria)
+ {
+ if (!c.methodMatches(method))
+ {
+ match = false;
+ }
+ }
+ if (match) results.add(Properties.<V>createProperty(method));
+ }
+
+ Class<?> cls = targetClass;
while (!cls.equals(Object.class))
{
- // First check declared fields
+ // Now check declared fields
for (Field field : cls.getDeclaredFields())
{
+ boolean match = true;
for (PropertyCriteria c : criteria)
{
- if (c.fieldMatches(field))
+ if (!c.fieldMatches(field))
{
- results.add(Properties.<V>createProperty(field));
+ match = false;
}
}
+ Property<V> prop = Properties.<V>createProperty(field);
+
+ if (match && !resultsContainsProperty(results, prop.getName())) results.add(prop);
}
cls = cls.getSuperclass();
}
-
- // Then check public methods (we ignore private methods)
- for (Method method : targetClass.getMethods())
- {
- for (PropertyCriteria c : criteria)
- {
- if (c.methodMatches(method))
- {
- results.add(Properties.<V>createProperty(method));
- }
- }
- }
+
return results;
}
+
+ private boolean resultsContainsProperty(List<Property<V>> results, String propertyName)
+ {
+ for (Property<V> p : results)
+ {
+ if (propertyName.equals(p.getName())) return true;
+ }
+ return false;
+ }
}
14 years, 5 months
Weld SVN: r6574 - archetypes/trunk/javaee6-webapp-src/target.
by weld-commits@lists.jboss.org
Author: sboscarine
Date: 2010-06-21 08:43:30 -0400 (Mon, 21 Jun 2010)
New Revision: 6574
Modified:
archetypes/trunk/javaee6-webapp-src/target/
Log:
Updated svn:ignore
Property changes on: archetypes/trunk/javaee6-webapp-src/target
___________________________________________________________________
Name: svn:ignore
- generated-*
+ generated-*
jboss-javaee6-webapp-src.war
jboss-javaee6-webapp-src
maven-archiver
war
14 years, 5 months