Update of /cvsroot/squirrel-sql/./mavenize
In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv7407/mavenize
Added Files:
mavenize.pl root-pom.xml plugin-pom.xml.tmpl app-pom.xml
test-log4j.properties plugin-module-pom.xml.tmpl fw-pom.xml
Log Message:
Script and supporting projects / poms for building SQuirreL with Maven. Currently this produces 3.1.0-SNAPSHOT artifact jars for all SQuirreL modules / plugins. Still need to incorporate IzPack plugin to build installer.
--- NEW FILE: plugin-module-pom.xml.tmpl ---
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>net.sourceforge.squirrel_sql</groupId>
<artifactId>plugins</artifactId>
<name>Plugin Modules POM file</name>
<version>3.1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
{$modules}
</modules>
</project>
--- NEW FILE: mavenize.pl ---
#! /usr/bin/perl -w
#
# This script is intended to automate the conversion of SQuirreL SQL Client from using Ant for builds to Maven 2.
# It is anticipated that it will take some months to fully switch the build which currently produces multiple platform
# installers, pushes updated artifacts to an update site, and uploads installers and source archives to SourceForge.
# Rather than do the conversion by hand and risk inconsistencies in the many pom files, I decided that a script to
# automate would be more desireable. When the converted projects can completely replicate the automated release and
# distribution process that is currently done by Ant, this script will be run one final time against a new project
# repository hosted in subversion, to make it easier to relocate files without losing their history. Then, since
# the script will no longer be needed, it will be removed and no longer used.
#
# RMM 20090808
#
#
use File::Find;
use Text::Template;
$mavenizeDir = `pwd`;
$mavenizeDir =~ s/\s//g;
$topDir = "/home/manningr/projects/squirrel_maven2/sql12";
$pluginsDir = $topDir . "/plugins";
# copy in the root pom - this pom builds all of SQuirreL
`cp root-pom.xml $topDir/pom.xml`;
# copy in the test utilities project - I nix'd this since there were dependency issues
# with BaseSQuirreLJUnit4TestCase depending on fw's LoggerController. It proved to be
# too difficult to move BaseSQuirreLJUnit4TestCase out of the fw module.
#`cp -r squirrelsql-test-utils $topDir`;
# copy in plugins support projects
`cp -r squirrelsql-plugins-assembly-descriptor $pluginsDir`;
`cp -r squirrelsql-plugins-parent-pom $pluginsDir`;
# restructure fw module
$fwDir = $topDir . "/fw";
`cp fw-pom.xml $fwDir/pom.xml`;
`cp test-log4j.properties $fwDir/src/test/resources/log4j.properties`;
`mkdir -p $fwDir/src/main/java`;
`mkdir -p $fwDir/src/main/resources`;
`mkdir -p $fwDir/src/test/java`;
`cp -r $fwDir/src/net $fwDir/src/main/java`;
chdir("$fwDir/src") or die "Couldn't change directory to $fwDir/src: $!\n";
`find . -name *.properties -printf "%h\n" | grep -v main | xargs -i mkdir -p main/resources/{}`;
`find . -type f -name *.properties -print | grep -v main | xargs -i cp {} main/resources/{}`;
`find . -name *.gif -printf "%h\n" | grep -v main | xargs -i mkdir -p main/resources/{}`;
`find . -type f -name *.gif -print | grep -v main | xargs -i cp {} main/resources/{}`;
`find . -name *.png -printf "%h\n" | grep -v main | xargs -i mkdir -p main/resources/{}`;
`find . -type f -name *.png -print | grep -v main | xargs -i cp {} main/resources/{}`;
chdir($mavenizeDir) or die "Couldn't change directory to $mavenizeDir: $!\n";
# restructure app module
$appDir = $topDir . "/app";
`cp app-pom.xml $appDir/pom.xml`;
`mkdir -p $appDir/src/main/java`;
`mkdir -p $appDir/src/main/resources`;
`mkdir -p $appDir/src/test/java`;
`cp -r $appDir/src/net $appDir/src/main/java`;
chdir("$appDir/src") or die "Couldn't change directory to $appDir/src: $!\n";
`find . -name *.properties -printf "%h\n" | grep -v "^./main" | xargs -i mkdir -p main/resources/{}`;
`find . -type f -name *.properties -print | grep -v "^./main" | xargs -i cp {} main/resources/{}`;
`find . -name *.gif -printf "%h\n" | grep -v "^./main" | xargs -i mkdir -p main/resources/{}`;
`find . -type f -name *.gif -print | grep -v "^./main" | xargs -i cp {} main/resources/{}`;
`find . -name *.png -printf "%h\n" | grep -v "^./main" | xargs -i mkdir -p main/resources/{}`;
`find . -type f -name *.png -print | grep -v "^./main" | xargs -i cp {} main/resources/{}`;
`find . -name "*.xml" -printf "%h\n" | grep -v "^./main" | xargs -i mkdir -p main/resources/{}`;
`find . -type f -name "*.xml" -print | grep -v "^./main" | xargs -i cp {} main/resources/{}`;
`find $appDir/src/main/java -name *.properties | xargs -i rm {}`;
`find $appDir/src/main/java -name "*.xml" | xargs -i rm {}`;
chdir($mavenizeDir) or die "Couldn't change directory to $mavenizeDir: $!\n";
$cache_deps = <<"EOF";
<dependencies>
<dependency>
<groupId>com.intersystems.cachedb</groupId>
<artifactId>CacheDB</artifactId>
<version>2008.2.0.526.0</version>
</dependency>
</dependencies>
EOF
$firebirdmanager_deps = <<"EOF";
<dependencies>
<dependency>
<groupId>org.firebird</groupId>
<artifactId>jaybird-full</artifactId>
<version>2.1.1</version>
</dependency>
</dependencies>
EOF
$isqlj_deps = <<"EOF";
<dependencies>
<dependency>
<groupId>org.rege</groupId>
<artifactId>isqlj.jar</artifactId>
<version>1.8</version>
</dependency>
</dependencies>
EOF
$laf_deps = <<"EOF";
<dependencies>
<dependency>
<groupId>com.jgoodies</groupId>
<artifactId>looks</artifactId>
<version>2.2.1</version>
</dependency>
</dependencies>
EOF
$oracle_deps = <<"EOF";
<dependencies>
<dependency>
<groupId>com.sun</groupId>
<artifactId>treetable</artifactId>
<version>20040121</version>
</dependency>
</dependencies>
EOF
$sqlval_deps = <<"EOF";
<dependencies>
<dependency>
<groupId>axis</groupId>
<artifactId>axis</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>axis</groupId>
<artifactId>axis-jaxrpc</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>axis</groupId>
<artifactId>axis-saaj</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>axis</groupId>
<artifactId>axis-wsdl4j</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>com.techtrader</groupId>
<artifactId>tt-bytecode</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
EOF
$syntax_deps = <<"EOF";
<dependencies>
<dependency>
<groupId>org.netbeans</groupId>
<artifactId>openide</artifactId>
<version>041121</version>
</dependency>
<dependency>
<groupId>org.netbeans</groupId>
<artifactId>org-netbeans-modules-editor</artifactId>
<version>041121</version>
</dependency>
<dependency>
<groupId>org.netbeans</groupId>
<artifactId>org-netbeans-modules-editor-fold</artifactId>
<version>041121</version>
</dependency>
<dependency>
<groupId>org.netbeans</groupId>
<artifactId>org-netbeans-modules-editor-lib</artifactId>
<version>041121</version>
</dependency>
<dependency>
<groupId>org.netbeans</groupId>
<artifactId>org-netbeans-modules-editor-util</artifactId>
<version>041121</version>
</dependency>
<dependency>
<groupId>com.ostermiller</groupId>
<artifactId>syntax</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
EOF
$plugin_pom_template = Text::Template->new(DELIMITERS => [ '@@--' , '--@@' ], TYPE => 'FILE', SOURCE => 'plugin-pom.xml.tmpl');
# Recurse through the plugin directories to find "plugin_build.xml" - this time to create the pom.xml files
find( { wanted => \&wanted_for_poms, no_chdir => 1 }, $pluginsDir);
$modules = "\t<module>squirrelsql-plugins-parent-pom</module>\n";
$modules .= "\t<module>squirrelsql-plugins-assembly-descriptor</module>\n";
for $artifact (sort @artifacts) {
$modules .= "\t<module>$artifact</module>\n";
}
$pluginsDir =~ s/\s//g;
$modulespomfile = $pluginsDir . '/pom.xml';
print "Creating modules pom file ( $modulespomfile ) with modules: \n$modules";
# Create the plugins module pom file
open (MODULEPOMFILE,"> $modulespomfile")
or die "Couldn't open file ($modulespomfile): $!\n";
$plugin_module_pom_template = Text::Template->new(TYPE => 'FILE', SOURCE => 'plugin-module-pom.xml.tmpl');
print MODULEPOMFILE $plugin_module_pom_template->fill_in();
close(MODULEPOMFILE);
# Recurse through the plugin directories to find "plugin_build.xml" - this time to copy source code under /src/main/java
find( { wanted => \&wanted_for_source, no_chdir => 0 }, $pluginsDir);
# Recurse through all source directories to find java files to build package map so that test files can be relocated.
find( { wanted => \&wanted_for_packagemap, no_chdir => 0 }, $topDir);
# Recurse through all test source tree to find java unit test files to copy to the projects under src/main/test
find( { wanted => \&wanted_for_testsources, no_chdir => 0 }, $topDir . "/test/src");
sub wanted_for_poms {
if ( $_ !~ 'plugin_build.xml' ) {
return;
}
$newPomFile = $File::Find::dir . "/" . 'pom.xml';
@parts = split /\//, $File::Find::dir;
$artifactId = $parts[$#parts];
$artifactId =~ s/\.\///;
push @artifacts, $artifactId;
$pluginName = "$artifactId Plugin";
$pluginName =~ s/\b(\w)/\u$1/g;
$pluginDescription = $pluginName;
print "Creating new pom: $newPomFile \n\t artifactId=$artifactId \n\t name=$pluginName \n\t description=$pluginDescription\n";
if ($artifactId =~ 'cache') {
$dependencies = $cache_deps;
} elsif ($artifactId =~ 'firebirdmanager') {
$dependencies = $firebirdmanager_deps;
} elsif ($artifactId =~ 'isqlj') {
$dependencies = $isqlj_deps;
} elsif ($artifactId =~ 'laf') {
$dependencies = $laf_deps;
} elsif ($artifactId =~ 'oracle') {
$dependencies = $oracle_deps;
} elsif ($artifactId =~ 'sqlval') {
$dependencies = $sqlval_deps;
} elsif ($artifactId =~ 'syntax') {
$dependencies = $syntax_deps;
} else {
$dependencies = '';
}
open (POMFILE, "> $newPomFile");
my %vars = ( artifactId => $artifactId,
pluginName => $pluginName,
pluginDescription => $pluginDescription,
dependencies => $dependencies );
my $result = $plugin_pom_template->fill_in(HASH => \%vars);
print POMFILE $result;
close(POMFILE);
}
sub wanted_for_source {
if ( $_ =~ 'plugin_build.xml') {
chdir('./src') or die "Couldn't change to src directory in $File::Find::dir : $!\n";
print "Removing main directory in $File::Find::dir\n";
`rm -rf main`;
`rm -rf test`;
# Java source files into src/main/java
print "Creating main/java directory and sub-directories\n";
`find . -type d | grep -v CVS | xargs -i mkdir -p main/java/{}`;
print "Copying source files into main/java sub-tree\n";
`find . -type f -name *.java -print | grep -v CVS | xargs -i cp {} main/java/{}`;
# Properties files into src/main/resources
print "Creating main/resources directory and sub-directories\n";
`find . -name *.properties -printf "%h\n" | xargs -i mkdir -p main/resources/{}`;
print "Copying properties files into main/resources sub-tree\n";
`find . -type f -name *.properties -print | grep -v CVS | xargs -i cp {} main/resources/{}`;
# *.gif image files into src/main/resources
print "Copying image files (*.gif) into main/resources sub-tree\n";
`find . -type f -name *.gif -printf "%h\n" | grep -v CVS | xargs -i mkdir -p main/resources/{}`;
`find . -type f -name *.gif -print | grep -v CVS | xargs -i cp {} main/resources/{}`;
# *.jpg image files into src/main/resources
print "Copying image files (*.jpg) into main/resources sub-tree\n";
`find . -type f -name *.jpg -printf "%h\n" | grep -v CVS | xargs -i mkdir -p main/resources/{}`;
`find . -type f -name *.jpg -print | grep -v CVS | xargs -i cp {} main/resources/{}`;
# *.png image files into src/main/resources
print "Copying image files (*.png) into main/resources sub-tree\n";
`find . -type f -name *.png -printf "%h\n" | grep -v CVS | xargs -i mkdir -p main/resources/{}`;
`find . -type f -name *.png -print | grep -v CVS | xargs -i cp {} main/resources/{}`;
chdir('..');
if (-d 'doc') {
`cp -r doc src/main/resources`;
}
}
}
# Need to go through the source, build map for packages. When this is done,
# the $packagemap hash will contain every package found in any Java source file
# as a key and the value of each being the category it was found in (app, fw or plugins).
# The goal is to be able to take each test and relocate it to it's appropriate place
# in the source tree.
sub wanted_for_packagemap {
if ($_ !~ /\.java$/) {
return;
}
$package = getPackageFromFile($File::Find::name);
@parts = split /src/, $File::Find::name;
if ($parts[0] =~ /app\/$/) {
#print "Found an app package: $package\n\tfor $File::Find::name\n";
$packagemap->{$package} = "app";
} elsif ($parts[0] =~ /fw\/$/) {
#print "Found an fw package: $package\n\tfor $File::Find::name\n";
$packagemap->{$package} = "fw";
} elsif ($File::Find::name =~ /plugins/) {
#print "Found a plugin package: $package\n\tfor $File::Find::name\n";
$packagemap->{$package} = "plugin";
} elsif ($parts[0] =~ /build\/$/) {
#print "Found a build package: $package\n\tfor $File::Find::name\n";
} elsif ($File::Find::name =~ /sql12\/test/) {
# ignore test files during this pass
} elsif ($File::Find::name =~ /sql12\/squirrelsql-test-utils/) {
# ignore maven test utilities project
} else {
print "Unable to categorize package of file: $File::Find::name\n";
exit 1;
}
}
sub wanted_for_testsources {
if ($_ !~ /\.java$/) {
return;
}
$package = getPackageFromFile($File::Find::name);
$category = $packagemap->{$package};
# the following three checks are being made because there are test classes
# that live in a package that no source classes live in.
if ($package eq 'utils') {
$category = 'fw';
}
if ($package eq 'net.sourceforge.squirrel_sql') {
$category = 'fw';
}
if ($package eq 'net.sourceforge.squirrel_sql.fw') {
$category = 'fw';
}
if ($package eq 'net.sourceforge.squirrel_sql.test') {
$category = 'fw';
}
if ($package =~ /^'net.sourceforge.squirrel_sql.plugins.'/) {
$category = 'plugin';
}
if (!defined $category) {
print "No category found for package $package\n";
exit 1;
}
$relativeDir = convertPackageToDirectory($package);
if ($category eq 'app') {
#print "copying test $File::Find::name to app folder $relativeDir\n";
`mkdir -p $appDir/src/test/java/$relativeDir`;
`cp $File::Find::name $appDir/src/test/java/$relativeDir`;
} elsif ($category eq 'fw') {
#print "copying test $File::Find::name to fw folder $relativeDir\n";
`mkdir -p $fwDir/src/test/java/$relativeDir`;
`cp $File::Find::name $fwDir/src/test/java/$relativeDir`;
} elsif ($category eq 'plugin') {
#if (! defined $onetimeonly) {
#$onetimeonly = 1;
print "relativeDir: $relativeDir\n";
@parts = split /plugins\//, $relativeDir;
$pluginName = $parts[1];
if (! defined $pluginName) {
# Hack : currently, only firebird tests have a package which doesn't contain the "plugins" package.
$pluginName = "firebird";
}
print "pluginName: $pluginName\n";
`mkdir -p $pluginsDir/$pluginName/src/test/java/$relativeDir`;
`cp $File::Find::name $pluginsDir/$pluginName/src/test/java/$relativeDir`;
print "Copied $File::Find::name to $pluginsDir/$pluginName/src/test/java/$relativeDir\n";
#}
}
}
sub getPackageFromFile {
$file = shift;
open(FILE, $file);
@lines = <FILE>;
close(FILE);
$package = "";
foreach $line (@lines) {
if ($line =~ /^package/) {
@pkgparts = split /\s/, $line;
$package = $pkgparts[1];
chop($package);
last;
}
}
return $package;
}
sub convertPackageToDirectory {
$package = shift;
$package =~ s/\./\//g;
return $package;
}
--- NEW FILE: root-pom.xml ---
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>net.sourceforge.squirrel_sql</groupId>
<artifactId>squirrel-root-pom</artifactId>
<packaging>pom</packaging>
<name>SQuirreL Root POM</name>
<description>The top-most POM file for building SQuirreL</description>
<version>3.1.0-SNAPSHOT</version>
<properties>
<javac-source-version>1.6</javac-source-version>
<javac-target-version>1.6</javac-target-version>
<checkstyle-plugin-version>2.2</checkstyle-plugin-version>
<findbugs-plugin-version>2.1</findbugs-plugin-version>
<pmd-plugin-version>2.4</pmd-plugin-version>
</properties>
<modules>
<module>fw</module>
<module>app</module>
<module>plugins</module>
</modules>
</project>
--- NEW FILE: plugin-pom.xml.tmpl ---
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>net.sourceforge.squirrel_sql</groupId>
<artifactId>squirrelsql-plugins-parent-pom</artifactId>
<version>3.1.0-SNAPSHOT</version>
</parent>
<groupId>net.sourceforge.squirrel_sql</groupId>
<artifactId>@@--$artifactId--@@</artifactId>
<name>@@--$pluginName--@@</name>
<version>3.1.0-SNAPSHOT</version>
<description>@@--$pluginDescription--@@</description>
@@--$dependencies--@@
<build>
<plugins>
<plugin>
<artifactId>maven-source-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-pmd-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-checkstyle-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
--- NEW FILE: fw-pom.xml ---
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>net.sourceforge.squirrel_sql</groupId>
<artifactId>fw</artifactId>
<name>Framework Library</name>
<version>3.1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<parent>
<groupId>net.sourceforge.squirrel_sql</groupId>
<artifactId>squirrel-root-pom</artifactId>
<version>3.1.0-SNAPSHOT</version>
</parent>
<dependencies>
<dependency>
<groupId>antlr</groupId>
<artifactId>antlr</artifactId>
<version>2.7.5</version>
</dependency>
<dependency>
<groupId>asm</groupId>
<artifactId>asm-attrs</artifactId>
<version>1.5.3</version>
</dependency>
<dependency>
<groupId>asm</groupId>
<artifactId>asm</artifactId>
<version>1.5.3</version>
</dependency>
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib</artifactId>
<version>2.1_3</version>
</dependency>
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>2.1.1</version>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
<version>3.1</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.0.4</version>
</dependency>
<dependency>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>1.6.1</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-annotations</artifactId>
<version>3.3.0.ga</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-commons-annotations</artifactId>
<version>3.3.0.ga</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>3.3.1.ga</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>3.2.4.sp1</version>
<exclusions>
<exclusion>
<groupId>javax.transaction</groupId>
<artifactId>jta</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>net.sourceforge.jexcelapi</groupId>
<artifactId>jxl</artifactId>
<version>2.6.3</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.15</version>
<exclusions>
<exclusion>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
</exclusion>
<exclusion>
<groupId>javax.jms</groupId>
<artifactId>jms</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jdmk</groupId>
<artifactId>jmxtools</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jmx</groupId>
<artifactId>jmxri</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>be.cyberelf.nanoxml</groupId>
<artifactId>nanoxml</artifactId>
<version>2.2.3</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>2.5.2</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>2.5.2</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<version>2.5.2</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>2.5.2</version>
</dependency>
<dependency>
<groupId>org.antlr</groupId>
<artifactId>stringtemplate</artifactId>
<version>3.1-b1</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.6</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
<version>2.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymockclassextension</artifactId>
<version>2.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>gsbase</groupId>
<artifactId>gsbase</artifactId>
<version>2.0.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<!-- http://maven.apache.org/plugins/maven-compiler-plugin/ -->
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.2</version>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
--- NEW FILE: app-pom.xml ---
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>net.sourceforge.squirrel_sql</groupId>
<artifactId>app</artifactId>
<name>SQuirreL Main Application Jar</name>
<version>3.1.0-SNAPSHOT</version>
<parent>
<groupId>net.sourceforge.squirrel_sql</groupId>
<artifactId>squirrel-root-pom</artifactId>
<version>3.1.0-SNAPSHOT</version>
</parent>
<dependencies>
<dependency>
<groupId>net.sourceforge.squirrel_sql</groupId>
<artifactId>fw</artifactId>
<version>3.1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>net.sourceforge.squirrel_sql</groupId>
<artifactId>fw</artifactId>
<version>3.1.0-SNAPSHOT</version>
<type>test-jar</type>
</dependency>
<dependency>
<groupId>jgoodies</groupId>
<artifactId>forms</artifactId>
<version>1.0.1</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
<version>2.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymockclassextension</artifactId>
<version>2.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>gsbase</groupId>
<artifactId>gsbase</artifactId>
<version>2.0.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>2.5.2</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<!-- http://maven.apache.org/plugins/maven-compiler-plugin/ -->
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.2</version>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
--- NEW FILE: test-log4j.properties ---
log4j.rootLogger=FATAL, stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%5p [%c] %m%n
|