Skip to content

Instantly share code, notes, and snippets.

@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;
@kpiwko
kpiwko / gist:2502823
Created April 26, 2012 20:29
ShrinkWrap Maven Resolver Use Cases
package org.jboss.shrinkwrap.resolver.test;
import java.io.File;
import org.jboss.shrinkwrap.api.Archive;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.WebArchive;
import org.jboss.shrinkwrap.resolver.api.DependencyResolvers;
import org.jboss.shrinkwrap.resolver.api.maven.Maven;
import org.jboss.shrinkwrap.resolver.api.maven.MavenConfigurationTypes;
@kpiwko
kpiwko / shrinkwrap-resolver-use-cases.asciidoc
Last active December 29, 2021 08:51
ShrinkWrap Resolvers Use Cases

ShrinkWrap Resolvers

Introduction to ShrinkWrap Resolvers

Often we don’t control the construction of these libraries, and we certainly shouldn’t be in the business of re-assembling them (and hence further differentiating our tests from the our production runtime deployments). With the advent of Maven and other build systems, typically thirdparty libraries and our own dependent modules are obtained from a backing software repository. In this case we supply a series of coordinates which uniquely identifies an artifact in the repository, and resolve the target files from there.

That is precisely the aim of the ShrinkWrap Resolvers project; it is a Java API to obtain artifacts from a repository system. Currently implemented are grammars and support for Maven-based repository structures (this is separate from the use of Maven as a project management system or build tool; it’s possible to use a Maven repository layout with other build systems).

ShrinkWrap Resolvers is comprised of the following module

@jonathanconway
jonathanconway / radioTabbable.ng.js
Last active April 5, 2019 14:03
Angular Directive that makes individual radio-buttons focusable using the keyboard only. (Useful for accessibility, on a case-by-case basis.)
/**
* @ngdoc directive
* @name radioTabbable
* @requires none
* @description
* Makes individual radio buttons focuseable using the TAB key.
* (By default, pressing TAB while on a radio button would have shifted focus to the next control outside of the radio group.)
* @usage
* <input type="radio" name="radioGroup" value="0" radio-tabbable="" />
* <input type="radio" name="radioGroup" value="1" radio-tabbable="" />