Re: Need some help with running tests

2007-04-18 Thread Supun Kamburugamuva

Hi,

I have copied the Junit dll into the Ant lib directory and the problem
is solved. I have also added the ant – compile generated
TemplateTestBase to the source and now the tests are running ok.
Thanks for the help.

Cheers,
Supun.


On 4/17/07, Will Glass-Husain [EMAIL PROTECTED] wrote:

Hi Supun,

There's a couple of quirks here.  Here's what I think the issue sare:

(1) Ant can't find the junit jar for the junit task.  That's because it
doesn't look in the build classpath.  Solutions (a) Use ant 1.7 which solves
this problem or (b) copy junit.jar into the ant\lib library.

Let us know if this helps.  If this solves the problem I'll add a note to
the documentation about this.

(2) The test velocity files cannot be found.  The junit tests will not run
in an IDE without slight modifications.  The path to the test files is added
by an ant task.  Specifically, TemplateTestBase has constant fields which
define the path to the test files.  These have dummy values by default.
When you run ant compile the entire source tree is copied to a temporary
location and these values are filled in with the current path.  (note to
self: we really need to remove this annoying feature if possible).

Again, two possible solutions.
* Manually edit this class to include the path to your Velocity source
tree.  Probably . will work, though you might need an absolute path.  This
is the easiest approach, though we'll have to be careful not to commit this.

OR (this is what I do).

* Run ant compile which will create the alternate source tree.  Then
configure your IDE to use as the source tree (1) the standard java files (2)
the standard directory of java test files and (3) TemplateTestBase from
bin/test-src  (which has the filled in paths).  Credit to Henning for this
workaround.

WILL


On 4/17/07, Supun Kamburugamuva [EMAIL PROTECTED] wrote:

 Hi,

 I got some problems while trying to run test cases.

 1. When I try to run the tests using Ant build(ant test) I got the
 following error.

 Could not create task or type of type:  junit.  Ant could not find
 the task or a class this task relies upon.

 I'm using ant-1.6.5.

 2.  I have built an IntelliJ Idea project from the current SVN
 checkout of the Velocity Engine. When I try to run some test cases I
 got the following exception.

 org.apache.velocity.exception.ResourceNotFoundException: Unable to
 find resource 'context_safety.vm' 

 Same exception occurs for other test cases where external files are
 required. Some test cases that don't use external files run correctly.

 Cheers,
 Supun.

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




--
Forio Business Simulations

Will Glass-Husain
[EMAIL PROTECTED]
www.forio.com



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[Velocity Wiki] Update of Velocity15ReleaseNotes by WillGlassHusain

2007-04-18 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on Velocity Wiki for 
change notification.

The following page has been changed by WillGlassHusain:
http://wiki.apache.org/velocity/Velocity15ReleaseNotes

--
  
   * There remain various subtle escaping bugs
   * Macros cannot be defined in one file and included with #parse in another.  
