maven-service-plugin/src/main/java/org/lcsim
diff -u -r1.1 -r1.2
--- MavenServicePluginMojo.java 28 Aug 2008 20:21:36 -0000 1.1
+++ MavenServicePluginMojo.java 28 Aug 2008 21:37:54 -0000 1.2
@@ -38,6 +38,7 @@
* Fully qualified name of super class which corresponds to the service, with no default.
*
* @parameter expression="className"
+ * @required
*/
private String className;
@@ -52,8 +53,14 @@
* File containing full classpath that should be used by the services search.
* Generate with <code>mvn dependency:build-classpath</code> saved to <code>target/classpath.txt</code>.
* @parameter expression="classPathFile"
+ * @required
*/
private String classPathFile;
+
+ /**
+ * @parameter expression="${project.build.directory}/${project.build.finalName}.jar"
+ */
+ private String projectJar;
/**
* The ClassLoader that will be used when instantiating classes to test against.
@@ -89,6 +96,7 @@
urlsArr[i] = urls.get(i);
}
loader = new MyURLClassLoader(urlsArr);
+ loader.addURL((new File(projectJar)).toURL());
}
public void execute() throws MojoExecutionException
@@ -97,7 +105,7 @@
if (className == null) throw new RuntimeException("className not set");
if (outputDirectory == null) throw new RuntimeException("outputDirectory not set");
if (classPathFile == null) throw new RuntimeException("classPathFile not set");
-
+
try {
setupClassLoader();
}
@@ -153,14 +161,15 @@
public void handleDirectoryStart(File directory, int depth, Collection results)
{
- try
+/* try
{
+ System.out.println("adding to classpath:" + directory.toURL());
loader.addURL(directory.toURL());
}
catch (Exception x)
{
throw new RuntimeException(x);
- }
+ }*/
}
public void handleFile(File file, int depth, Collection results)