Skip to content

Instantly share code, notes, and snippets.

@nblair
nblair / gist:4675409
Created January 30, 2013 18:21
Scheduling Assistant war deploy on JBoss 7.1.1.Final
12:17:51,117 INFO [org.jboss.as.server.deployment] (MSC service thread 1-7) JBAS015876: Starting deployment of "scheduling-assistant.war"
12:18:00,196 WARN [org.jboss.as.server.deployment] (MSC service thread 1-3) Class Path entry activation.jar in "/C:/java/jboss/jboss-as-7.1.1.Final/bin/content/scheduling-assistant.war/WEB-INF/lib/mail-1.4.1.jar" does not point to a valid jar for a Class-Path reference.
12:18:00,201 WARN [org.jboss.as.server.deployment] (MSC service thread 1-3) Class Path entry xml-apis.jar in "/C:/java/jboss/jboss-as-7.1.1.Final/bin/content/scheduling-assistant.war/WEB-INF/lib/serializer-2.7.1.jar" does not point to a valid jar for a Class-Path reference.
12:18:00,206 WARN [org.jboss.as.server.deployment] (MSC service thread 1-3) Class Path entry xercesImpl.jar in "/C:/java/jboss/jboss-as-7.1.1.Final/bin/content/scheduling-assistant.war/WEB-INF/lib/xalan-2.7.1.jar" does not point to a valid jar for a Class-Path reference.
12:18:00,216 WARN [org.jboss.as.server.deployment] (MSC serv
<?xml version="1.0" encoding="UTF-8"?>
<datasources xmlns="http://www.jboss.org/ironjacamar/schema">
<datasource
jndi-name="java:jdbc/SchedulingAssistantDatabase"
enabled="true"
jta="false" use-ccm="false"
use-java-context="true" pool-name="SchedulingAssistantDatabasePool">
<!--
<connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}bwtzsvrdb</connection-url>
-->
@nblair
nblair / build.xml
Created October 9, 2015 15:52
An analogue to the Maven release process using Phing for PHP.
<project name="some-php-project" default="main">
<!-- this script requires http://pear.php.net/package/VersionControl_Git and https://pear.php.net/package/HTTP_Request2/ -->
<!-- build.properties needs to contain 'nexus.username' and 'nexus.password' properties, MUST be .gitignore'd -->
<property file="build.properties" />
<property name="primary.repository" value="git@somewhere.com:group/some-php-project.git" override="false" />
<property name="targetDir" value="target" override="true" />
<property name="groupId" value="com/company/some-php-project" override="false"/>
<property name="repositoryHost" value="https://someartifactrepo.company.com" override="false"/>
@nblair
nblair / pom.xml fragment
Created October 28, 2015 16:13
Maven pom.xml profile fragment to disable doclint on JDK 8 and later.
<profiles>
<profile>
<id>disable-doclint-on-java8</id>
<activation>
<jdk>[1.8,)</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@nblair
nblair / passphrase-warmup.sh
Created October 29, 2015 12:45
Simple script one can use to interact with gpg-agent; useful to cache your passphrase before running Maven Release that includes the maven-gpg-plugin
#!/bin/sh
echo 'this file exists solely to interact with gpg-agent, it and the .asc file can be deleted' > gpg-agent-warmup.txt
gpg2 -ab gpg-agent-warmup.txt
rm -f gpg-agent-warmup.txt gpg-agent-warmup.txt.asc
@nblair
nblair / git.migrate
Created November 20, 2015 19:08 — forked from niksumeiko/git.migrate
Moving git repository and all its branches, tags to a new remote repository keeping commits history
#!/bin/bash
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
#
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
#
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.
@nblair
nblair / build.xml
Created November 30, 2015 20:14
Phing build file for publishing snapshot build to any Maven artifact repository
<project name="project-name" default="main">
<!-- Global Build Properties -->
<property file="build.properties" />
<property name="repository.blessed" value="git@somewhere.org:group/project-name.git" override="false" />
<property name="targetDir" value="target" override="true" />
<property name="releaseFilename" value="project-name.tar.gz" override="true" />
<property name="phpunit.coverage" value="false" />
<property name="maven.executable" value="mvn" override="true" />
<property name="project.version" value="1.0.0-SNAPSHOT"/>
@nblair
nblair / UrlRewriteFilterConfiguration.java
Created April 21, 2016 13:21
Spring @configuration for registering an instance of UrlRewriteFilter (see http://tuckey.org/urlrewrite/)
@Configuration
public class UrlRewriteFilterConfiguration {
/**
* Registers a {@link UrlRewriteFilter}.
* Set the init-param on the filter to use slf4j for logging.
*
* Configuration goes in src/main/resources/urlrewrite.xml (root of the classpath).
*
* @return a {@link FilterRegistrationBean} wrapping a {@link UrlRewriteFilter}
*/
@nblair
nblair / build.gradle
Last active August 2, 2016 18:36
Gradle task to include in CI job for pull requests that confirms the contribution sufficiently increments the Gradle version field
buildscript {
dependencies {
classpath "com.github.zafarkhaja:java-semver:0.9.0"
}
}
plugins {
id "org.ajoberstar.grgit" version "1.4.2"
}
@nblair
nblair / build.gradle
Created July 13, 2016 16:53
Gradle task to assist in release management, to be paired with: https://gist.github.com/nblair/53f44e08104354dd078e6104d7dae4a8
/**
* Task executed by Jenkins on merges to master to confirm that we appropriately track the last
* released version.
* Typical commands executed by this Jenkins job, in order:
* 1. gradlew clean updateProjectLast
* 2. git commit -am "Tracking last released version"
* 3. gradlew bootRepackage uploadArchives
*/
task updateProjectLast() {
doLast {