Update of /cvsroot/krysalis/krysalis-version/src/ant/org/krysalis/version/ant/environment
In directory sc8-pr-cvs1:/tmp/cvs-serv20761/src/ant/org/krysalis/version/ant/environment
Modified Files:
EnvironmentTask.java EnvironmentCheckTask.java
Log Message:
1) Renamed filename to (more descriptive) output
2) Work on Analyzer (detecting environment differences).
Index: EnvironmentTask.java
===================================================================
RCS file: /cvsroot/krysalis/krysalis-version/src/ant/org/krysalis/version/ant/environment/EnvironmentTask.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** EnvironmentTask.java 2 Nov 2003 22:11:12 -0000 1.16
--- EnvironmentTask.java 3 Nov 2003 22:29:48 -0000 1.17
***************
*** 90,98 ****
*/
public class EnvironmentTask extends AntTask {
private boolean m_xml = false;
//:TODO: Add to tests, add dest/file, add overWrite
private boolean m_annotated = false;
private int m_displayWidth = 50;
! private File m_output = new File("version-environment.xml");
//:TODO: Option to ignore JVM entries (e.g. sun.*, org.w3c., java.*)
--- 90,100 ----
*/
public class EnvironmentTask extends AntTask {
+ public static final String DEFAULT_OUTPUT = "version-environment.xml";
+
private boolean m_xml = false;
//:TODO: Add to tests, add dest/file, add overWrite
private boolean m_annotated = false;
private int m_displayWidth = 50;
! private File m_output = new File(DEFAULT_OUTPUT);
//:TODO: Option to ignore JVM entries (e.g. sun.*, org.w3c., java.*)
Index: EnvironmentCheckTask.java
===================================================================
RCS file: /cvsroot/krysalis/krysalis-version/src/ant/org/krysalis/version/ant/environment/EnvironmentCheckTask.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** EnvironmentCheckTask.java 22 Oct 2003 01:47:10 -0000 1.4
--- EnvironmentCheckTask.java 3 Nov 2003 22:29:49 -0000 1.5
***************
*** 56,59 ****
--- 56,60 ----
package org.krysalis.version.ant.environment;
+ import java.io.File;
import java.util.Iterator;
***************
*** 73,76 ****
--- 74,78 ----
public class EnvironmentCheckTask extends AntTask {
private boolean m_haltOnFailure = true;
+ private File m_environment = new File(EnvironmentTask.DEFAULT_OUTPUT);
/**
***************
*** 84,91 ****
VersionRuntime runtime = VersionRuntime.getRuntime();
! AnnotationScratchpad review = runtime.reviewEnvironment();
m_ant.logScratchpad(review);
ConstraintResultSet resultSet = runtime.checkEnvironment();
--- 86,113 ----
VersionRuntime runtime = VersionRuntime.getRuntime();
! //
! // Compare against environment
! //
! if (m_environment.exists()) {
! AnnotationScratchpad comparison =
! runtime.compareEnvironment(m_environment.getAbsolutePath());
+ logScratchpad(comparison);
+
+ if (comparison.hasErrors())
+ throw new BuildException(
+ "Failed environment comparison",
+ getLocation());
+ }
+
+ //
+ // Review environment
+ //
+ AnnotationScratchpad review = runtime.reviewEnvironment();
m_ant.logScratchpad(review);
+ //
+ // Check environment
+ //
ConstraintResultSet resultSet = runtime.checkEnvironment();
***************
*** 142,144 ****
--- 164,180 ----
m_haltOnFailure = b;
}
+ /**
+ * @return
+ */
+ public File getEnvironment() {
+ return m_environment;
+ }
+
+ /**
+ * @param file
+ */
+ public void setEnvironment(File file) {
+ m_environment = file;
+ }
+
}
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.