diff --git a/Chapter02-EnablingTechnologies.asciidoc b/Chapter02-EnablingTechnologies.asciidoc
index 7718bf7..a51c754 100644
--- a/Chapter02-EnablingTechnologies.asciidoc
+++ b/Chapter02-EnablingTechnologies.asciidoc
@@ -206,7 +206,7 @@ _Prerequisites_
ShrinkWrap may run on any Java5 runtime or higher, but requires at least JDK6 for compilation.
-The primary entry point to the ShrinkWrap library is the +org.jboss.shrinkwrap.api.ShrinkWrap+ class. From here you may call the +create+ method to make a new +Archive+, the a generic view of the virtual filesystem which allows the addition of content called +Asset+ s into a location called an +ArchivePath+. The following table more easily shows ShrinkWrap nomenclature next to more common terms:
+The primary entry point to the ShrinkWrap library is the +org.jboss.shrinkwrap.api.ShrinkWrap+ class. From here you may call the +create+ method to make a new +Archive+, a generic view of the virtual filesystem which allows the addition of content called +Asset+ s into a location called an +ArchivePath+. The following table more easily shows ShrinkWrap nomenclature next to more common terms:
|=============================
|_Archive Type_|_Description_
@@ -214,7 +214,7 @@ The primary entry point to the ShrinkWrap library is the +org.jboss.shrinkwrap.a
|+org.jboss.shrinkwrap.api.spec.JavaArchive+|JAR type; allows addition of +Class+ es, +Package+ s, and Manifest operations
|+org.jboss.shrinkwrap.api.spec.EnterpriseArchive+|Java EE EAR type; supports Manifest and related spec operations
|+org.jboss.shrinkwrap.api.spec.WebArchive+|Java EE WAR type; supports operations common to web application deployments
-|+org.jboss.shrinkwrap.api.spec.ResourceAdaptorArchive+|Java EE RAR type; supports operations common to resource adaptor deployments
+|+org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive+|Java EE RAR type; supports operations common to resource adapter deployments
|=============================
To create an +Archive+, simply choose your desired archive type and optionally supply a name to the static +ShrinkWrap:create+ method:
@@ -483,7 +483,7 @@ Let's cover some of the most popular use cases for ShrinkWrap Resolver.
===== Resolution of Artifacts Specified by Maven Coordinates
-Maven coordinates, in their canonical form, are specified as following +groupId:artifactId:[packagingType:[classifier]]:version+. Often, those are referred as +G+ (groupId), +A+ (artifactId), +P+ (packagingType), +C+ (classifier) and +V+ (version). If you omit +P+ and +C+, they will get their default value, which is packaging of +jar+ and an empty classifier. ShrinWrap Resolver additionally allows you to skip +V+ in case it has version information available, that would be explained later on.
+Maven coordinates, in their canonical form, are specified as following +groupId:artifactId:[packagingType:[classifier]]:version+. Often, those are referred as +G+ (groupId), +A+ (artifactId), +P+ (packagingType), +C+ (classifier) and +V+ (version). If you omit +P+ and +C+, they will get their default value, which is packaging of +jar+ and an empty classifier. ShrinkWrap Resolver additionally allows you to skip +V+ in case it has version information available, that would be explained later on.
1. The most simple use case is to resolve a file using coordinates. Here, the resolver locates an artifact defined by +G:A:V+ and resolves it including all transitive dependencies. The result is formatted as array of type +File+.
+
@@ -493,7 +493,7 @@ File[] = Maven.resolver().resolve("G:A:V").withTransitivity().asFile();
----
+
-2. You might want to change default Maven behavior and resolve only artifact specified by +G:A:V+, avoiding its transitive dependencies. For this use case, ShrinkWrap Resolvers provides a shorthand for changing resolution strategy, called +withoutTransitivity()+. Additionally, you might want to return a single +File+ instead of an array.
+2. You might want to change the default Maven behavior and resolve only one artifact specified by +G:A:V+, avoiding its transitive dependencies. For this use case, ShrinkWrap Resolvers provides a shorthand for changing resolution strategy, called +withoutTransitivity()+. Additionally, you might want to return a single +File+ instead of an array.
+
[source,java]
----
@@ -645,9 +645,9 @@ ShrinkWrap Resolvers will not consume settings.xml specified on command line (+-
While previous calls allow you to manually define what you want to resolve, in Maven projects, you have very likely specified this information already in your _pom.xml_ file. ShrinkWrap Resolver allows you to follow _DRY_ principles and it is able to load metadata included there.
-ShrinkWrap Resolvers constructs so called effective POM model (simplified, that is your _pom.xml_ file plus parent hierarchy and Super POM, Maven default POM file). In order to construct the model, it uses all local repository, classpath repository and remote repositories. Once the model is loaded, you can use the metadata in there to be automatically added to artifacts to be resolved.
+ShrinkWrap Resolvers constructs a so called effective POM model (simplified, that is your _pom.xml_ file plus parent hierarchy and Super POM, Maven default POM file). In order to construct the model, it uses all local repositories, the classpath repository and all remote repositories. Once the model is loaded, you can use the metadata in there to be automatically added to artifacts to be resolved.
-1. Resolving an artifact with version defined in effective POM. In case, you want to resolve +G:A:V+, you can simply specify +G:A+ instead. For artifacts with non JAR packaging type or classifier, you must use alternative syntax with question mark '+?+', such as +G:A:P:?+ or +G:A:P:C:?+.
+1. Resolving an artifact with the version defined in effective POM. In case, you want to resolve +G:A:V+, you can simply specify +G:A+ instead. For artifacts with non JAR packaging type or classifier, you must use an alternative syntax with question mark '+?+', such as +G:A:P:?+ or +G:A:P:C:?+.
+
[source,java]
----
@@ -658,7 +658,7 @@ Maven.resolver().loadPomFromClassLoaderResource("/path/to/pom.xml")
.resolve("G:A:P:?").withTransitivity().asFile();
----
-2. Resolving artifacts defined in effective POM. ShrinkWrap Resolvers allows you to artifacts defined with specific scope into list of artifacts to be resolved. This way, you don't need to alter your tests if you change dependencies of your application. You can either use +importDependencies(ScopeType...)+ or convenience methods, that cover the most frequent usages (+importRuntimeDependencies()+, +importTestDependencies()+ and +importRuntimeAndTestDependencies()+:
+2. Resolving artifacts defined in effective POM. ShrinkWrap Resolvers allows you to import artifacts defined with a specific scope into the list of artifacts to be resolved. This way, you don't need to alter your tests if you change dependencies of your application. You can either use +importDependencies(ScopeType...)+ or convenience methods, that cover the most frequent usages (+importRuntimeDependencies()+, +importTestDependencies()+ and +importRuntimeAndTestDependencies())+:
+
[source,java]
----
diff --git a/Chapter04-RequirementsAndExampleApplication.asciidoc b/Chapter04-RequirementsAndExampleApplication.asciidoc
index 71d8862..562ad47 100644
--- a/Chapter04-RequirementsAndExampleApplication.asciidoc
+++ b/Chapter04-RequirementsAndExampleApplication.asciidoc
@@ -210,7 +210,7 @@ image:images/ch04-requirements_example_app/clone.png["GitHub URI to Clone"]
Then simply move to a directory in which you'd like to place your local clone, and issue the +git clone+ command, passing in the URI to your GitHub repository. For instance:
----
-$> git clone git@github.com:ALRubinger/continuous-enterprise-development.git
+$> git clone git@github.com:arquillian/continuous-enterprise-development.git
Cloning into 'continuous-enterprise-development'...
remote: Counting objects: 2661, done.
remote: Compressing objects: 100% (1170/1170), done.
diff --git a/code/application/application/pom.xml b/code/application/application/pom.xml
index 6f36df4..fe46ed0 100644
--- a/code/application/application/pom.xml
+++ b/code/application/application/pom.xml
@@ -87,6 +87,18 @@
rest-assured
test
+
+ httpmime
+ org.apache.httpcomponents
+
+
+ httpcore
+ org.apache.httpcomponents
+
+
+ httpclient
+ org.apache.httpcomponents
+
org.codehaus.jackson
jackson-mapper-asl
diff --git a/code/application/application/src/test/java/org/cedj/geekseek/test/functional/arquillian/AngularJSDroneExtension.java b/code/application/application/src/test/java/org/cedj/geekseek/test/functional/arquillian/AngularJSDroneExtension.java
index ab805df..552e8ff 100644
--- a/code/application/application/src/test/java/org/cedj/geekseek/test/functional/arquillian/AngularJSDroneExtension.java
+++ b/code/application/application/src/test/java/org/cedj/geekseek/test/functional/arquillian/AngularJSDroneExtension.java
@@ -4,7 +4,8 @@
import java.util.concurrent.TimeUnit;
import org.jboss.arquillian.core.spi.LoadableExtension;
-import org.jboss.arquillian.drone.spi.Enhancer;
+import org.jboss.arquillian.drone.spi.DroneInstanceEnhancer;
+import org.jboss.arquillian.drone.spi.InstanceOrCallableInstance;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
@@ -16,10 +17,10 @@ public class AngularJSDroneExtension implements LoadableExtension {
@Override
public void register(ExtensionBuilder builder) {
- builder.service(Enhancer.class, AngularJSEnhancer.class);
+ builder.service(DroneInstanceEnhancer.class, AngularJSEnhancer.class);
}
- public static class AngularJSEnhancer implements Enhancer {
+ public static class AngularJSEnhancer implements DroneInstanceEnhancer {
private WebDriverEventListener listener;
@@ -29,8 +30,9 @@ public int getPrecedence() {
}
@Override
- public boolean canEnhance(Class> type, Class extends Annotation> qualifier) {
- return WebDriver.class.isAssignableFrom(type);
+ public boolean canEnhance(InstanceOrCallableInstance instance,
+ Class> droneType, Class extends Annotation> qualifier) {
+ return WebDriver.class.isAssignableFrom(droneType);
}
@Override
diff --git a/code/application/application/src/test/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension b/code/application/application/src/test/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension
index 1f14aa3..9b0ac72 100644
--- a/code/application/application/src/test/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension
+++ b/code/application/application/src/test/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension
@@ -1,2 +1,2 @@
-cedj.geekseek.test.functional.arquillian.ArquillianSuiteExtension
-cedj.geekseek.test.functional.arquillian.AngularJSDroneExtension
\ No newline at end of file
+org.cedj.geekseek.test.functional.arquillian.ArquillianSuiteExtension
+org.cedj.geekseek.test.functional.arquillian.AngularJSDroneExtension
diff --git a/code/application/pom.xml b/code/application/pom.xml
index 6c9bcb0..13cd3a5 100644
--- a/code/application/pom.xml
+++ b/code/application/pom.xml
@@ -42,13 +42,13 @@
1.1.1.Final
1.0.0.Alpha6
- 1.2.0.Beta2
- 2.0.0.Beta2
+ 1.2.1.Final
+ 2.0.0.Final
1.0.0.Beta1-SNAPSHOT
1.0.0.Final-SNAPSHOT
1.0.0.Alpha1
- 1.8.1
- 8.0.0.Beta1
+ 2.3.0
+ 8.0.0.Final
7.1.1.Final
7.2.0.Final
eap-6.1.0
diff --git a/code/application/service/security/pom.xml b/code/application/service/security/pom.xml
index 645db57..3ac2b4a 100644
--- a/code/application/service/security/pom.xml
+++ b/code/application/service/security/pom.xml
@@ -106,6 +106,24 @@
org.jboss.shrinkwrap.resolver
shrinkwrap-resolver-impl-maven-archive
test
+
+
+ httpmime
+ org.apache.httpcomponents
+
+
+ httpcore
+ org.apache.httpcomponents
+
+
+ httpclient
+ org.apache.httpcomponents
+
+
+ org.codehaus.jackson
+ jackson-mapper-asl
+
+
org.jboss.shrinkwrap.descriptors
@@ -127,6 +145,24 @@
com.jayway.restassured
rest-assured
test
+
+
+ httpmime
+ org.apache.httpcomponents
+
+
+ httpcore
+ org.apache.httpcomponents
+
+
+ httpclient
+ org.apache.httpcomponents
+
+
+ org.codehaus.jackson
+ jackson-mapper-asl
+
+
diff --git a/code/application/service/security/src/test/java/org/cedj/geekseek/service/security/test/functional/TwitterAuthLoginTestCase.java b/code/application/service/security/src/test/java/org/cedj/geekseek/service/security/test/functional/TwitterAuthLoginTestCase.java
index e3d7223..39b2572 100644
--- a/code/application/service/security/src/test/java/org/cedj/geekseek/service/security/test/functional/TwitterAuthLoginTestCase.java
+++ b/code/application/service/security/src/test/java/org/cedj/geekseek/service/security/test/functional/TwitterAuthLoginTestCase.java
@@ -27,7 +27,7 @@ public class TwitterAuthLoginTestCase {
@Deployment(testable = false)
public static WebArchive deploy() {
return ShrinkWrap.create(WebArchive.class)
- //.addAsResource("auth.properties")
+ .addAsResource("Twitter.properties")
.addPackages(false,
AuthServlet.class.getPackage(),
OAuthAuthenticator.class.getPackage(),
diff --git a/code/application/service/security/src/test/java/org/cedj/geekseek/service/security/test/integration/WhoAmIResourceTestCase.java b/code/application/service/security/src/test/java/org/cedj/geekseek/service/security/test/integration/WhoAmIResourceTestCase.java
index 88833a6..8c1b5cc 100644
--- a/code/application/service/security/src/test/java/org/cedj/geekseek/service/security/test/integration/WhoAmIResourceTestCase.java
+++ b/code/application/service/security/src/test/java/org/cedj/geekseek/service/security/test/integration/WhoAmIResourceTestCase.java
@@ -14,6 +14,7 @@
import org.cedj.geekseek.service.security.test.model.SetupAuth;
import org.cedj.geekseek.service.security.test.model.TestApplication;
import org.cedj.geekseek.service.security.test.model.TestCurrentUserProducer;
+import org.cedj.geekseek.service.security.test.model.TestUserRepository;
import org.cedj.geekseek.web.rest.core.test.integration.RestCoreDeployments;
import org.cedj.geekseek.web.rest.user.test.integration.UserRestDeployments;
import org.jboss.arquillian.container.test.api.Deployment;
@@ -40,7 +41,8 @@ public static WebArchive deploy() {
WhoAmIResource.class,
SetupAuth.class,
TestApplication.class,
- TestCurrentUserProducer.class)
+ TestCurrentUserProducer.class,
+ TestUserRepository.class)
.addAsLibraries(RestCoreDeployments.root())
.addAsLibraries(UserDeployments.domain())
.addAsLibraries(UserRestDeployments.module())
diff --git a/code/application/service/security/src/test/java/org/cedj/geekseek/service/security/test/model/TestUserRepository.java b/code/application/service/security/src/test/java/org/cedj/geekseek/service/security/test/model/TestUserRepository.java
new file mode 100644
index 0000000..9376b58
--- /dev/null
+++ b/code/application/service/security/src/test/java/org/cedj/geekseek/service/security/test/model/TestUserRepository.java
@@ -0,0 +1,26 @@
+package org.cedj.geekseek.service.security.test.model;
+
+import org.cedj.geekseek.domain.Repository;
+import org.cedj.geekseek.domain.user.model.User;
+
+public class TestUserRepository implements Repository {
+
+ @Override
+ public Class getType() {
+ return null;
+ }
+
+ @Override
+ public User store(User entity) {
+ return null;
+ }
+
+ @Override
+ public User get(String id) {
+ return null;
+ }
+
+ @Override
+ public void remove(User entity) {
+ }
+}
diff --git a/code/application/service/smtp/src/test/java/org/cedj/geekseek/service/smtp/test/integration/SMTPMailServiceTestCase.java b/code/application/service/smtp/src/test/java/org/cedj/geekseek/service/smtp/test/integration/SMTPMailServiceTestCase.java
index b44b85d..8da4176 100644
--- a/code/application/service/smtp/src/test/java/org/cedj/geekseek/service/smtp/test/integration/SMTPMailServiceTestCase.java
+++ b/code/application/service/smtp/src/test/java/org/cedj/geekseek/service/smtp/test/integration/SMTPMailServiceTestCase.java
@@ -4,7 +4,6 @@
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.STEPS;
import java.io.File;
-import java.net.InetAddress;
import java.util.concurrent.BrokenBarrierException;
import java.util.concurrent.CyclicBarrier;
import java.util.concurrent.TimeUnit;
@@ -22,7 +21,7 @@
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.arquillian.junit.InSequence;
import org.jboss.arquillian.test.api.ArquillianResource;
-import org.jboss.as.controller.PathAddress;
+import org.jboss.as.arquillian.container.ManagementClient;
import org.jboss.as.controller.client.ModelControllerClient;
import org.jboss.as.controller.operations.common.Util;
import org.jboss.dmr.ModelNode;
@@ -61,7 +60,8 @@ public static WebArchive getApplicationDeployment() {
addClasses(SMTPMailService.class, MailMessageBuilder.class,
SMTPMailServiceConstants.class, SMTPMessageConsumer.class, SMTPServerService.class)
.addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml")
- .addAsWebInfResource("META-INF/geekseek-smtp-queue-jms.xml");
+ .addAsWebInfResource("META-INF/geekseek-smtp-queue-jms.xml")
+ .addClass(ManagementClient.class);
System.out.println(war.toString(true));
return war;
}
@@ -93,7 +93,7 @@ public static WebArchive getApplicationDeployment() {
@RunAsClient
@InSequence(value = 1)
@Test
- public void configureAppServer() throws Exception {
+ public void configureAppServer(@ArquillianResource ManagementClient managementClient) throws Exception {
/*
* First configure a JavaMail Session for the Server to bind into JNDI; this
@@ -101,7 +101,7 @@ public void configureAppServer() throws Exception {
* the server before it was started to point to a real SMTP server
*/
- final ModelControllerClient client = ModelControllerClient.Factory.create(InetAddress.getLoopbackAddress(), 9999);
+ final ModelControllerClient client = managementClient.getControllerClient();
final ModelNode composite = Util.getEmptyOperation(COMPOSITE, new ModelNode());
final ModelNode steps = composite.get(STEPS);
@@ -135,8 +135,6 @@ public void configureAppServer() throws Exception {
System.out.println("Configure mail service :" + client.execute(composite));
- client.close();
-
/*
* With the config all set and dependencies in place, now we can deploy
*/
@@ -148,9 +146,9 @@ public void configureAppServer() throws Exception {
@RunAsClient
@InSequence(value = 3)
@Test
- public void resetAppServerConfig()
+ public void resetAppServerConfig(@ArquillianResource ManagementClient managementClient)
throws Exception {
- final ModelControllerClient client = ModelControllerClient.Factory.create(InetAddress.getLoopbackAddress(), 9999);
+ final ModelControllerClient client = managementClient.getControllerClient();
deployer.undeploy(DEPLOYMENT_NAME);
@@ -175,8 +173,6 @@ public void resetAppServerConfig()
// Find from the WildFly team a better notification mechanism upon which to wait
// https://github.com/arquillian/continuous-enterprise-development/issues/66
//no longer needed since WildFly 8 CR1
-
- client.close();
}
/*