Diff
Modified: java/nanocontainer/trunk/booter/pom.xml (3154 => 3155)
--- java/nanocontainer/trunk/booter/pom.xml 2006-12-27 09:17:12 UTC (rev 3154)
+++ java/nanocontainer/trunk/booter/pom.xml 2006-12-27 09:52:36 UTC (rev 3155)
@@ -1,22 +1,92 @@
<?xml version="1.0" encoding="UTF-8"?>
-<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>org.nanocontainer</groupId>
- <artifactId>nanocontainer-parent</artifactId>
- <version>1.1-SNAPSHOT</version>
- </parent>
- <artifactId>nanocontainer-booter</artifactId>
- <name>NanoContainer Booter</name>
- <packaging>jar</packaging>
- <dependencies>
- <dependency>
- <groupId>${pom.groupId}</groupId>
- <artifactId>nanocontainer</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-cli</groupId>
- <artifactId>commons-cli</artifactId>
- </dependency>
- </dependencies>
+<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>org.nanocontainer</groupId>
+ <artifactId>nanocontainer-parent</artifactId>
+ <version>1.1-SNAPSHOT</version>
+ </parent>
+ <artifactId>nanocontainer-booter</artifactId>
+ <name>NanoContainer Booter</name>
+ <packaging>jar</packaging>
+ <dependencies>
+ <dependency>
+ <groupId>${pom.groupId}</groupId>
+ <artifactId>nanocontainer</artifactId>
+ </dependency>
+ <!-- test scoped dependencies -->
+ <dependency>
+ <groupId>commons-cli</groupId>
+ <artifactId>commons-cli</artifactId>
+ <version>1.0</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>integration-test</phase>
+ <configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <tasks>
+ <jar
+ jarfile="${maven.build.dir}/test-comps/bearimpl.jar">
+ <fileset
+ dir="${maven.build.dir}/test-classes/">
+ <include
+ name="**/BrownBear.class" />
+ </fileset>
+ </jar>
+
+ <jar
+ jarfile="${maven.build.dir}/test-comps/honeyimpl.jar">
+ <fileset
+ dir="${maven.build.dir}/test-classes/">
+ <include
+ name="**/BeeHiveHoney.class" />
+ </fileset>
+ </jar>
+
+ <mkdir
+ dir="${maven.build.dir}/dist/comps/" />
+ <copy
+ todir="${maven.build.dir}/dist/comps">
+ <fileset
+ dir="${maven.build.dir}/test-comps">
+ <include name="*.jar" />
+ </fileset>
+ </copy>
+
+ <copy
+ todir="${maven.build.dir}/nanodist">
+ <fileset dir="src/">
+ <include name="booter.policy" />
+ <include name="composition.*" />
+ </fileset>
+ </copy>
+ <copy
+ todir="${maven.build.dir}/nanodist/lib"
+ file="${maven.build.dir}/${maven.final.name}.jar" />
+ <mkdir
+ dir="${maven.build.dir}/nanodist/comps" />
+ <copy
+ todir="${maven.build.dir}/nanodist/comps">
+ <fileset
+ dir="${maven.build.dir}/test-comps/" />
+ </copy>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
</project>
Modified: java/nanocontainer/trunk/container/pom.xml (3154 => 3155)
--- java/nanocontainer/trunk/container/pom.xml 2006-12-27 09:17:12 UTC (rev 3154)
+++ java/nanocontainer/trunk/container/pom.xml 2006-12-27 09:52:36 UTC (rev 3155)
@@ -17,18 +17,25 @@
<groupId>org.picocontainer</groupId>
<artifactId>picocontainer</artifactId>
</dependency>
+ <!-- optional dependencies -->
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
+ <version>1.0</version>
+ <optional>true</optional>
</dependency>
<dependency>
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
+ <version>1.2.1</version>
+ <exclusions>
+ <exclusion>
+ <groupId>xpp3</groupId>
+ <artifactId>xpp3_min</artifactId>
+ </exclusion>
+ </exclusions>
+ <optional>true</optional>
</dependency>
- <dependency>
- <groupId>xpp3</groupId>
- <artifactId>xpp3_min</artifactId>
- </dependency>
<!-- test scoped dependencies -->
<dependency>
<groupId>org.picocontainer</groupId>
Modified: java/nanocontainer/trunk/container/src/java/org/nanocontainer/Standalone.java (3154 => 3155)
--- java/nanocontainer/trunk/container/src/java/org/nanocontainer/Standalone.java 2006-12-27 09:17:12 UTC (rev 3154)
+++ java/nanocontainer/trunk/container/src/java/org/nanocontainer/Standalone.java 2006-12-27 09:52:36 UTC (rev 3155)
@@ -42,7 +42,7 @@
private static final char QUIET_OPT = 'q';
private static final char NOWAIT_OPT = 'n';
- private static final String DFT_COMP_FILE = "composition.groovy";
+ private static final String DEFAULT_COMPOSITION_FILE = "composition.groovy";
static final Options createOptions() {
Options options = new Options();
@@ -66,17 +66,17 @@
}
public Standalone(String[] args) throws IOException, ClassNotFoundException {
- File dftCompFile = new File(DFT_COMP_FILE);
+ File defaultCompositionFile = new File(DEFAULT_COMPOSITION_FILE);
CommandLine cl = null;
Options options = createOptions();
- if (args.length == 0 && !dftCompFile.exists()) {
+ if (args.length == 0 && !defaultCompositionFile.exists()) {
printUsage(options);
System.exit(-1);
}
try {
cl = getCommandLine(args, options);
} catch (ParseException e) {
- System.out.println("NanoContainer-Standalone: Error in parsing arguments: ");
+ System.out.println("NanoContainer Standalone: Error in parsing arguments: ");
e.printStackTrace();
System.exit(-1);
}
@@ -101,24 +101,24 @@
} else if (compositionResource != null) {
buildAndStartContainer(Standalone.class.getResource(compositionResource), quiet, nowait);
} else {
- if (dftCompFile.exists()) {
- buildAndStartContainer(dftCompFile, quiet, nowait);
+ if (defaultCompositionFile.exists()) {
+ buildAndStartContainer(defaultCompositionFile, quiet, nowait);
} else {
printUsage(options);
System.exit(10);
}
}
} catch (RuntimeException e) {
- System.err.println("NanoContainer-Standalone: Failed to start application. Cause : " + e.getMessage());
+ System.err.println("NanoContainer Standalone: Failed to start application. Cause : " + e.getMessage());
e.printStackTrace();
throw e;
} catch (ClassNotFoundException e) {
- System.err.println("NanoContainer-Standalone: Failed to start application. A Class was not found. Exception message : " + e.getMessage());
+ System.err.println("NanoContainer Standalone: Failed to start application. A Class was not found. Exception message : " + e.getMessage());
e.printStackTrace();
throw e;
}
if (!quiet) {
- System.out.println("NanoContainer-Standalone: Exiting main method.");
+ System.out.println("NanoContainer Standalone: Exiting main method.");
}
}
@@ -182,7 +182,7 @@
e.printStackTrace();
} finally {
if (!quiet) {
- System.out.println("NanoContainer-Standalone: Exiting Virtual Machine");
+ System.out.println("NanoContainer Standalone: Exiting Virtual Machine");
}
}
}
@@ -198,13 +198,13 @@
final StringBuffer usage = new StringBuffer();
usage.append(lineSeparator);
- usage.append("NanoContainer-Standalone: -c <composition-file> [-q|-n|-h|-v]");
+ usage.append("NanoContainer Standalone: -c <composition-file> [-q|-n|-h|-v]");
usage.append(options.getOptions());
System.out.println(usage.toString());
}
private static void printVersion() {
- System.out.println("1.0");
+ System.out.println("1.1");
}
Modified: java/nanocontainer/trunk/container/src/java/org/nanocontainer/script/xml/XStreamComponentInstanceFactory.java (3154 => 3155)
--- java/nanocontainer/trunk/container/src/java/org/nanocontainer/script/xml/XStreamComponentInstanceFactory.java 2006-12-27 09:17:12 UTC (rev 3154)
+++ java/nanocontainer/trunk/container/src/java/org/nanocontainer/script/xml/XStreamComponentInstanceFactory.java 2006-12-27 09:52:36 UTC (rev 3155)
@@ -8,11 +8,13 @@
*****************************************************************************/
package org.nanocontainer.script.xml;
-import com.thoughtworks.xstream.XStream;
-import com.thoughtworks.xstream.io.xml.DomReader;
import org.picocontainer.PicoContainer;
import org.w3c.dom.Element;
+import com.thoughtworks.xstream.XStream;
+import com.thoughtworks.xstream.io.xml.DomDriver;
+import com.thoughtworks.xstream.io.xml.DomReader;
+
/**
* Implementation of XMLComponentInstanceFactory that uses
* XStream to unmarshal DOM elements.
@@ -30,7 +32,7 @@
* of XStream
*/
public XStreamComponentInstanceFactory(){
- this(new XStream());
+ this(new XStream(new DomDriver()));
}
/**
Modified: java/nanocontainer/trunk/pom.xml (3154 => 3155)
--- java/nanocontainer/trunk/pom.xml 2006-12-27 09:17:12 UTC (rev 3154)
+++ java/nanocontainer/trunk/pom.xml 2006-12-27 09:52:36 UTC (rev 3155)
@@ -157,33 +157,8 @@
<artifactId>nanocontainer-booter</artifactId>
<version>${pom.version}</version>
</dependency>
- <!-- optional dependencies -->
+ <!-- Test scoped dependencies -->
<dependency>
- <groupId>commons-cli</groupId>
- <artifactId>commons-cli</artifactId>
- <version>1.0</version>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>com.thoughtworks.xstream</groupId>
- <artifactId>xstream</artifactId>
- <version>1.2.1</version>
- <exclusions>
- <exclusion>
- <groupId>xpp3</groupId>
- <artifactId>xpp3</artifactId>
- </exclusion>
- </exclusions>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>xpp3</groupId>
- <artifactId>xpp3_min</artifactId>
- <version>1.1.3.4.O</version>
- <optional>true</optional>
- </dependency>
- <!-- Test scoped dependencies -->
- <dependency>
<groupId>org.picocontainer</groupId>
<artifactId>picocontainer-gems</artifactId>
<version>1.2</version>
Modified: java/nanocontainer/trunk/testmodel/pom.xml (3154 => 3155)
--- java/nanocontainer/trunk/testmodel/pom.xml 2006-12-27 09:17:12 UTC (rev 3154)
+++ java/nanocontainer/trunk/testmodel/pom.xml 2006-12-27 09:52:36 UTC (rev 3155)
@@ -8,11 +8,6 @@
</parent>
<artifactId>nanocontainer-testmodel</artifactId>
<name>NanoContainer Test Model</name>
- <scm>
- <connection>scm:svn:https://svn.codehaus.org/picocontainer/java/nanocontainer/trunk/testmodel</connection>
- <developerConnection>scm:svn:https://svn.codehaus.org/scm/picocontainer/java/nanocontainer/trunk/testmodel</developerConnection>
- <url>https://svn.codehaus.org/picocontainer/java/nanocontainer/trunk/testmodel</url>
- </scm>
<dependencies>
<dependency>
<groupId>org.picocontainer</groupId>