See MacroIssues for more information.
+  * If you call VelocityEngine.evaluate() (or use the RenderTool) from within 
a macro and a #foreach loop, you will not be able to access the loop variable. 
See [https://issues.apache.org/jira/browse/VELOCITY-504 Velocity-285].
+  * In order to run ant test with ant 1.6.x, you will need to copy the 
junit.jar into ANT_HOME/lib.  Otherwise, please upgrade to ant 1.7 (which 
access the junit jar from within the Velocity classpath).
  
  === Other Notes ===
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[Velocity Wiki] Update of Velocity15ReleaseNotes by WillGlassHusain

2007-04-18 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on Velocity Wiki for 
change notification.

The following page has been changed by WillGlassHusain:
http://wiki.apache.org/velocity/Velocity15ReleaseNotes

The comment on the change is:
fix typo, reorder

--
  
  There are a few known bugs. See 
[http://issues.apache.org/jira/browse/VELOCITY JIRA] for details.
  
-  * There remain various subtle escaping bugs
+  * In order to run ant test with ant 1.6.x, you will need to copy the 
junit.jar into ANT_HOME/lib.  Otherwise, please upgrade to ant 1.7 (which 
accesses the junit jar from within the Velocity classpath).
   * Macros cannot be defined in one file and included with #parse in another.  
See MacroIssues for more information.
   * If you call VelocityEngine.evaluate() (or use the RenderTool) from within 
a macro and a #foreach loop, you will not be able to access the loop variable. 
See [https://issues.apache.org/jira/browse/VELOCITY-504 Velocity-285].
-  * In order to run ant test with ant 1.6.x, you will need to copy the 
junit.jar into ANT_HOME/lib.  Otherwise, please upgrade to ant 1.7 (which 
access the junit jar from within the Velocity classpath).
+  * There remain various subtle escaping bugs
  
  === Other Notes ===
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [COMMITTERS] rebuilding the various sites

2007-04-18 Thread Will Glass-Husain

Hi Henning,

I'm trying to rebuild the engine docs.  There's a few minor things missing
from your notes which I note below.  (perhaps they are all obvious).  But
I'm still stuck.

(1) You need to set JAVA_HOME

JAVA_HOME=/usr/jdk/latest/
export JAVA_HOME

(2) You need to have mvn in your path
/local/bin/mvn

(3) After calling the script to build the site, you need to go to the site
directory before running maven.

cd /export/home/velocity/deploy/velocity-engine-site/

HOWEVER,

I'm getting an error when I run the following.  Any suggestions?

-bash-3.00$ mvn clean site site:deploy
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'site'.
Downloading:
http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-site-plugin/2.0-beta-6/maven-site-plugin-2.0-beta-6.pom
Downloading:
http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-site-plugin/2.0-beta-6/maven-site-plugin-2.0-beta-6.pom
[INFO]

[ERROR] BUILD ERROR
[INFO]

[INFO] Failed to resolve artifact.

GroupId: org.apache.maven.plugins
ArtifactId: maven-site-plugin
Version: 2.0-beta-6

Reason: Unable to download the artifact from any repository

 org.apache.maven.plugins:maven-site-plugin:pom:2.0-beta-6

from the specified remote repositories:
 central (http://repo1.maven.org/maven2),
 apache.snapshots (http://people.apache.org/repo/m2-snapshot-repository)


[INFO]

[INFO] For more information, run Maven with the -e switch
[INFO]

[INFO] Total time:  1 second
[INFO] Finished at: Thu Apr 19 04:54:13 GMT+00:00 2007
[INFO] Final Memory: 1M/8M
[INFO]



Re: Need some help with running tests

2007-04-18 Thread Will Glass-Husain

Glad that helped.  I've updated the release notes on the Wiki with a note
about this, and am adding the same to the building section in the docs.

WILL

On 4/18/07, Supun Kamburugamuva [EMAIL PROTECTED] wrote:


Hi,

I have copied the Junit dll into the Ant lib directory and the problem
is solved. I have also added the ant – compile generated
TemplateTestBase to the source and now the tests are running ok.
Thanks for the help.

Cheers,
Supun.


On 4/17/07, Will Glass-Husain [EMAIL PROTECTED] wrote:
 Hi Supun,

 There's a couple of quirks here.  Here's what I think the issue sare:

 (1) Ant can't find the junit jar for the junit task.  That's because it
 doesn't look in the build classpath.  Solutions (a) Use ant 1.7 which
solves
 this problem or (b) copy junit.jar into the ant\lib library.

 Let us know if this helps.  If this solves the problem I'll add a note
to
 the documentation about this.

 (2) The test velocity files cannot be found.  The junit tests will not
run
 in an IDE without slight modifications.  The path to the test files is
added
 by an ant task.  Specifically, TemplateTestBase has constant fields
which
 define the path to the test files.  These have dummy values by default.
 When you run ant compile the entire source tree is copied to a
temporary
 location and these values are filled in with the current path.  (note to
 self: we really need to remove this annoying feature if possible).

 Again, two possible solutions.
 * Manually edit this class to include the path to your Velocity source
 tree.  Probably . will work, though you might need an absolute
path.  This
 is the easiest approach, though we'll have to be careful not to commit
this.

 OR (this is what I do).

 * Run ant compile which will create the alternate source tree.  Then
 configure your IDE to use as the source tree (1) the standard java files
(2)
 the standard directory of java test files and (3) TemplateTestBase from
 bin/test-src  (which has the filled in paths).  Credit to Henning for
this
 workaround.

 WILL


 On 4/17/07, Supun Kamburugamuva [EMAIL PROTECTED] wrote:
 
  Hi,
 
  I got some problems while trying to run test cases.
 
  1. When I try to run the tests using Ant build(ant test) I got the
  following error.
 
  Could not create task or type of type:  junit.  Ant could not find
  the task or a class this task relies upon.
 
  I'm using ant-1.6.5.
 
  2.  I have built an IntelliJ Idea project from the current SVN
  checkout of the Velocity Engine. When I try to run some test cases I
  got the following exception.
 
  org.apache.velocity.exception.ResourceNotFoundException: Unable to
  find resource 'context_safety.vm' 
 
  Same exception occurs for other test cases where external files are
  required. Some test cases that don't use external files run correctly.
 
  Cheers,
  Supun.
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 --
 Forio Business Simulations

 Will Glass-Husain
 [EMAIL PROTECTED]
 www.forio.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Forio Business Simulations

Will Glass-Husain
[EMAIL PROTECTED]
www.forio.com