Weld SVN: r5373 - cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/definition.
by weld-commits@lists.jboss.org
Author: dallen6
Date: 2009-12-30 15:50:58 -0500 (Wed, 30 Dec 2009)
New Revision: 5373
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/definition/EnterpriseBeanDefinitionTest.java
Log:
Added bug number to a test already marked broken
Modified: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/definition/EnterpriseBeanDefinitionTest.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/definition/EnterpriseBeanDefinitionTest.java 2009-12-30 14:11:02 UTC (rev 5372)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/definition/EnterpriseBeanDefinitionTest.java 2009-12-30 20:50:58 UTC (rev 5373)
@@ -38,6 +38,7 @@
@Test(groups = { "new", "jboss-as-broken" })
@SpecAssertion(section = "3.7.1", id = "ab")
+ // WELD-357
public void testConstructorAnnotatedInjectCalled()
{
ExplicitConstructor bean = getInstanceByType(ExplicitConstructor.class);
14 years, 11 months
Weld SVN: r5372 - core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method.
by weld-commits@lists.jboss.org
Author: dallen6
Date: 2009-12-30 09:11:02 -0500 (Wed, 30 Dec 2009)
New Revision: 5372
Added:
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/Bar.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/BarConsumer.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/BarProducer.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/DisposalMethodInjectionPointTest.java
Log:
Added unit test for WELD-358
Added: core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/Bar.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/Bar.java (rev 0)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/Bar.java 2009-12-30 14:11:02 UTC (rev 5372)
@@ -0,0 +1,10 @@
+package org.jboss.weld.tests.producer.method;
+
+public class Bar
+{
+
+ public Bar(String blah)
+ {
+
+ }
+}
Property changes on: core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/Bar.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/BarConsumer.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/BarConsumer.java (rev 0)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/BarConsumer.java 2009-12-30 14:11:02 UTC (rev 5372)
@@ -0,0 +1,16 @@
+package org.jboss.weld.tests.producer.method;
+
+import javax.enterprise.context.RequestScoped;
+import javax.inject.Inject;
+
+@RequestScoped
+public class BarConsumer
+{
+ @Inject
+ private Bar bar;
+
+ public Bar getBar()
+ {
+ return bar;
+ }
+}
Property changes on: core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/BarConsumer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/BarProducer.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/BarProducer.java (rev 0)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/BarProducer.java 2009-12-30 14:11:02 UTC (rev 5372)
@@ -0,0 +1,58 @@
+package org.jboss.weld.tests.producer.method;
+
+import java.lang.reflect.Member;
+
+import javax.enterprise.inject.Any;
+import javax.enterprise.inject.Default;
+import javax.enterprise.inject.Disposes;
+import javax.enterprise.inject.Produces;
+import javax.enterprise.inject.spi.InjectionPoint;
+
+/**
+ * Class with a producer method and disposal method both containing InjectionPoint
+ * parameters.
+ *
+ * @author David Allen
+ *
+ */
+public class BarProducer
+{
+ private static Bar disposedBar;
+ private static Member disposedInjection;
+ private static Member producedInjection;
+
+ @Produces
+ public Bar getBar(InjectionPoint injectionPoint)
+ {
+ producedInjection = injectionPoint.getMember();
+ return new Bar("blah");
+ }
+
+ public void dispose(@Disposes @Any Bar bar, InjectionPoint injectionPoint)
+ {
+ disposedBar = bar;
+ disposedInjection = injectionPoint.getMember();
+ }
+
+ public static Bar getDisposedBar()
+ {
+ return disposedBar;
+ }
+
+ public static Member getDisposedInjection()
+ {
+ return disposedInjection;
+ }
+
+ public static Member getProducedInjection()
+ {
+ return producedInjection;
+ }
+
+ public static void reset()
+ {
+ disposedBar = null;
+ disposedInjection = null;
+ producedInjection = null;
+ }
+}
Property changes on: core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/BarProducer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/DisposalMethodInjectionPointTest.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/DisposalMethodInjectionPointTest.java (rev 0)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/DisposalMethodInjectionPointTest.java 2009-12-30 14:11:02 UTC (rev 5372)
@@ -0,0 +1,27 @@
+package org.jboss.weld.tests.producer.method;
+
+import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.inject.spi.Bean;
+
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.weld.test.AbstractWeldTest;
+import org.testng.annotations.Test;
+
+@Artifact
+public class DisposalMethodInjectionPointTest extends AbstractWeldTest
+{
+ @Test(groups = { "broken" })
+ // WELD-358
+ public void test()
+ {
+ BarProducer.reset();
+ Bean<BarConsumer> barConsumerBean = getBean(BarConsumer.class);
+ CreationalContext<BarConsumer> ctx = getCurrentManager().createCreationalContext(barConsumerBean);
+ BarConsumer barConsumer = barConsumerBean.create(ctx);
+ assert BarProducer.getProducedInjection().getName().equals("bar");
+ Bar bar = barConsumer.getBar();
+ barConsumerBean.destroy(barConsumer, ctx);
+ assert BarProducer.getDisposedBar() == bar;
+ assert BarProducer.getDisposedInjection().getName().equals("bar");
+ }
+}
Property changes on: core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/DisposalMethodInjectionPointTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
14 years, 11 months
Weld SVN: r5371 - api/trunk/cdi/src/main/java/javax/enterprise/context.
by weld-commits@lists.jboss.org
Author: gavin.king(a)jboss.com
Date: 2009-12-29 14:49:22 -0500 (Tue, 29 Dec 2009)
New Revision: 5371
Modified:
api/trunk/cdi/src/main/java/javax/enterprise/context/ConversationScoped.java
Log:
@ConversationScoped should be @Inherited
Modified: api/trunk/cdi/src/main/java/javax/enterprise/context/ConversationScoped.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/context/ConversationScoped.java 2009-12-29 16:44:37 UTC (rev 5370)
+++ api/trunk/cdi/src/main/java/javax/enterprise/context/ConversationScoped.java 2009-12-29 19:49:22 UTC (rev 5371)
@@ -23,6 +23,7 @@
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Documented;
+import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
@@ -121,6 +122,7 @@
@Retention(RUNTIME)
@Documented
@NormalScope(passivating = true)
+@Inherited
public @interface ConversationScoped
{
}
14 years, 11 months
Weld SVN: r5370 - cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/definition.
by weld-commits@lists.jboss.org
Author: dallen6
Date: 2009-12-29 11:44:37 -0500 (Tue, 29 Dec 2009)
New Revision: 5370
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/definition/EnterpriseBeanDefinitionTest.java
Log:
WELD-12
Modified: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/definition/EnterpriseBeanDefinitionTest.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/definition/EnterpriseBeanDefinitionTest.java 2009-12-29 16:34:22 UTC (rev 5369)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/definition/EnterpriseBeanDefinitionTest.java 2009-12-29 16:44:37 UTC (rev 5370)
@@ -71,12 +71,10 @@
assert !dogBean.getTypes().contains(Pitbull.class);
}
- @Test(groups = { "ejb 3.1", "jboss-as-broken" })
+ @Test(groups = { "ejb 3.1" })
@SpecAssertion(section = "3.2.2", id = "ba")
- // WBRI-231
public void testEnterpriseBeanClassLocalView()
{
- //TODO We need a 3.1 compliant container for this test
Bean<Retriever> dogBean = getBeans(Retriever.class).iterator().next();
assert dogBean.getTypes().contains(Retriever.class);
}
14 years, 11 months
Weld SVN: r5369 - in core/trunk: parent and 1 other directories.
by weld-commits@lists.jboss.org
Author: dallen6
Date: 2009-12-29 11:34:22 -0500 (Tue, 29 Dec 2009)
New Revision: 5369
Modified:
core/trunk/jboss-tck-runner/pom.xml
core/trunk/parent/pom.xml
core/trunk/tests/pom.xml
Log:
Changed test harness used to jboss-as-60 and thus a snapshot version for now till the test harness is released again
Modified: core/trunk/jboss-tck-runner/pom.xml
===================================================================
--- core/trunk/jboss-tck-runner/pom.xml 2009-12-27 12:52:06 UTC (rev 5368)
+++ core/trunk/jboss-tck-runner/pom.xml 2009-12-29 16:34:22 UTC (rev 5369)
@@ -9,7 +9,7 @@
<groupId>org.jboss.weld</groupId>
<artifactId>weld-jboss-tck-runner</artifactId>
<name>CDI TCK runner for Weld</name>
- <description>Aggregates dependencies and run's the CDI TCK (both standalone and on JBoss AS)</description>
+ <description>Aggregates dependencies and runs the CDI TCK (both standalone and on JBoss AS)</description>
<dependencies>
<dependency>
@@ -36,7 +36,7 @@
<dependency>
<groupId>org.jboss.test-harness</groupId>
- <artifactId>jboss-test-harness-jboss-as-52</artifactId>
+ <artifactId>jboss-test-harness-jboss-as-60</artifactId>
<scope>test</scope>
</dependency>
Modified: core/trunk/parent/pom.xml
===================================================================
--- core/trunk/parent/pom.xml 2009-12-27 12:52:06 UTC (rev 5368)
+++ core/trunk/parent/pom.xml 2009-12-29 16:34:22 UTC (rev 5369)
@@ -76,7 +76,7 @@
<log4j.version>1.2.14</log4j.version>
<!-- Testing deps -->
<testng.version>5.10</testng.version>
- <jboss.test.harness.version>1.1.0-CR3</jboss.test.harness.version>
+ <jboss.test.harness.version>1.1.0-SNAPSHOT</jboss.test.harness.version>
<apache.httpclient.version>3.1</apache.httpclient.version>
<junit.version>4.7</junit.version>
<htmlunit.version>2.4</htmlunit.version>
@@ -115,7 +115,7 @@
<dependency>
<groupId>org.jboss.test-harness</groupId>
- <artifactId>jboss-test-harness-jboss-as-52</artifactId>
+ <artifactId>jboss-test-harness-jboss-as-60</artifactId>
<version>${jboss.test.harness.version}</version>
</dependency>
Modified: core/trunk/tests/pom.xml
===================================================================
--- core/trunk/tests/pom.xml 2009-12-27 12:52:06 UTC (rev 5368)
+++ core/trunk/tests/pom.xml 2009-12-29 16:34:22 UTC (rev 5369)
@@ -32,7 +32,7 @@
<dependency>
<groupId>org.jboss.test-harness</groupId>
- <artifactId>jboss-test-harness-jboss-as-52</artifactId>
+ <artifactId>jboss-test-harness-jboss-as-60</artifactId>
<exclusions>
<exclusion>
<groupId>org.jboss.slf4j</groupId>
14 years, 11 months
Weld SVN: r5368 - in test/trunk: junit/src/test/java/org/jboss/weld/test/junit and 1 other directories.
by weld-commits@lists.jboss.org
Author: aslak
Date: 2009-12-27 07:52:06 -0500 (Sun, 27 Dec 2009)
New Revision: 5368
Modified:
test/trunk/core/src/main/java/org/jboss/weld/test/core/TestCore.java
test/trunk/junit/src/test/java/org/jboss/weld/test/junit/ModelTestCase.java
test/trunk/testng/src/test/java/org/jboss/weld/test/testng/ModelTestCase.java
Log:
WELDX-63 Changed to use non-contextual-injection
Modified: test/trunk/core/src/main/java/org/jboss/weld/test/core/TestCore.java
===================================================================
--- test/trunk/core/src/main/java/org/jboss/weld/test/core/TestCore.java 2009-12-24 14:29:14 UTC (rev 5367)
+++ test/trunk/core/src/main/java/org/jboss/weld/test/core/TestCore.java 2009-12-27 12:52:06 UTC (rev 5368)
@@ -1,11 +1,11 @@
package org.jboss.weld.test.core;
import java.lang.annotation.Annotation;
-import java.lang.reflect.Field;
import javax.enterprise.context.spi.CreationalContext;
import javax.enterprise.inject.spi.Bean;
import javax.enterprise.inject.spi.BeanManager;
+import javax.enterprise.inject.spi.InjectionTarget;
import javax.inject.Qualifier;
import org.jboss.weld.test.spi.Bootstrap;
@@ -26,6 +26,20 @@
boostrap.stop();
}
+ public void injectFields(Object target) throws Exception
+ {
+ injectNonContextualInstance(manager, target);
+ }
+
+ @SuppressWarnings("unchecked")
+ private void injectNonContextualInstance(BeanManager manager, Object instance)
+ {
+ CreationalContext<Object> creationalContext = manager.createCreationalContext(null);
+ InjectionTarget<Object> injectionTarget = (InjectionTarget<Object>) manager.createInjectionTarget(
+ manager.createAnnotatedType(instance.getClass()));
+ injectionTarget.inject(instance, creationalContext);
+ }
+
public <T> T getInstanceByType(Class<T> type, Annotation... bindings)
{
return getInstanceByType(manager, type, bindings);
@@ -40,34 +54,6 @@
return (T) manager.getReference(bean, type, cc);
}
- public void injectFields(Object target) throws Exception
- {
- Field[] fields = target.getClass().getDeclaredFields();
- for (Field field : fields)
- {
- injectField(field, target);
- }
- }
-
- private void injectField(Field field, Object target) throws Exception
- {
- if (!hasBindTypeAnnotation(field.getAnnotations()))
- {
- return;
- }
- if (!field.isAccessible())
- {
- field.setAccessible(true);
- }
- Object injectable = getInstanceByType(field.getType(), field
- .getAnnotations());
-
- if (injectable != null)
- {
- field.set(target, injectable);
- }
- }
-
public static boolean hasBindTypeAnnotation(Annotation[] annotations)
{
for (Annotation annotation : annotations)
Modified: test/trunk/junit/src/test/java/org/jboss/weld/test/junit/ModelTestCase.java
===================================================================
--- test/trunk/junit/src/test/java/org/jboss/weld/test/junit/ModelTestCase.java 2009-12-24 14:29:14 UTC (rev 5367)
+++ test/trunk/junit/src/test/java/org/jboss/weld/test/junit/ModelTestCase.java 2009-12-27 12:52:06 UTC (rev 5368)
@@ -1,5 +1,7 @@
package org.jboss.weld.test.junit;
+import javax.inject.Inject;
+
import junit.framework.Assert;
import org.jboss.weld.test.model.Language;
@@ -15,8 +17,8 @@
// Will not be injected, no BindingType
private static String userName = "Aslak";
- private @Language(LanguageType.NO)
- WelcomeService service;
+ @Inject @Language(LanguageType.NO)
+ private WelcomeService service;
private User user = new User(userName);
Modified: test/trunk/testng/src/test/java/org/jboss/weld/test/testng/ModelTestCase.java
===================================================================
--- test/trunk/testng/src/test/java/org/jboss/weld/test/testng/ModelTestCase.java 2009-12-24 14:29:14 UTC (rev 5367)
+++ test/trunk/testng/src/test/java/org/jboss/weld/test/testng/ModelTestCase.java 2009-12-27 12:52:06 UTC (rev 5368)
@@ -1,5 +1,7 @@
package org.jboss.weld.test.testng;
+import javax.inject.Inject;
+
import org.jboss.weld.test.model.Language;
import org.jboss.weld.test.model.LanguageType;
import org.jboss.weld.test.model.User;
@@ -12,8 +14,8 @@
// Will not be injected, no BindingType
private static String userName = "Aslak";
- private @Language(LanguageType.NO)
- WelcomeService service;
+ @Inject @Language(LanguageType.NO)
+ private WelcomeService service;
private User user = new User(userName);
@@ -26,3 +28,4 @@
}
}
+
14 years, 11 months
Weld SVN: r5367 - core/trunk/impl/src/main/java/org/jboss/weld/bean.
by weld-commits@lists.jboss.org
Author: dallen6
Date: 2009-12-24 09:29:14 -0500 (Thu, 24 Dec 2009)
New Revision: 5367
Modified:
core/trunk/impl/src/main/java/org/jboss/weld/bean/ManagedBean.java
Log:
WELD-313
Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/ManagedBean.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/ManagedBean.java 2009-12-24 08:28:18 UTC (rev 5366)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/ManagedBean.java 2009-12-24 14:29:14 UTC (rev 5367)
@@ -140,14 +140,7 @@
{
T instance = getInjectionTarget().produce(creationalContext);
getInjectionTarget().inject(instance, creationalContext);
- if (isInterceptionCandidate() && (hasCdiBoundInterceptors() || hasDirectlyDefinedInterceptors()))
- {
- InterceptionUtils.executePostConstruct(instance);
- }
- else
- {
- getInjectionTarget().postConstruct(instance);
- }
+ getInjectionTarget().postConstruct(instance);
return instance;
}
@@ -171,14 +164,7 @@
{
try
{
- if (!isInterceptionCandidate() || !(hasCdiBoundInterceptors() || hasDirectlyDefinedInterceptors()))
- {
- getInjectionTarget().preDestroy(instance);
- }
- else
- {
- InterceptionUtils.executePredestroy(instance);
- }
+ getInjectionTarget().preDestroy(instance);
creationalContext.release();
}
catch (Exception e)
@@ -225,12 +211,26 @@
public void postConstruct(T instance)
{
- defaultPostConstruct(instance);
+ if (isInterceptionCandidate() && (hasCdiBoundInterceptors() || hasDirectlyDefinedInterceptors()))
+ {
+ InterceptionUtils.executePostConstruct(instance);
+ }
+ else
+ {
+ defaultPostConstruct(instance);
+ }
}
public void preDestroy(T instance)
{
- defaultPreDestroy(instance);
+ if (!isInterceptionCandidate() || !(hasCdiBoundInterceptors() || hasDirectlyDefinedInterceptors()))
+ {
+ defaultPreDestroy(instance);
+ }
+ else
+ {
+ InterceptionUtils.executePredestroy(instance);
+ }
}
public void dispose(T instance)
14 years, 11 months
Weld SVN: r5366 - in archetypes/trunk/jsf: jee-minimal/src/main/resources/archetype-resources and 1 other directory.
by weld-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-12-24 03:28:18 -0500 (Thu, 24 Dec 2009)
New Revision: 5366
Modified:
archetypes/trunk/jsf/jee-minimal/src/main/resources/archetype-resources/readme.txt
archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/readme.txt
Log:
notes
Modified: archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/readme.txt
===================================================================
--- archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/readme.txt 2009-12-24 08:15:27 UTC (rev 5365)
+++ archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/readme.txt 2009-12-24 08:28:18 UTC (rev 5366)
@@ -24,7 +24,7 @@
If you want to deploy the application to a standalone Servlet Container, then
you will need to set one up. Alternatively, you can use a Maven command to run
- the application in place on an embedded version of GlassFish.
+ the application in place on an embedded version of GlassFish V3.
Please note that Maven 2 project needs to use the JBoss Maven repository
because there are certain Java EE API JARs that are not yet publised to the
@@ -66,7 +66,7 @@
http://localhost:8080/${artifactId}
- If you want to deploy to GlassFish (standalone), you first need to change
+ If you want to deploy to GlassFish V3 (standalone), you first need to change
the name of the DataSource used by the persistence unit! Open this file:
src/main/resources/META-INF/persistence.xml
@@ -82,9 +82,22 @@
mvn package
- You can now deploy the target/${artifactId}.war archive and launch the
- application the through GlassFish administration console.
+ There are several ways to deploy the archive to GlassFish V3. The recommended
+ approach is to open the project in NetBeans 6.8, right-click on the project
+ and select "Run" from the context menu. That starts JavaDB, GlassFish and
+ deploys the application.
+ You can also start GlassFish from the commandline. Change to the glassfish/bin
+ directory in the GlassFish install root and run these three commands:
+
+ asadmin start-database
+ asadmin start-domain domain1
+
+ Now you can either deploy the target/${artifactId}.war through the web-based
+ GlassFish admininstration console, or you can again use asadmin:
+
+ asadmin /path/to/project/target/${artifactId}.war
+
Unfortunately, the embedded GlassFish V3 application server does not bootstrap
the persistence unit(s), so you won't be able to leverage the Maven plugin to
run the application in place (like you can in a jee-minimal project).
Modified: archetypes/trunk/jsf/jee-minimal/src/main/resources/archetype-resources/readme.txt
===================================================================
--- archetypes/trunk/jsf/jee-minimal/src/main/resources/archetype-resources/readme.txt 2009-12-24 08:15:27 UTC (rev 5365)
+++ archetypes/trunk/jsf/jee-minimal/src/main/resources/archetype-resources/readme.txt 2009-12-24 08:28:18 UTC (rev 5366)
@@ -23,7 +23,7 @@
If you want to deploy the application to a standalone Servlet Container, then
you will need to set one up. Alternatively, you can use a Maven command to run
- the application in place on an embedded version of GlassFish.
+ the application in place on an embedded version of GlassFish V3.
Please note that Maven 2 project needs to use the JBoss Maven repository
because there are certain Java EE API JARs that are not yet publised to the
@@ -33,7 +33,7 @@
=========================
You can deploy the application without moving any files around using the
- embedded GlassFish application server.
+ embedded GlassFish V3 application server.
To run the application using embedded GlassFish, execute this command:
@@ -79,9 +79,22 @@
http://localhost:8080/${artifactId}
- If you want to deploy to GlassFish (standalone), you can upload the
- target/${artifactId}.war archive using the web-based administration console.
+ There are several ways to deploy the archive to GlassFish V3 (standalone). The
+ recommended approach is to open the project in NetBeans 6.8, right-click on
+ the project and select "Run" from the context menu. That starts JavaDB,
+ GlassFish V3 and deploys the application.
+ You can also start GlassFish from the commandline. Change to the glassfish/bin
+ directory in the GlassFish install root and run these three commands:
+
+ asadmin start-database
+ asadmin start-domain domain1
+
+ Now you can either deploy the target/${artifactId}.war through the web-based
+ GlassFish admininstration console, or you can again use asadmin:
+
+ asadmin /path/to/project/target/${artifactId}.war
+
Importing the project into an IDE
=================================
14 years, 11 months
Weld SVN: r5365 - in archetypes/trunk/jsf: jee-minimal/src/main/resources/archetype-resources and 1 other directory.
by weld-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-12-24 03:15:27 -0500 (Thu, 24 Dec 2009)
New Revision: 5365
Modified:
archetypes/trunk/jsf/jee-minimal/src/main/resources/archetype-resources/pom.xml
archetypes/trunk/jsf/jee-minimal/src/main/resources/archetype-resources/readme.txt
archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/pom.xml
archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/readme.txt
Log:
clean up embedded-glassfish plugin configuration and notes
Modified: archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/pom.xml
===================================================================
--- archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/pom.xml 2009-12-23 22:49:35 UTC (rev 5364)
+++ archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/pom.xml 2009-12-24 08:15:27 UTC (rev 5365)
@@ -19,6 +19,10 @@
-->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!--
+ Timestamp format for the maven.build.timestamp property; you can reference property in pom.xml or filtered resources (must enable third-party plugin if using Maven < 2.1)
+ -->
+ <maven.build.timestamp.format>yyyyMMdd'T'HHmmss</maven.build.timestamp.format>
+ <!--
To set the jboss.home environment variable the Maven way, set the jboss.home property in an active profile in
the Maven 2 settings.xml file
-->
@@ -38,6 +42,15 @@
</repository>
</repositories>
+ <pluginRepositories>
+ <!-- GlassFish repository required for embedded-glassfish plugin -->
+ <pluginRepository>
+ <id>glassfish</id>
+ <name>GlassFish Maven 2 Repository</name>
+ <url>http://download.java.net/maven/glassfish</url>
+ </pluginRepository>
+ </pluginRepositories>
+
<dependencyManagement>
<dependencies>
<!-- Import scope will provide versions for dependencies below. -->
@@ -50,6 +63,7 @@
</dependency>
</dependencies>
</dependencyManagement>
+
<dependencies>
<!-- CDI (JSR-299) -->
<dependency>
@@ -78,7 +92,7 @@
</dependency>
<!-- Bean Validation Implementation -->
<!-- Provides portable constraints such as @NotEmpty, @Email and @Url -->
- <!-- Hibernate Validator is only the JSR-303 implementation at the moment, so we can assume it's provided -->
+ <!-- Hibernate Validator is the only JSR-303 implementation at the moment, so we can assume it's provided -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
@@ -121,11 +135,12 @@
</exclusion>
</exclusions>
</dependency>
+
</dependencies>
<build>
<finalName>${expr_start}artifactId${expr_end}</finalName>
<plugins>
- <!-- Compiler plugin enforces Java 1.6 compatiblity -->
+ <!-- Compiler plugin enforces Java 1.6 compatibility -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
@@ -160,6 +175,7 @@
</fileNames>
</configuration>
</plugin>
+
</plugins>
</build>
</project>
Modified: archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/readme.txt
===================================================================
--- archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/readme.txt 2009-12-23 22:49:35 UTC (rev 5364)
+++ archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/readme.txt 2009-12-24 08:15:27 UTC (rev 5365)
@@ -85,17 +85,10 @@
You can now deploy the target/${artifactId}.war archive and launch the
application the through GlassFish administration console.
- Alternatively, you can deploy the application without moving any files around
- using the embedded GlassFish application server.
+ Unfortunately, the embedded GlassFish V3 application server does not bootstrap
+ the persistence unit(s), so you won't be able to leverage the Maven plugin to
+ run the application in place (like you can in a jee-minimal project).
- To run the application using embedded GlassFish, execute this command:
-
- mvn package embedded-glassfish:run
-
- The application will be running at the following URL:
-
- http://localhost:7070/${artifactId}
-
Importing the project into an IDE
=================================
Modified: archetypes/trunk/jsf/jee-minimal/src/main/resources/archetype-resources/pom.xml
===================================================================
--- archetypes/trunk/jsf/jee-minimal/src/main/resources/archetype-resources/pom.xml 2009-12-23 22:49:35 UTC (rev 5364)
+++ archetypes/trunk/jsf/jee-minimal/src/main/resources/archetype-resources/pom.xml 2009-12-24 08:15:27 UTC (rev 5365)
@@ -1,5 +1,5 @@
## Custom Velocity declaration to allow us to escape Maven variable placeholders
-## Prevents archetype warnings about unrecognized variables.
+## Prevents archetype warnings about unrecognized variables
#set( $expr_start = '${' )
#set( $expr_end = '}' )
<?xml version="1.0" encoding="UTF-8"?>
@@ -11,14 +11,21 @@
<packaging>war</packaging>
<name>${artifactId}</name>
<version>${version}</version>
-
+
<properties>
<!--
Explicitly declaring the source encoding eliminates the following message:
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
-->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <!-- To set the jboss.home environment variable the Maven way, set the jboss.home property in an active profile in the Maven 2 settings.xml file -->
+ <!--
+ Timestamp format for the maven.build.timestamp property; you can reference property in pom.xml or filtered resources (must enable third-party plugin if using Maven < 2.1)
+ -->
+ <maven.build.timestamp.format>yyyyMMdd'T'HHmmss</maven.build.timestamp.format>
+ <!--
+ To set the jboss.home environment variable the Maven way, set the jboss.home property in an active profile in
+ the Maven 2 settings.xml file
+ -->
<jboss.home>${expr_start}env.JBOSS_HOME${expr_end}</jboss.home>
<jboss.domain>default</jboss.domain>
<!-- The version of Weld extensions in use -->
@@ -142,7 +149,7 @@
-->
</configuration>
</plugin>
-
+
<!-- Configure the JBoss AS Maven deploy plugin -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
@@ -155,6 +162,7 @@
</fileNames>
</configuration>
</plugin>
+
<!-- Configure the Embedded GlassFish Maven plugin -->
<plugin>
<groupId>org.glassfish</groupId>
@@ -164,8 +172,26 @@
<app>${expr_start}project.build.directory${expr_end}/${expr_start}build.finalName${expr_end}.war</app>
<port>7070</port>
<containerType>web</containerType>
+ <instanceRoot>${expr_start}project.build.directory${expr_end}/gfembed${expr_start}maven.build.timestamp${expr_end}</instanceRoot>
+ <autoDelete>true</autoDelete>
</configuration>
</plugin>
+
+ <!-- Uncomment if using Maven < 2.1 to set maven.build.timestamp property -->
+ <!--
+ <plugin>
+ <groupId>com.keyboardsamurais.maven</groupId>
+ <artifactId>maven-timestamp-plugin</artifactId>
+ <version>1.0</version>
+ <configuration>
+ <propertyName>maven.build.timestamp</propertyName>
+ <timestampPattern>yyyyMMdd'T'HHmmss</timestampPattern>
+ </configuration>
+ <executions>
+ <execution><goals><goal>create</goal></goals></execution>
+ </executions>
+ </plugin>
+ -->
</plugins>
</build>
</project>
Modified: archetypes/trunk/jsf/jee-minimal/src/main/resources/archetype-resources/readme.txt
===================================================================
--- archetypes/trunk/jsf/jee-minimal/src/main/resources/archetype-resources/readme.txt 2009-12-23 22:49:35 UTC (rev 5364)
+++ archetypes/trunk/jsf/jee-minimal/src/main/resources/archetype-resources/readme.txt 2009-12-24 08:15:27 UTC (rev 5365)
@@ -43,6 +43,9 @@
http://localhost:7070/${artifactId}
+ To redeploy the application, hit ENTER in the same window. To shutdown
+ GlassFish, type the letter 'x' then hit ENTER.
+
To deploy the application to JBoss AS (standalone), first make sure that the
JBOSS_HOME environment variable points to a JBoss AS 6.0 installation.
Alternatively, you can set the location of JBoss AS using the following
14 years, 11 months
Weld SVN: r5364 - in archetypes/trunk/jsf: jee-minimal/src/main/resources/archetype-resources/src/main/webapp/WEB-INF and 1 other directories.
by weld-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-12-23 17:49:35 -0500 (Wed, 23 Dec 2009)
New Revision: 5364
Modified:
archetypes/trunk/jsf/jee-minimal/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
archetypes/trunk/jsf/servlet-minimal/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
Log:
WELDX-62
Modified: archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
===================================================================
--- archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml 2009-12-21 15:26:08 UTC (rev 5363)
+++ archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml 2009-12-23 22:49:35 UTC (rev 5364)
@@ -28,8 +28,8 @@
<!-- This is an optional parameter, but it makes troubleshooting errors much easier. -->
<!-- You may want to delete it before final deployment -->
<context-param>
- <param-name>facelets.DEVELOPMENT</param-name>
- <param-value>true</param-value>
+ <param-name>javax.faces.PROJECT_STAGE</param-name>
+ <param-value>Development</param-value>
</context-param>
<persistence-unit-ref>
Modified: archetypes/trunk/jsf/jee-minimal/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
===================================================================
--- archetypes/trunk/jsf/jee-minimal/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml 2009-12-21 15:26:08 UTC (rev 5363)
+++ archetypes/trunk/jsf/jee-minimal/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml 2009-12-23 22:49:35 UTC (rev 5364)
@@ -27,8 +27,8 @@
<!-- This is an optional parameter, but it makes troubleshooting errors much easier -->
<!-- You are advised to delete this context parameter before a production deployment -->
<context-param>
- <param-name>facelets.DEVELOPMENT</param-name>
- <param-value>true</param-value>
+ <param-name>javax.faces.PROJECT_STAGE</param-name>
+ <param-value>Development</param-value>
</context-param>
</web-app>
Modified: archetypes/trunk/jsf/servlet-minimal/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
===================================================================
--- archetypes/trunk/jsf/servlet-minimal/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml 2009-12-21 15:26:08 UTC (rev 5363)
+++ archetypes/trunk/jsf/servlet-minimal/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml 2009-12-23 22:49:35 UTC (rev 5364)
@@ -22,8 +22,8 @@
<!-- This is an optional parameter, but it makes troubleshooting errors much easier -->
<!-- You are advised to remove this context parameter before a production deployment -->
<context-param>
- <param-name>facelets.DEVELOPMENT</param-name>
- <param-value>true</param-value>
+ <param-name>javax.faces.PROJECT_STAGE</param-name>
+ <param-value>Development</param-value>
</context-param>
<!-- Weld Jetty/Tomcat specific configuration parameters -->
14 years, 11 months