Skip to content

Instantly share code, notes, and snippets.

View mojavelinux's full-sized avatar

Dan Allen mojavelinux

View GitHub Profile
@mojavelinux
mojavelinux / projectleadreport.groovy
Created February 15, 2012 22:33
Create report of JBoss Community project leads
/**
* This script generates a list all the project leads of JBoss Community projects, and the
* projects which they lead, using the issue tracker as the information authority.
*
* TIP: Increase TTL in ~/.groovy/grapeConfig.xml to speed up Groovy Grapes:
*
* <ivysettings>
* <property name="ivy.cache.ttl.default" value="1440m"/>
* ...
* </ivysettings>
@mojavelinux
mojavelinux / AsciiDoc.java
Created March 3, 2012 00:10
Execute AsciiDoc from Java using the Jython Interpreter
import java.io.*;
import javax.script.*;
import org.python.core.PySystemState;
import org.python.core.PyString;
import org.python.util.PythonInterpreter;
/**
* This class executes the AsciiDoc python scripts (asciidoc.py and a2x.py) from
* Java using the Jython interpreter.
*
@mojavelinux
mojavelinux / intro.asciidoc
Created March 6, 2012 05:38
JBoss Forge Intro

JBoss Forge is a command framework, built on standard Java APIs, that enables rapid-application development. It’s primarily a commandline shell that can be extended through plugins, though it also features first-class IDE support in JBoss Tools. Plugins typically generate projects or enhance them incrementally. But really the sky is the limit. You can write a plugin to perform just about any computing function.

@mojavelinux
mojavelinux / proposal.md
Created April 10, 2012 02:54
JavaOne 2012 Proposal: Real Agile: How Real Tests Lead to Real Progress

Conference: JavaOne 2012 Submission Date: Apr 9, 2012

Proposed Title: Real Agile: How Real Tests Lead to Real Progress

Summary:

In this session, we'll explore the concepts of BDD and ATDD together to drive agile development using a powerful trio of testing frameworks: Arquillian Drone, WebDriver and Thucydides. Rather than just test cases, you'll build higher-level, end-to-end functional behavior using reusable web test components and following a clear "given, when, then" perspective. The result: cleaner, clearer tests that both validate your requirements and document your system behavior.

Session type: Session

@mojavelinux
mojavelinux / README.md
Created April 11, 2012 21:59
Using Arquillian without Maven

Using Arquillian without Maven

This project is the end result of the Getting Started Guide, except that the Eclipse project files have been removed and the Maven plugin for copying the dependencies for each container adapter has been added to the respective profile. We'll be using this project merely as a script to download the dependencies from the Maven repository and stuff them into a directory for the purpose of creating a User Library in the IDE.

Dependency export plugin

We add a plugin execution and configuration for the Maven dependency copy plugin to instruct Maven to copy the dependencies a folder in the build directory.

Here's the plugin definition that's added inside the main build element that gets inherited by all profiles:

@mojavelinux
mojavelinux / README.md
Created April 12, 2012 00:20
Creating an Arquillian in-container test on Tomcat 7 (managed)
  • Follow the Using Arquillian without Maven Guide to export the jar files for the Tomcat Managed container adapter
  • Create a User Library named Arquillian Tomcat Managed with the jar files exported by Maven
  • Add the Arquillian Tomcat Managed User Library to the project
  • Edit conf/tomcat-users.xml in the Tomcat installation directory to add a deploy user:
<user username="arquillian" password="arquillian" roles="manager-script"/>
  • Create an arquillian.xml file in the source (or resources) directory in your project to configure the deploy credentials and Tomcat installation directory (unless CATALINA_HOME is already set)
@mojavelinux
mojavelinux / GreeterTest.java
Created April 15, 2012 15:09
Basic Arquillian Test
import static org.junit.Assert.assertEquals;
import javax.ejb.EJB;
import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.junit.Test;
import org.junit.runner.RunWith;
@RunWith(Arquillian.class)
@mojavelinux
mojavelinux / ProjectArtifactDeploymentGenerator.java
Created April 24, 2012 08:00
Arquillian extension idea to use project artifact as deployment
package org.jboss.arquillian.extension.deployment.impl;
import java.io.File;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import org.apache.maven.model.Model;
import org.jboss.arquillian.container.spi.client.deployment.DeploymentDescription;
import org.jboss.arquillian.container.test.spi.client.deployment.DeploymentScenarioGenerator;
@mojavelinux
mojavelinux / projects.textile
Created April 24, 2012 16:01
JBoss Community GSoC projects
  • Implement human task as a process in jBPM5
    • Student: Demian Calcaprina
    • Mentor: salaboy
  • Replace old graphs in RHQ with GWT ones
    • Student: Denis Krusko
    • Mentor: Heiko W. Rupp
  • Automated Visual Verification
    • Student: Jakub Dunia
@mojavelinux
mojavelinux / pom-fragment.xml
Created April 25, 2012 02:13
Maven profile for TomEE embedded, managed and remote adapters
<profile>
<id>arquillian-tomee-embedded</id>
<dependencies>
<dependency>
<groupId>org.apache.openejb</groupId>
<artifactId>arquillian-tomee-embedded</artifactId>
<version>1.0.0</version>
<scope>provided</scope>
</dependency>
</dependencies>