Revision: 6467
http://squirrel-sql.svn.sourceforge.net/squirrel-sql/?rev=6467&view=rev
Author: manningr
Date: 2011-10-30 20:02:16 +0000 (Sun, 30 Oct 2011)
Log Message:
-----------
Manually resolve the basedir of the project. This prevents a bug that occurs when the plugin is run as part of a childs build in a parent's reactor build and basedir in that case is the parent's, not the child's.
Modified Paths:
--------------
trunk/maven-plugin-workspace/squirrelsql-update-site-plugin/src/main/java/net/sf/squirrel_sql/BuildUpdateSiteMojo.java
Modified: trunk/maven-plugin-workspace/squirrelsql-update-site-plugin/src/main/java/net/sf/squirrel_sql/BuildUpdateSiteMojo.java
===================================================================
--- trunk/maven-plugin-workspace/squirrelsql-update-site-plugin/src/main/java/net/sf/squirrel_sql/BuildUpdateSiteMojo.java 2011-10-30 18:14:41 UTC (rev 6466)
+++ trunk/maven-plugin-workspace/squirrelsql-update-site-plugin/src/main/java/net/sf/squirrel_sql/BuildUpdateSiteMojo.java 2011-10-30 20:02:16 UTC (rev 6467)
@@ -40,6 +40,7 @@
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.project.MavenProject;
/**
* Goal which builds the update site from a directory which is specified as an argument.
@@ -109,6 +110,13 @@
{
this.updateSitePath = updateSitePath;
}
+
+ /**
+ * @parameter default-value="${project}"
+ * @required
+ * @readonly
+ */
+ private MavenProject project;
/**
* Does the main work provided by this plugin.
@@ -271,7 +279,7 @@
}
private PrintWriter getBatchFileWriter(String releaseName) throws FileNotFoundException {
- PrintWriter result = new PrintWriter("target/batch.txt");
+ PrintWriter result = new PrintWriter(project.getBasedir()+"/target/batch.txt");
result.println(getCdModulePathOnServer(releaseName, null));
result.println("put target/release/release.xml");
return result;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|