Skip to content

Instantly share code, notes, and snippets.

View garystafford's full-sized avatar
💭
Happily Coding!

Gary A. Stafford garystafford

💭
Happily Coding!
View GitHub Profile
@garystafford
garystafford / Beans.xml
Last active December 26, 2015 06:49
Spring configuration file from blog post 'Spring Integration with Eclipse Using Maven'
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
<bean id="vehicle1" class="com.blogpost.maven.maven_spring.Vehicle">
<property name="make" value="Mercedes-Benz" />
<property name="model" value="ML550" />
@garystafford
garystafford / pom.xml
Created October 23, 2013 01:15
Project Object Model (POM) file from blog post 'Spring Integration with Eclipse Using Maven'
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.blogpost.maven</groupId>
<artifactId>maven-spring</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>maven-spring</name>
@garystafford
garystafford / pom.xml
Last active December 26, 2015 11:49
Project Object Model (POM) file from blog post 'Build a Continuous Deployment System with Maven, Hudson, WebLogic Server, and JUnit': http://wp.me/p1RD28-HV
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.blogpost</groupId>
<artifactId>HelloWorldMaven</artifactId>
<version>1.0</version>
<packaging>war</packaging>
<name>HelloWorldMaven</name>
@garystafford
garystafford / maven.properties
Created October 25, 2013 00:32
Java properties file containing WebLogic Server properties, from blog post 'Build a Continuous Deployment System with Maven, Hudson, WebLogic Server, and JUnit': http://wp.me/p1RD28-HV.
# weblogic-maven-plugin configuration values for Oracle VM environment
wls.adminurl=t3://192.168.1.88:7031
wls.user=weblogic
wls.password=welcome1
wls.upload=true
wls.remote=false
wls.verbose=true
wls.middlewareHome=/labs/wls1211
wls.name=HelloWorldMaven
@garystafford
garystafford / weblogic_maven_plugin_windows.bat
Last active December 26, 2015 11:59
Installing weblogic-maven-plugin on Windows, from blog post 'Build a Continuous Deployment System with Maven, Hudson, WebLogic Server, and JUnit'
cd %MW_HOME%/wlserver/server/lib
java -jar wljarbuilder.jar -profile weblogic-maven-plugin
mkdir c:\tmp
copy weblogic-maven-plugin.jar c:\tmp
cd c:\tmp
jar xvf c:\tmp\weblogic-maven-plugin.jar META-INF/maven/com.oracle.weblogic/weblogic-maven-plugin/pom.xml
mvn install:install-file -DpomFile=META-INF/maven/com.oracle.weblogic/weblogic-maven-plugin/pom.xml -Dfile=c:\tmp\weblogic-maven-plugin.jar
@garystafford
garystafford / weblogic_maven_plugin_Linux.sh
Last active December 26, 2015 11:59
Installing weblogic-maven-plugin on a Oracle VM, from blog post 'Build a Continuous Deployment System with Maven, Hudson, WebLogic Server, and JUnit'
cd $MW_HOME/wlserver_12.1/server/lib
java -jar wljarbuilder.jar -profile weblogic-maven-plugin
mkdir /home/oracle/tmp
cp weblogic-maven-plugin.jar /home/oracle/tmp
cd /home/oracle/tmp
jar xvf weblogic-maven-plugin.jar META-INF/maven/com.oracle.weblogic/weblogic-maven-plugin/pom.xml
mvn install:install-file -DpomFile=META-INF/maven/com.oracle.weblogic/weblogic-maven-plugin/pom.xml -Dfile=weblogic-maven-plugin.jar
@garystafford
garystafford / ActorInfo.java
Last active December 26, 2015 16:09
ActorInfo entity class from my blog post, 'Java RESTful Web Services Using MySQL Server, EclipseLink, and Jersey': http://wp.me/p1RD28-Cf
package com.mysql.entities;
import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
@garystafford
garystafford / persistence.xml
Created October 27, 2013 03:17
Persistence Unit (persistence.xml) from my blog post, 'Java RESTful Web Services Using MySQL Server, EclipseLink, and Jersey': http://wp.me/p1RD28-Cf
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
<persistence-unit name="MySQLDemoServicePU" transaction-type="JTA">
<jta-data-source>jdbc/mysql_sakila</jta-data-source>
<class>com.mysql.entities.Actor</class>
<class>com.mysql.entities.ActorInfo</class>
<class>com.mysql.entities.Film</class>
<class>com.mysql.entities.FilmActor</class>
<class>com.mysql.entities.Language</class>
<exclude-unlisted-classes>true</exclude-unlisted-classes>
@garystafford
garystafford / NameStorageBeanTest.java
Created November 1, 2013 02:07
NameStorageBeanTest source code from my blog post, 'Automated Deployment to GlassFish Using Jenkins CI Server and Apache Ant': http://wp.me/p1RD28-2I.
package helloworld;
import javax.ejb.embeddable.EJBContainer;
import javax.naming.NamingException;
import org.junit.*;
import static org.junit.Assert.assertEquals;
/**
*
* @author Gary A. Stafford
@garystafford
garystafford / jenkins-glassfish-deploy.xml
Last active December 27, 2015 03:29
jenkins-glassfish-deploy Ant target from my blog post, 'Automated Deployment to GlassFish Using Jenkins CI Server and Apache Ant': http://wp.me/p1RD28-2I.
<!-- Older style. Not what is in repo on GitHub. -->
<target name="jenkins-glassfish-deploy"
description="Clean, build, test and deploy application to GlassFish">
<antcall target="clean">
<antcall target="default">
<antcall target="test">
<exec failonerror="true" executable="cmd" description="Deploy to GlassFish">
<arg value="/c" />
<arg value="asadmin --echo=true --host=localhost --port=4848 --user=admin
--passwordfile=pwdfile_domain1 --secure=false