Weld SVN: r5254 - in core/trunk: impl/src/main/java/org/jboss/weld/bean/builtin/ee and 8 other directories.
by weld-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-12-09 12:10:51 -0500 (Wed, 09 Dec 2009)
New Revision: 5254
Added:
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/resource/
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/resource/Baz.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/resource/FooDB.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/resource/ResourceCircularDependencyTest.java
core/trunk/tests/src/test/resources/org/jboss/weld/tests/resolution/
core/trunk/tests/src/test/resources/org/jboss/weld/tests/resolution/circular/
core/trunk/tests/src/test/resources/org/jboss/weld/tests/resolution/circular/resource/
core/trunk/tests/src/test/resources/org/jboss/weld/tests/resolution/circular/resource/persistence.xml
Modified:
core/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractReceiverBean.java
core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/ee/EEResourceProducerField.java
core/trunk/impl/src/main/java/org/jboss/weld/context/CreationalContextImpl.java
core/trunk/jboss-as/pom.xml
Log:
WELD-310
Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractReceiverBean.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractReceiverBean.java 2009-12-09 16:07:40 UTC (rev 5253)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractReceiverBean.java 2009-12-09 17:10:51 UTC (rev 5254)
@@ -62,7 +62,7 @@
*/
protected Object getReceiver(CreationalContext<?> creationalContext)
{
- // This is a bit dangerous, as it means that producer methods can end of
+ // This is a bit dangerous, as it means that producer methods can end up
// executing on partially constructed instances. Also, it's not required
// by the spec...
if (getAnnotatedItem().isStatic())
Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/ee/EEResourceProducerField.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/ee/EEResourceProducerField.java 2009-12-09 16:07:40 UTC (rev 5253)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/ee/EEResourceProducerField.java 2009-12-09 17:10:51 UTC (rev 5254)
@@ -36,7 +36,6 @@
import org.jboss.weld.bootstrap.BeanDeployerEnvironment;
import org.jboss.weld.ejb.EJBApiAbstraction;
import org.jboss.weld.introspector.WeldField;
-import org.jboss.weld.logging.messages.BeanMessage;
import org.jboss.weld.persistence.PersistenceApiAbstraction;
import org.jboss.weld.serialization.spi.ContextualStore;
import org.jboss.weld.util.Proxies;
@@ -59,11 +58,13 @@
private final String beanId;
private transient T instance;
+ private final CreationalContext<T> creationalContext;
- public EEResourceCallable(BeanManagerImpl beanManager, ProducerField<?, T> producerField/*, CreationalContext<T> creationalContext*/)
+ public EEResourceCallable(BeanManagerImpl beanManager, ProducerField<?, T> producerField, CreationalContext<T> creationalContext)
{
super(beanManager);
this.beanId = producerField.getId();
+ this.creationalContext = creationalContext;
}
public T call() throws Exception
@@ -76,7 +77,7 @@
@SuppressWarnings("unchecked")
EEResourceProducerField<?, T> bean = (EEResourceProducerField<?, T>) contextual;
- this.instance = bean.createUnderlying(getBeanManager().createCreationalContext(bean));
+ this.instance = bean.createUnderlying(creationalContext);
}
else
{
@@ -106,31 +107,10 @@
{
return new EEResourceProducerField<X, T>(field, declaringBean, manager);
}
-
- private final T proxy;
protected EEResourceProducerField(WeldField<T, X> field, AbstractClassBean<X> declaringBean, BeanManagerImpl manager)
{
super(field, declaringBean, manager);
- try
- {
- if (Reflections.isFinal(field.getJavaClass()) || Serializable.class.isAssignableFrom(field.getJavaClass()))
- {
- this.proxy = null;
- }
- else
- {
- this.proxy = Proxies.<T>createProxy(new CallableMethodHandler(new EEResourceCallable<T>(getManager(), this)), TypeInfo.of(getTypes()).add(Serializable.class));
- }
- }
- catch (InstantiationException e)
- {
- throw new WeldException(PROXY_INSTANTIATION_FAILED, e, this);
- }
- catch (IllegalAccessException e)
- {
- throw new WeldException(PROXY_INSTANTIATION_BEAN_ACCESS_FAILED, e, this);
- }
}
@Override
@@ -157,14 +137,25 @@
@Override
public T create(CreationalContext<T> creationalContext)
{
- if (proxy == null)
+ try
{
- return createUnderlying(creationalContext);
+ if (Reflections.isFinal(getAnnotatedItem().getJavaClass()) || Serializable.class.isAssignableFrom(getAnnotatedItem().getJavaClass()))
+ {
+ return createUnderlying(creationalContext);
+ }
+ else
+ {
+ return Proxies.<T>createProxy(new CallableMethodHandler(new EEResourceCallable<T>(getManager(), this, creationalContext)), TypeInfo.of(getTypes()).add(Serializable.class));
+ }
}
- else
+ catch (InstantiationException e)
{
- return proxy;
+ throw new WeldException(PROXY_INSTANTIATION_FAILED, e, this);
}
+ catch (IllegalAccessException e)
+ {
+ throw new WeldException(PROXY_INSTANTIATION_BEAN_ACCESS_FAILED, e, this);
+ }
}
/**
Modified: core/trunk/impl/src/main/java/org/jboss/weld/context/CreationalContextImpl.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/context/CreationalContextImpl.java 2009-12-09 16:07:40 UTC (rev 5253)
+++ core/trunk/impl/src/main/java/org/jboss/weld/context/CreationalContextImpl.java 2009-12-09 17:10:51 UTC (rev 5254)
@@ -54,19 +54,19 @@
incompleteInstances.put(contextual, incompleteInstance);
}
- public <S> WeldCreationalContext<S> getCreationalContext(Contextual<S> Contextual)
+ public <S> WeldCreationalContext<S> getCreationalContext(Contextual<S> contextual)
{
- return new CreationalContextImpl<S>(Contextual, new HashMap<Contextual<?>, Object>(incompleteInstances), dependentInstancesStore);
+ return new CreationalContextImpl<S>(contextual, incompleteInstances == null ? new HashMap<Contextual<?>, Object>() : new HashMap<Contextual<?>, Object>(incompleteInstances), dependentInstancesStore);
}
public <S> S getIncompleteInstance(Contextual<S> bean)
{
- return (S) incompleteInstances.get(bean);
+ return incompleteInstances == null ? null : (S) incompleteInstances.get(bean);
}
public boolean containsIncompleteInstance(Contextual<?> bean)
{
- return incompleteInstances.containsKey(bean);
+ return incompleteInstances == null ? false : incompleteInstances.containsKey(bean);
}
public DependentInstancesStore getParentDependentInstancesStore()
@@ -77,7 +77,10 @@
public void release()
{
dependentInstancesStore.destroyDependentInstances();
- incompleteInstances.clear();
+ if (incompleteInstances != null)
+ {
+ incompleteInstances.clear();
+ }
}
}
Modified: core/trunk/jboss-as/pom.xml
===================================================================
--- core/trunk/jboss-as/pom.xml 2009-12-09 16:07:40 UTC (rev 5253)
+++ core/trunk/jboss-as/pom.xml 2009-12-09 17:10:51 UTC (rev 5254)
@@ -13,7 +13,7 @@
<relativePath>../parent/pom.xml</relativePath>
</parent>
- <name>Weld JBoss AS Updater</name>
+ <name>JBoss AS Updater</name>
<!-- Minimal metadata -->
<description>A script to update Weld in JBoss AS</description>
@@ -57,7 +57,7 @@
</goals>
<configuration>
<outputDirectory>${project.build.directory}/dependency/lib</outputDirectory>
- <overwriteSnapshots>true</overwriteSnapshots>
+ <overWriteSnapshots>true</overWriteSnapshots>
<stripVersion>true</stripVersion>
<includeArtifactIds>cdi-api,weld-api,weld-core,weld-jboss-int-deployer-assembly</includeArtifactIds>
</configuration>
@@ -78,7 +78,7 @@
<tasks>
<property file="${project.directory}/local.build.properties" />
<property file="${project.directory}/build.properties" />
- <property name="jboss.home" value="${env.JBOSS_HOME}" />
+ <property name="jboss.home" value="${env.JBOSS_HOME}" />s
<delete
dir="${jboss.home}/server/default/deployers/weld.deployer"
failonerror="false" />
Added: core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/resource/Baz.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/resource/Baz.java (rev 0)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/resource/Baz.java 2009-12-09 17:10:51 UTC (rev 5254)
@@ -0,0 +1,19 @@
+package org.jboss.weld.tests.resolution.circular.resource;
+
+import javax.enterprise.inject.Produces;
+import javax.inject.Inject;
+import javax.persistence.EntityManager;
+import javax.persistence.PersistenceContext;
+
+public class Baz
+{
+
+ @Produces @FooDB @PersistenceContext private EntityManager db;
+ @Inject @FooDB EntityManager fooDb;
+
+ public EntityManager getFooDb()
+ {
+ return fooDb;
+ }
+
+}
Property changes on: core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/resource/Baz.java
___________________________________________________________________
Name: svn:eol-style
+ native
Added: core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/resource/FooDB.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/resource/FooDB.java (rev 0)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/resource/FooDB.java 2009-12-09 17:10:51 UTC (rev 5254)
@@ -0,0 +1,20 @@
+package org.jboss.weld.tests.resolution.circular.resource;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+@Qualifier
+(a)Retention(RetentionPolicy.RUNTIME)
+@Target({FIELD, METHOD, TYPE, PARAMETER})
+public @interface FooDB
+{
+
+}
Property changes on: core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/resource/FooDB.java
___________________________________________________________________
Name: svn:eol-style
+ native
Added: core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/resource/ResourceCircularDependencyTest.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/resource/ResourceCircularDependencyTest.java (rev 0)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/resource/ResourceCircularDependencyTest.java 2009-12-09 17:10:51 UTC (rev 5254)
@@ -0,0 +1,25 @@
+package org.jboss.weld.tests.resolution.circular.resource;
+
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.IntegrationTest;
+import org.jboss.testharness.impl.packaging.Resource;
+import org.jboss.testharness.impl.packaging.Resources;
+import org.jboss.weld.test.AbstractWeldTest;
+import org.testng.annotations.Test;
+
+@Artifact
+@IntegrationTest
+@Resources({
+ @Resource(source="persistence.xml", destination="WEB-INF/classes/META-INF/persistence.xml")
+})
+public class ResourceCircularDependencyTest extends AbstractWeldTest
+{
+
+ @Test
+ public void testResourceProducerField() throws Exception
+ {
+ assert getCurrentManager().getInstanceByType(Baz.class).getFooDb().isOpen();
+ assert true;
+ }
+
+}
Property changes on: core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/resource/ResourceCircularDependencyTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Added: core/trunk/tests/src/test/resources/org/jboss/weld/tests/resolution/circular/resource/persistence.xml
===================================================================
--- core/trunk/tests/src/test/resources/org/jboss/weld/tests/resolution/circular/resource/persistence.xml (rev 0)
+++ core/trunk/tests/src/test/resources/org/jboss/weld/tests/resolution/circular/resource/persistence.xml 2009-12-09 17:10:51 UTC (rev 5254)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<persistence xmlns="http://java.sun.com/xml/ns/persistence"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
+ version="1.0">
+ <persistence-unit name="test">
+ <jta-data-source>java:/DefaultDS</jta-data-source>
+ </persistence-unit>
+</persistence>
14 years, 11 months
Weld SVN: r5253 - in core/trunk: jboss-as and 1 other directory.
by weld-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-12-09 11:07:40 -0500 (Wed, 09 Dec 2009)
New Revision: 5253
Added:
core/trunk/jboss-as/pom.xml
Removed:
core/trunk/lib/
Modified:
core/trunk/jboss-as/build.properties
core/trunk/jboss-as/build.xml
core/trunk/pom.xml
Log:
switch to using maven for jboss-as update
Modified: core/trunk/jboss-as/build.properties
===================================================================
--- core/trunk/jboss-as/build.properties 2009-12-09 14:40:47 UTC (rev 5252)
+++ core/trunk/jboss-as/build.properties 2009-12-09 16:07:40 UTC (rev 5253)
@@ -1,5 +1,5 @@
# Container a number of properties associated with installing Weld into JBoss AS and running the TCK in JBoss AS
-jboss.home=/Applications/jboss-6.0.0.M1
+#jboss.home=/Applications/jboss-6.0.0.M1
org.jboss.testharness.container.javaOpts=-Xms128m -Xmx512m -XX:MaxPermSize=192m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000
# time to allow before attempting to restart JBoss AS
Modified: core/trunk/jboss-as/build.xml
===================================================================
--- core/trunk/jboss-as/build.xml 2009-12-09 14:40:47 UTC (rev 5252)
+++ core/trunk/jboss-as/build.xml 2009-12-09 16:07:40 UTC (rev 5253)
@@ -1,171 +1,8 @@
<?xml version="1.0"?>
-<project name="JBoss5DeployerInstall" default="update" basedir="." xmlns:artifact="urn:maven-artifact-ant">
+<project name="JBoss5DeployerInstall" default="update" basedir=".">
- <path id="maven-ant-tasks.classpath" path="../lib/maven-ant-tasks.jar" />
- <typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="urn:maven-artifact-ant" classpathref="maven-ant-tasks.classpath" />
-
- <property name="maven.dir" location="${basedir}/lib/maven" />
-
- <property file="local.build.properties" />
- <property file="build.properties" />
-
- <target name="clean" description="Clean up after the JBoss updater">
- <delete dir="target" failonerror="false" />
+ <target name="update" description="Update JBoss 5.x or 6.x for Weld">
+ <fail message="Use mvn -Pupdate-jboss-as"/>
</target>
- <target name="update" depends="install-weld.deployer, install-javassist-update" description="Update JBoss 5.x or 6.x for Weld" />
-
- <target name="install-weld.deployer">
- <echo message="Installing Weld ${weld.version} to ${jboss.home}" />
- <fail unless="jboss.home" message="Please pass in -Djboss.home=..." />
-
- <delete dir="${jboss.home}/server/default/deployers/weld.deployer" failonerror="false" />
- <delete dir="${jboss.home}/server/default/deployers/webbeans.deployer" failonerror="false" />
- <delete dir="target" failonerror="false" />
-
- <artifact:dependencies filesetId="weld.deployer.fileset" versionsId="weld.deployer.versions">
- <dependency groupId="org.jboss.weld.integration" artifactId="weld-jboss-int-deployer-assembly" version="${weld-deployer.version}" type="zip" />
- <dependency groupId="org.jboss.weld" artifactId="weld-core" version="${weld.version}" />
- <remoteRepository id="repository.jboss.org" url="http://repository.jboss.org/maven2" />
- <remoteRepository id="snapshots.jboss.org" url="http://snapshots.jboss.org/maven2" />
- </artifact:dependencies>
-
- <mkdir dir="target/dependency/lib" />
- <copy todir="target/dependency/lib">
- <fileset refid="weld.deployer.fileset" />
- <chainedmapper>
- <flattenmapper />
- <mapper classpathref="maven-ant-tasks.classpath" classname="org.apache.maven.artifact.ant.VersionMapper" from="${weld.deployer.versions}" to="flatten" />
- </chainedmapper>
- </copy>
-
- <unzip dest="target" src="target/dependency/lib/weld-jboss-int-deployer-assembly.zip" />
-
- <copy todir="target/weld.deployer/lib-int/" overwrite="true">
- <fileset dir="target/dependency/lib">
- <include name="weld-core.jar" />
- </fileset>
- </copy>
-
- <copy todir="${jboss.home}/client" overwrite="true">
- <fileset dir="target/dependency/lib">
- <include name="weld-api.jar" />
- <include name="cdi-api.jar" />
- </fileset>
- </copy>
- <copy todir="${jboss.home}/common/lib" overwrite="true">
- <fileset dir="target/dependency/lib">
- <include name="weld-api.jar" />
- <include name="cdi-api.jar" />
- </fileset>
- </copy>
-
-
- <delete dir="target/dependency" />
-
- <copy todir="${jboss.home}/server/default/deployers/weld.deployer">
- <fileset dir="target/weld.deployer">
- <include name="**/*" />
- </fileset>
- </copy>
-
-
- </target>
-
- <target name="install-javassist-update">
- <echo message="Upgrading Javassist to ${javassist.version} for ${jboss.home}" />
- <fail unless="jboss.home" message="Please pass in -Djboss.home=..." />
-
- <artifact:dependencies filesetId="javassist.fileset" versionsId="javassist.versions">
- <dependency groupId="javassist" artifactId="javassist" version="${javassist.version}" />
- <remoteRepository id="repository.jboss.org" url="http://repository.jboss.org/maven2" />
- <remoteRepository id="snapshots.jboss.org" url="http://snapshots.jboss.org/maven2" />
- </artifact:dependencies>
-
- <mkdir dir="target/dependency/lib" />
- <copy todir="target/dependency/lib">
- <fileset refid="javassist.fileset" />
- <chainedmapper>
- <flattenmapper />
- <mapper classpathref="maven-ant-tasks.classpath" classname="org.apache.maven.artifact.ant.VersionMapper" from="${javassist.versions}" to="flatten" />
- </chainedmapper>
- </copy>
-
- <copy todir="${jboss.home}/lib">
- <fileset dir="target/dependency/lib">
- <include name="javassist.jar" />
- </fileset>
- </copy>
- </target>
-
- <target name="install-validation-update">
- <echo message="Upgrading Bean Validation API to ${validation.version} for ${jboss.home}" />
- <fail unless="jboss.home" message="Please pass in -Djboss.home=..." />
-
- <artifact:dependencies filesetId="validation.fileset" versionsId="validation.versions">
- <dependency groupId="javax.validation" artifactId="validation-api" version="${validation.version}" />
- <remoteRepository id="repository.jboss.org" url="http://repository.jboss.org/maven2" />
- <remoteRepository id="snapshots.jboss.org" url="http://snapshots.jboss.org/maven2" />
- </artifact:dependencies>
-
- <mkdir dir="target/dependency/lib" />
- <copy todir="target/dependency/lib">
- <fileset refid="validation.fileset" />
- <chainedmapper>
- <flattenmapper />
- <mapper classpathref="maven-ant-tasks.classpath" classname="org.apache.maven.artifact.ant.VersionMapper" from="${validation.versions}" to="flatten" />
- </chainedmapper>
- </copy>
-
- <copy todir="${jboss.home}/common/lib">
- <fileset dir="target/dependency/lib">
- <include name="validation-api.jar" />
- </fileset>
- </copy>
- </target>
-
- <target name="install-jboss-ejb3-update">
-
- <fail unless="jboss.home" message="Please pass in -Djboss.home=..." />
-
- <artifact:dependencies filesetId="jboss.ejb3.plugin.fileset" versionsId="jboss.ejb3.plugin.versions">
- <dependency groupId="org.jboss.ejb3" artifactId="jboss-ejb3-plugin" version="${jboss-ejb3.version}" classifier="installer" />
- <remoteRepository id="repository.jboss.org" url="http://repository.jboss.org/maven2" />
- </artifact:dependencies>
-
- <mkdir dir="target/ejb3.plugin" />
- <copy todir="target/ejb3.plugin">
- <fileset refid="jboss.ejb3.plugin.fileset" />
- <chainedmapper>
- <flattenmapper />
- <mapper classpathref="maven-ant-tasks.classpath" classname="org.apache.maven.artifact.ant.VersionMapper" from="${jboss.ejb3.plugin.versions}" to="flatten" />
- </chainedmapper>
- </copy>
- <java jar="target/ejb3.plugin/jboss-ejb3-plugin-installer.jar" fork="true" failonerror="true">
- <arg line="${jboss.home}" />
- </java>
- </target>
-
- <macrodef name="maven">
- <attribute name="target" />
- <attribute name="basedir" />
- <element name="args" implicit="true" optional="true" />
- <sequential>
- <java classname="org.codehaus.classworlds.Launcher" fork="true" dir="@{basedir}" failonerror="true">
- <classpath>
- <fileset dir="${maven.dir}/boot">
- <include name="*.jar" />
- </fileset>
- <fileset dir="${maven.dir}/bin">
- <include name="*.*" />
- </fileset>
- </classpath>
- <sysproperty key="classworlds.conf" value="${maven.dir}/bin/m2.conf" />
- <sysproperty key="maven.home" value="${maven.dir}" />
- <args />
- <arg line="@{target}" />
- </java>
- </sequential>
- </macrodef>
-
</project>
Added: core/trunk/jboss-as/pom.xml
===================================================================
--- core/trunk/jboss-as/pom.xml (rev 0)
+++ core/trunk/jboss-as/pom.xml 2009-12-09 16:07:40 UTC (rev 5253)
@@ -0,0 +1,135 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.jboss.weld</groupId>
+ <artifactId>weld-core-jboss-as-updater</artifactId>
+ <packaging>pom</packaging>
+ <version>1.0.1-SNAPSHOT</version>
+
+ <parent>
+ <groupId>org.jboss.weld</groupId>
+ <artifactId>weld-core-parent</artifactId>
+ <version>1.0.1-SNAPSHOT</version>
+ <relativePath>../parent/pom.xml</relativePath>
+ </parent>
+
+ <name>Weld JBoss AS Updater</name>
+
+ <!-- Minimal metadata -->
+ <description>A script to update Weld in JBoss AS</description>
+
+ <!-- SCM and distribution management -->
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/weld/core/trunk</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/weld/core/trunk</developerConnection>
+ <url>http://fisheye.jboss.org/browse/Weld</url>
+ </scm>
+
+ <properties>
+ <weld-deployer.version>5.2.0-SNAPSHOT</weld-deployer.version>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.weld.integration</groupId>
+ <artifactId>weld-jboss-int-deployer-assembly</artifactId>
+ <version>${weld-deployer.version}</version>
+ <type>zip</type>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.weld</groupId>
+ <artifactId>weld-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+ <build>
+ <defaultGoal>package</defaultGoal>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-dependencies</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>copy-dependencies</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${project.build.directory}/dependency/lib</outputDirectory>
+ <overwriteSnapshots>true</overwriteSnapshots>
+ <stripVersion>true</stripVersion>
+ <includeArtifactIds>cdi-api,weld-api,weld-core,weld-jboss-int-deployer-assembly</includeArtifactIds>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>update-jboss-as</id>
+ <phase>package</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <property file="${project.directory}/local.build.properties" />
+ <property file="${project.directory}/build.properties" />
+ <property name="jboss.home" value="${env.JBOSS_HOME}" />
+ <delete
+ dir="${jboss.home}/server/default/deployers/weld.deployer"
+ failonerror="false" />
+ <delete
+ dir="${jboss.home}/server/default/deployers/webbeans.deployer"
+ failonerror="false" />
+
+ <unzip dest="${project.build.directory}"
+ src="${project.build.directory}/dependency/lib/weld-jboss-int-deployer-assembly.zip" />
+
+ <copy todir="target/weld.deployer/lib-int/"
+ overwrite="true">
+ <fileset dir="target/dependency/lib">
+ <include name="weld-core.jar" />
+ </fileset>
+ </copy>
+
+ <copy todir="${jboss.home}/client"
+ overwrite="true">
+ <fileset dir="target/dependency/lib">
+ <include name="weld-api.jar" />
+ <include name="cdi-api.jar" />
+ </fileset>
+ </copy>
+ <copy todir="${jboss.home}/common/lib"
+ overwrite="true">
+ <fileset dir="target/dependency/lib">
+ <include name="weld-api.jar" />
+ <include name="cdi-api.jar" />
+ </fileset>
+ </copy>
+
+ <copy
+ todir="${jboss.home}/server/default/deployers/weld.deployer">
+ <fileset dir="target/weld.deployer">
+ <include name="**/*" />
+ </fileset>
+ </copy>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-deploy-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
Modified: core/trunk/pom.xml
===================================================================
--- core/trunk/pom.xml 2009-12-09 14:40:47 UTC (rev 5252)
+++ core/trunk/pom.xml 2009-12-09 16:07:40 UTC (rev 5253)
@@ -41,6 +41,20 @@
</modules>
</profile>
<profile>
+ <id>update-jboss-as</id>
+ <modules>
+ <module>bom</module>
+ <module>parent</module>
+ <module>impl</module>
+ <module>tests</module>
+ <module>porting-package</module>
+ <module>inject-tck-runner</module>
+ <module>jboss-tck-runner</module>
+ <module>osgi-bundle</module>
+ <module>jboss-as</module>
+ </modules>
+ </profile>
+ <profile>
<id>skip-tests</id>
<modules>
<module>bom</module>
14 years, 11 months
Weld SVN: r5252 - core/trunk/tests.
by weld-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-12-09 09:40:47 -0500 (Wed, 09 Dec 2009)
New Revision: 5252
Modified:
core/trunk/tests/pom.xml
Log:
Always copy dependencies
Modified: core/trunk/tests/pom.xml
===================================================================
--- core/trunk/tests/pom.xml 2009-12-09 12:49:07 UTC (rev 5251)
+++ core/trunk/tests/pom.xml 2009-12-09 14:40:47 UTC (rev 5252)
@@ -1,4 +1,5 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<artifactId>weld-core-parent</artifactId>
<groupId>org.jboss.weld</groupId>
@@ -144,6 +145,36 @@
<outputName>test-report</outputName>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
+ <stripVersion>true</stripVersion>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.jboss.test-harness</groupId>
+ <artifactId>jboss-test-harness</artifactId>
+ <overWrite>true</overWrite>
+ <outputDirectory>${project.build.directory}/classes/lib</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.glassfish.web</groupId>
+ <artifactId>el-impl</artifactId>
+ <overWrite>true</overWrite>
+ <outputDirectory>${project.build.directory}/dependency/lib</outputDirectory>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
@@ -159,36 +190,6 @@
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>copy</id>
- <phase>process-resources</phase>
- <goals>
- <goal>copy</goal>
- </goals>
- <configuration>
- <stripVersion>true</stripVersion>
- <artifactItems>
- <artifactItem>
- <groupId>org.jboss.test-harness</groupId>
- <artifactId>jboss-test-harness</artifactId>
- <overWrite>true</overWrite>
- <outputDirectory>${project.build.directory}/classes/lib</outputDirectory>
- </artifactItem>
- <artifactItem>
- <groupId>org.glassfish.web</groupId>
- <artifactId>el-impl</artifactId>
- <overWrite>true</overWrite>
- <outputDirectory>${project.build.directory}/dependency/lib</outputDirectory>
- </artifactItem>
- </artifactItems>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<suiteXmlFiles>
14 years, 11 months
Weld SVN: r5251 - in java-se/trunk/src/test/java/org/jboss/weld/environment/se/test: scopes and 1 other directory.
by weld-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-12-09 07:49:07 -0500 (Wed, 09 Dec 2009)
New Revision: 5251
Added:
java-se/trunk/src/test/java/org/jboss/weld/environment/se/test/ScopesTest.java
java-se/trunk/src/test/java/org/jboss/weld/environment/se/test/scopes/
java-se/trunk/src/test/java/org/jboss/weld/environment/se/test/scopes/Bar.java
java-se/trunk/src/test/java/org/jboss/weld/environment/se/test/scopes/Foo.java
Log:
WELD-322
Added: java-se/trunk/src/test/java/org/jboss/weld/environment/se/test/ScopesTest.java
===================================================================
--- java-se/trunk/src/test/java/org/jboss/weld/environment/se/test/ScopesTest.java (rev 0)
+++ java-se/trunk/src/test/java/org/jboss/weld/environment/se/test/ScopesTest.java 2009-12-09 12:49:07 UTC (rev 5251)
@@ -0,0 +1,56 @@
+/**
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat, Inc. and/or its affiliates, 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.environment.se.test;
+
+import javax.enterprise.inject.spi.BeanManager;
+
+import org.jboss.weld.environment.se.ShutdownManager;
+import org.jboss.weld.environment.se.Weld;
+import org.jboss.weld.environment.se.WeldContainer;
+import org.jboss.weld.environment.se.test.scopes.Bar;
+import org.jboss.weld.environment.se.test.scopes.Foo;
+import org.testng.annotations.Test;
+
+/**
+ *
+ * @author Peter Royle
+ */
+public class ScopesTest
+{
+
+ /**
+ * Test that decorators work as expected in SE.
+ */
+ @Test(description="WELD-322")
+ public void testScopes()
+ {
+
+ WeldContainer weld = new Weld().initialize();
+ BeanManager manager = weld.getBeanManager();
+
+ assert manager.getBeans(Bar.class).size() == 1;
+ assert manager.getBeans(Foo.class).size() == 2;
+
+ shutdownManager(weld);
+ }
+
+ private void shutdownManager(WeldContainer weld)
+ {
+ ShutdownManager shutdownManager = weld.instance().select(ShutdownManager.class).get();
+ shutdownManager.shutdown();
+ }
+}
Property changes on: java-se/trunk/src/test/java/org/jboss/weld/environment/se/test/ScopesTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added: java-se/trunk/src/test/java/org/jboss/weld/environment/se/test/scopes/Bar.java
===================================================================
--- java-se/trunk/src/test/java/org/jboss/weld/environment/se/test/scopes/Bar.java (rev 0)
+++ java-se/trunk/src/test/java/org/jboss/weld/environment/se/test/scopes/Bar.java 2009-12-09 12:49:07 UTC (rev 5251)
@@ -0,0 +1,8 @@
+package org.jboss.weld.environment.se.test.scopes;
+
+import javax.enterprise.context.Dependent;
+
+@Dependent
+public class Bar extends Foo
+{
+}
\ No newline at end of file
Property changes on: java-se/trunk/src/test/java/org/jboss/weld/environment/se/test/scopes/Bar.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added: java-se/trunk/src/test/java/org/jboss/weld/environment/se/test/scopes/Foo.java
===================================================================
--- java-se/trunk/src/test/java/org/jboss/weld/environment/se/test/scopes/Foo.java (rev 0)
+++ java-se/trunk/src/test/java/org/jboss/weld/environment/se/test/scopes/Foo.java 2009-12-09 12:49:07 UTC (rev 5251)
@@ -0,0 +1,8 @@
+package org.jboss.weld.environment.se.test.scopes;
+
+import javax.enterprise.context.RequestScoped;
+
+@RequestScoped
+public class Foo
+{
+}
\ No newline at end of file
Property changes on: java-se/trunk/src/test/java/org/jboss/weld/environment/se/test/scopes/Foo.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
14 years, 11 months
Weld SVN: r5250 - java-se/trunk.
by weld-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-12-09 07:42:38 -0500 (Wed, 09 Dec 2009)
New Revision: 5250
Modified:
java-se/trunk/
Log:
ignores
Property changes on: java-se/trunk
___________________________________________________________________
Name: svn:ignore
- target
+ target
.classpath
.settings
.project
14 years, 11 months
Weld SVN: r5249 - archetypes/trunk.
by weld-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-12-09 06:47:34 -0500 (Wed, 09 Dec 2009)
New Revision: 5249
Modified:
archetypes/trunk/pom.xml
Log:
I work for Red Hat
Modified: archetypes/trunk/pom.xml
===================================================================
--- archetypes/trunk/pom.xml 2009-12-09 05:43:21 UTC (rev 5248)
+++ archetypes/trunk/pom.xml 2009-12-09 11:47:34 UTC (rev 5249)
@@ -51,7 +51,7 @@
<role>Weld project lead</role>
</roles>
<email>pete.muir(a)jboss.org</email>
- <organization>JBoss, by Red Hat</organization>
+ <organization>Red Hat Inc.</organization>
<url>http://in.relation.to/Bloggers/Pete</url>
</developer>
<developer>
14 years, 11 months
Weld SVN: r5248 - in archetypes/trunk/jsf/jee-minimal/src/main/resources: archetype-resources/src/test/java and 1 other directory.
by weld-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-12-09 00:43:21 -0500 (Wed, 09 Dec 2009)
New Revision: 5248
Added:
archetypes/trunk/jsf/jee-minimal/src/main/resources/archetype-resources/src/test/java/HelloWorldTest.java
Modified:
archetypes/trunk/jsf/jee-minimal/src/main/resources/META-INF/archetype.xml
Log:
add simple test
Modified: archetypes/trunk/jsf/jee-minimal/src/main/resources/META-INF/archetype.xml
===================================================================
--- archetypes/trunk/jsf/jee-minimal/src/main/resources/META-INF/archetype.xml 2009-12-09 05:40:22 UTC (rev 5247)
+++ archetypes/trunk/jsf/jee-minimal/src/main/resources/META-INF/archetype.xml 2009-12-09 05:43:21 UTC (rev 5248)
@@ -12,6 +12,8 @@
<sources>
<source>src/main/java/HelloWorld.java</source>
</sources>
- <testSources />
- <testResources />
+ <testSources>
+ <source>src/test/java/HelloWorldTest.java</source>
+ </testSources>
+ <testResources/>
</archetype>
Added: archetypes/trunk/jsf/jee-minimal/src/main/resources/archetype-resources/src/test/java/HelloWorldTest.java
===================================================================
--- archetypes/trunk/jsf/jee-minimal/src/main/resources/archetype-resources/src/test/java/HelloWorldTest.java (rev 0)
+++ archetypes/trunk/jsf/jee-minimal/src/main/resources/archetype-resources/src/test/java/HelloWorldTest.java 2009-12-09 05:43:21 UTC (rev 5248)
@@ -0,0 +1,12 @@
+package ${package};
+
+import org.testng.annotations.Test;
+
+public class HelloWorldTest
+{
+ @Test
+ public void testGetText() {
+ HelloWorld fixture = new HelloWorld();
+ assert "Hello World!".equals(fixture.getText());
+ }
+}
14 years, 11 months
Weld SVN: r5247 - in archetypes/trunk/jsf/servlet-minimal/src/main/resources: archetype-resources/src/test/java and 1 other directory.
by weld-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-12-09 00:40:22 -0500 (Wed, 09 Dec 2009)
New Revision: 5247
Added:
archetypes/trunk/jsf/servlet-minimal/src/main/resources/archetype-resources/src/test/java/HelloWorldTest.java
Modified:
archetypes/trunk/jsf/servlet-minimal/src/main/resources/META-INF/archetype.xml
Log:
add simple test
Modified: archetypes/trunk/jsf/servlet-minimal/src/main/resources/META-INF/archetype.xml
===================================================================
--- archetypes/trunk/jsf/servlet-minimal/src/main/resources/META-INF/archetype.xml 2009-12-09 05:21:24 UTC (rev 5246)
+++ archetypes/trunk/jsf/servlet-minimal/src/main/resources/META-INF/archetype.xml 2009-12-09 05:40:22 UTC (rev 5247)
@@ -12,7 +12,9 @@
<sources>
<source>src/main/java/HelloWorld.java</source>
</sources>
- <testSources />
+ <testSources>
+ <source>src/test/java/HelloWorldTest.java</source>
+ </testSources>
<testResources>
<resource>src/test/resources/jetty-env.xml</resource>
</testResources>
Added: archetypes/trunk/jsf/servlet-minimal/src/main/resources/archetype-resources/src/test/java/HelloWorldTest.java
===================================================================
--- archetypes/trunk/jsf/servlet-minimal/src/main/resources/archetype-resources/src/test/java/HelloWorldTest.java (rev 0)
+++ archetypes/trunk/jsf/servlet-minimal/src/main/resources/archetype-resources/src/test/java/HelloWorldTest.java 2009-12-09 05:40:22 UTC (rev 5247)
@@ -0,0 +1,12 @@
+package ${package};
+
+import org.testng.annotations.Test;
+
+public class HelloWorldTest
+{
+ @Test
+ public void testGetText() {
+ HelloWorld fixture = new HelloWorld();
+ assert "Hello World!".equals(fixture.getText());
+ }
+}
14 years, 11 months
Weld SVN: r5246 - build/trunk/parent.
by weld-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-12-09 00:21:24 -0500 (Wed, 09 Dec 2009)
New Revision: 5246
Modified:
build/trunk/parent/pom.xml
Log:
make Maven 2.0.10 a minimum requirement (leave upper bound open)
Modified: build/trunk/parent/pom.xml
===================================================================
--- build/trunk/parent/pom.xml 2009-12-09 05:15:23 UTC (rev 5245)
+++ build/trunk/parent/pom.xml 2009-12-09 05:21:24 UTC (rev 5246)
@@ -283,7 +283,7 @@
<configuration>
<rules>
<requireMavenVersion>
- <version>[2.0.10]</version>
+ <version>[2.0.10,)</version>
</requireMavenVersion>
<requirePluginVersions>
<unCheckedPlugins>
14 years, 11 months
Weld SVN: r5245 - in archetypes/trunk/jsf: jee-minimal/src/main/resources/archetype-resources/src/main/webapp and 1 other directories.
by weld-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-12-09 00:15:23 -0500 (Wed, 09 Dec 2009)
New Revision: 5245
Modified:
archetypes/trunk/jsf/jee-minimal/src/main/resources/archetype-resources/src/main/webapp/index.xhtml
archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/webapp/index.xhtml
archetypes/trunk/jsf/servlet-minimal/src/main/resources/archetype-resources/src/main/webapp/index.xhtml
Log:
grammar
Modified: archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/webapp/index.xhtml
===================================================================
--- archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/webapp/index.xhtml 2009-12-09 05:15:05 UTC (rev 5244)
+++ archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/webapp/index.xhtml 2009-12-09 05:15:23 UTC (rev 5245)
@@ -12,7 +12,7 @@
<h:form>
<h2>Bean Validation examples</h2>
- <p>Enforces the annotation-based constraints defined on the model class.</p>
+ <p>Enforces annotation-based constraints defined on the model class.</p>
<table>
<tr>
<th style="text-align: right;">
Modified: archetypes/trunk/jsf/jee-minimal/src/main/resources/archetype-resources/src/main/webapp/index.xhtml
===================================================================
--- archetypes/trunk/jsf/jee-minimal/src/main/resources/archetype-resources/src/main/webapp/index.xhtml 2009-12-09 05:15:05 UTC (rev 5244)
+++ archetypes/trunk/jsf/jee-minimal/src/main/resources/archetype-resources/src/main/webapp/index.xhtml 2009-12-09 05:15:23 UTC (rev 5245)
@@ -12,7 +12,7 @@
<h:form>
<h2>Bean Validation examples</h2>
- <p>Enforces the annotation-based constraints defined on the model class.</p>
+ <p>Enforces annotation-based constraints defined on the model class.</p>
<table>
<tr>
<th style="text-align: right;">
Modified: archetypes/trunk/jsf/servlet-minimal/src/main/resources/archetype-resources/src/main/webapp/index.xhtml
===================================================================
--- archetypes/trunk/jsf/servlet-minimal/src/main/resources/archetype-resources/src/main/webapp/index.xhtml 2009-12-09 05:15:05 UTC (rev 5244)
+++ archetypes/trunk/jsf/servlet-minimal/src/main/resources/archetype-resources/src/main/webapp/index.xhtml 2009-12-09 05:15:23 UTC (rev 5245)
@@ -12,7 +12,7 @@
<h:form>
<h2>Bean Validation examples</h2>
- <p>Enforces the annotation-based constraints defined on the model class.</p>
+ <p>Enforces annotation-based constraints defined on the model class.</p>
<table>
<tr>
<th style="text-align: right;">
14 years, 11 months