You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@buildr.apache.org by Jabbar <aj...@gmail.com> on 2008/02/05 00:35:49 UTC
A few problems with my build, ear package and testng tests
Hello again,
I have a build file that builds a multiple artifact project using the
ear task and some test ng code. After running buildr(latest from
trunk(4/2/2008) package I get the following application.xml file in my
ear project
-------------------------------------------------------------------------------------------------------------------------
<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE
Application 1.2//EN"
"http://java.sun.com/j2ee/dtds/application_1_2.dtd">
<application>
<display-name>projectpermissions</display-name>
<module id="projectpermissions-ejbproj">
<ejb>:/ejb/projectpermissions-ejbproj-1.0.jar</ejb>
</module>
<module id="projectpermissions-war">
<web>
<web-uri>:/war/projectpermissions-war-1.0.war</web-uri>
<context-root>/projectpermissions-war</context-root>
</web>
</module>
</application>
--------------------------------------------------------------------------------------------------------------------------
Note the <ejb>:/ejb/projectpermissions-ejbproj-1.0.jar</ejb> and
<web-uri>:/war/projectpermissions-war-1.0.war</web-uri>. I don't
understand the presence of :/ejb and :/war
In addition I have one test class and the following error is generated
everytime I do a build
D:\work\projectpermissions>buildr package
(in D:/work/projectpermissions, development)
Building projectpermissions
Testing projectpermissions
Testing projectpermissions:ejb-client
Testing projectpermissions:ejbproj
Running tests in projectpermissions:ejbproj
Running com.ajazam.SimpleTest
[Parser] Running:
projectpermissions:ejbproj
[[Utils]] The filename, directory name, or volume label syntax is incorrect
java.io.FileNotFoundException:
D:\work\projectpermissions\ejbproj\reports\testng\projectpermissions:ejbproj\Command
line
test.xml (The filename, directory name, or volume label syntax is incorrect)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
at java.io.FileWriter.<init>(FileWriter.java:73)
at org.testng.reporters.JUnitXMLReporter.generateReport(JUnitXMLReporter.java:149)
at org.testng.reporters.JUnitXMLReporter.onFinish(JUnitXMLReporter.java:111)
at org.testng.TestRunner.fireEvent(TestRunner.java:871)
at org.testng.TestRunner.afterRun(TestRunner.java:699)
at org.testng.TestRunner.run(TestRunner.java:484)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:278)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:273)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:253)
at org.testng.SuiteRunner.run(SuiteRunner.java:168)
at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:987)
at org.testng.TestNG.runSuitesLocally(TestNG.java:951)
at org.testng.TestNG.run(TestNG.java:719)
at org.testng.TestNG.privateMain(TestNG.java:1019)
at org.testng.TestNG.main(TestNG.java:997)
failed to create JUnitXML because of java.io.FileNotFoundException:
D:\work\projectpermissions\ejbproj\reports\testng\pr
ojectpermissions:ejbproj\Command line test.xml (The filename,
directory name, or volume label syntax is incorrect)
===============================================
projectpermissions:ejbproj
Total tests run: 1, Failures: 0, Skips: 0
===============================================
Couldn't find resource on the class path: testng.css
[[Utils]] The filename, directory name, or volume label syntax is incorrect
[[Utils]] The filename, directory name, or volume label syntax is incorrect
[[Utils]] The filename, directory name, or volume label syntax is incorrect
[[Utils]] The filename, directory name, or volume label syntax is incorrect
[[Utils]] The filename, directory name, or volume label syntax is incorrect
[[Utils]] The filename, directory name, or volume label syntax is incorrect
[[Utils]] The filename, directory name, or volume label syntax is incorrect
[[Utils]] The filename, directory name, or volume label syntax is incorrect
[[Utils]] The filename, directory name, or volume label syntax is incorrect
[[Utils]] The filename, directory name, or volume label syntax is incorrect
[[Utils]] The filename, directory name, or volume label syntax is incorrect
Testing projectpermissions:war
Packaging projectpermissions
Running integration tests...
Completed in 1.156s
My project build file is
require "buildr"
VERSION_NUMBER = "1.0"
#--------------------------------
#tapestry project compile dependencies
#compile
TAPESTRY5 = ["org.apache.tapestry:tapestry-core:jar:5.0.9"]
COMMONS_CODEC = ["commons-codec:commons-codec:jar:1.3"]
TAPESTRY_ANNOTATIONS = ["org.apache.tapestry:tapestry-annotations:jar:5.0.9"]
#provided
TAPESTRY_IOC = ["org.apache.tapestry:tapestry-ioc:jar:5.0.9"]
SERVLET_API = ["javax.servlet:servlet-api:jar:2.4"]
EASYMOCK = ["org.easymock:easymock:jar:2.3"]
#---------------------------------
#--------------------------------
#tapestry project transitive dependencies
#compile
JAVAASSIST = ["jboss:javassist:jar:3.6.ga"]
LOG4J = ["log4j:log4j:jar:1.2.14"]
SLF4J_API = ["org.slf4j:slf4j-api:jar:1.4.3"]
SLF4J_LOG4J12 = ["org.slf4j:slf4j-log4j12:jar:1.4.3"]
#provided
JUNIT = ["junit:junit:jar:3.8.1"]
SELENIUM=["org.openqa.selenium.client-drivers:selenium-java-client-driver:jar:0.8.1"]
SELENIUM_SERVER=["org.openqa.selenium.server:selenium-server:jar:0.8.1"]
TESTNG=["org.testng:testng:jar:jdk15:5.7"]
#--------------------------------
JEE5 = ["javaee:javaee-api:jar:5"]
TAPESTRY_COMPILE = [TAPESTRY5, COMMONS_CODEC, TAPESTRY_ANNOTATIONS,
JAVAASSIST, SLF4J_API, SLF4J_LOG4J12]
TAPESTRY_PROVIDED = [SERVLET_API, EASYMOCK, JUNIT, SELENIUM,
SELENIUM_SERVER, TESTNG, LOG4J]
TAPESTRY_INCLUDE = TAPESTRY_COMPILE, TAPESTRY_IOC
repositories.remote << "http://repo1.maven.org/maven2"
repositories.remote << "http://tapestry.formos.com/maven-snapshot-repository"
repositories.remote << "http://mirrors.ibiblio.org/pub/mirrors/maven2"
repositories.remote << "http://ibiblio.lsu.edu/main/pub/packages/maven2"
repositories.remote << "http://maven.openqa.org"
repositories.remote << "http://repository.jboss.com/maven2"
repositories.remote << "http://download.java.net/maven/1"
PERSISTENCE = ["jboss:jboss-persistence-api:jar:3.0.0-SNAPSHOT"]
EJB = ["jboss:jboss-ejb-api:jar:4.2.0.GA"]
define 'projectpermissions' do
project.version = VERSION_NUMBER
project.group = "acme"
manifest["Copyright"] = "Jabbar Azam (C) 2008"
compile.options.target = "1.5"
test.using :testng
define 'war' do
compile.with TAPESTRY_COMPILE, TAPESTRY_PROVIDED,
TAPESTRY_INCLUDE, project('ejb-client')
package(:war).with :libs=>TAPESTRY_INCLUDE
end
define 'ejb-client' do
compile.with JEE5
package(:jar)
end
define 'ejbproj' do
compile.with project('ejb-client'), JEE5
package(:jar)
end
package(:ear).add :ejb=>project('ejbproj').package(:jar),:path=>'/',
:display_name=>'ejbproj'
package(:ear).add project('war').package('war'), :context_root =>
'/',:path=>'/', :display_name=>'war'
package(:ear).add project('ejb-client').package(:jar)
#package(:ear).map[:ejb]=nil
#package(:ear).map[:war]=nil
end
Anybody got any ideas? I'm not very good with ruby, otherwise I would
have a go at debugging the ruby. Right now crappy old ant( or Gant )
with ivy looks tempting :(
--
Thanks
A Jabbar Azam
Re: A few problems with my build, ear package and testng tests
Posted by Jabbar <aj...@gmail.com>.
Assaf,
Thanks for that. I'll give this a go tonight. I can't wait :)
On 05/02/2008, Victor Hugo Borja <vi...@gmail.com> wrote:
> On Feb 4, 2008 5:35 PM, Jabbar <aj...@gmail.com> wrote:
>
> > Note the <ejb>:/ejb/projectpermissions-ejbproj-1.0.jar</ejb> and
> > <web-uri>:/war/projectpermissions-war-1.0.war</web-uri>. I don't
> > understand the presence of :/ejb and :/war
> >
>
> This bug was caused on Windows systems by the following line
> (java/packaging.rb:375)
>
>
>
> uri = File.expand_path(File.join(comp[:path],
> File.basename(comp[:artifact].to_s)),
> '/')[1..-1]
> Fix for it is already included in patch 0001 at
> https://issues.apache.org/jira/browse/BUILDR-26?focusedCommentId=12565656#action_12565656
>
> --
> vic
>
> Quaerendo invenietis.
>
--
Thanks
A Jabbar Azam
Re: A few problems with my build, ear package and testng tests
Posted by Victor Hugo Borja <vi...@gmail.com>.
Jabbar,
On Feb 6, 2008 2:19 AM, Jabbar <aj...@gmail.com> wrote:
> Unfortunately when the build is running the tests, I get an error (I
> am using windows xp sp1)
>
> [[Utils]] The filename, directory name, or volume label syntax is
> incorrect
> java.io.FileNotFoundException:
>
> D:\work\projectpermissions\ejbproj\reports\testng\projectpermissions:ejbproj\Command
> lin
> test.xml (The filename, directory name, or volume label syntax is
> incorrect)
> at java.io.FileOutputStream.open(Native Method)
> failed to create JUnitXML because of java.io.FileNotFoundException:
> D:\work\projectpermissions\ejbproj\reports\testng\p
> ojectpermissions:ejbproj\Command line test.xml (The filename,
> directory name, or volume label syntax is incorrect)
>
> Is this a bug? I can't see anything in jira for this! Sorry to be a pain
> ...
Yes, certainly it's another Windows related bug. Could you please create a
JIRA issue for this, including output generated with --trace.
I guess many test cases might be failing on windows because of bad
path/filename handling we might fix them ASAP.
--
vic
Quaerendo invenietis.
Re: A few problems with my build, ear package and testng tests
Posted by Jabbar <aj...@gmail.com>.
Hello Victor,
I have just updated buildr from trunk (r618921) and now I am getting
an ear that works, without having to modify application.xml.
Unfortunately when the build is running the tests, I get an error (I
am using windows xp sp1)
D:\work\projectpermissions>buildr package
(in D:/work/projectpermissions, development)
Building projectpermissions
Testing projectpermissions
Testing projectpermissions:ejb-client
Testing projectpermissions:ejbproj
Running tests in projectpermissions:ejbproj
Running com.ajazam.SimpleTest
[Parser] Running:
projectpermissions:ejbproj
[[Utils]] The filename, directory name, or volume label syntax is incorrect
java.io.FileNotFoundException:
D:\work\projectpermissions\ejbproj\reports\testng\projectpermissions:ejbproj\Command
lin
test.xml (The filename, directory name, or volume label syntax is incorrect)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
at java.io.FileWriter.<init>(FileWriter.java:73)
at org.testng.reporters.JUnitXMLReporter.generateReport(JUnitXMLReporter.java:149)
at org.testng.reporters.JUnitXMLReporter.onFinish(JUnitXMLReporter.java:111)
at org.testng.TestRunner.fireEvent(TestRunner.java:871)
at org.testng.TestRunner.afterRun(TestRunner.java:699)
at org.testng.TestRunner.run(TestRunner.java:484)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:278)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:273)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:253)
at org.testng.SuiteRunner.run(SuiteRunner.java:168)
at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:987)
at org.testng.TestNG.runSuitesLocally(TestNG.java:951)
at org.testng.TestNG.run(TestNG.java:719)
at org.testng.TestNG.privateMain(TestNG.java:1019)
at org.testng.TestNG.main(TestNG.java:997)
failed to create JUnitXML because of java.io.FileNotFoundException:
D:\work\projectpermissions\ejbproj\reports\testng\p
ojectpermissions:ejbproj\Command line test.xml (The filename,
directory name, or volume label syntax is incorrect)
===============================================
projectpermissions:ejbproj
Total tests run: 1, Failures: 0, Skips: 0
===============================================
Couldn't find resource on the class path: testng.css
[[Utils]] The filename, directory name, or volume label syntax is incorrect
[[Utils]] The filename, directory name, or volume label syntax is incorrect
[[Utils]] The filename, directory name, or volume label syntax is incorrect
[[Utils]] The filename, directory name, or volume label syntax is incorrect
[[Utils]] The filename, directory name, or volume label syntax is incorrect
[[Utils]] The filename, directory name, or volume label syntax is incorrect
[[Utils]] The filename, directory name, or volume label syntax is incorrect
[[Utils]] The filename, directory name, or volume label syntax is incorrect
[[Utils]] The filename, directory name, or volume label syntax is incorrect
[[Utils]] The filename, directory name, or volume label syntax is incorrect
[[Utils]] The filename, directory name, or volume label syntax is incorrect
Testing projectpermissions:war
Packaging projectpermissions
Running integration tests...
Completed in 1.515s
Is this a bug? I can't see anything in jira for this! Sorry to be a pain ...
On 05/02/2008, Victor Hugo Borja <vi...@gmail.com> wrote:
> On Feb 4, 2008 5:35 PM, Jabbar <aj...@gmail.com> wrote:
>
> > Note the <ejb>:/ejb/projectpermissions-ejbproj-1.0.jar</ejb> and
> > <web-uri>:/war/projectpermissions-war-1.0.war</web-uri>. I don't
> > understand the presence of :/ejb and :/war
> >
>
> This bug was caused on Windows systems by the following line
> (java/packaging.rb:375)
>
>
>
> uri = File.expand_path(File.join(comp[:path],
> File.basename(comp[:artifact].to_s)),
> '/')[1..-1]
> Fix for it is already included in patch 0001 at
> https://issues.apache.org/jira/browse/BUILDR-26?focusedCommentId=12565656#action_12565656
>
> --
> vic
>
> Quaerendo invenietis.
>
--
Thanks
A Jabbar Azam
Re: A few problems with my build, ear package and testng tests
Posted by Victor Hugo Borja <vi...@gmail.com>.
On Feb 4, 2008 5:35 PM, Jabbar <aj...@gmail.com> wrote:
> Note the <ejb>:/ejb/projectpermissions-ejbproj-1.0.jar</ejb> and
> <web-uri>:/war/projectpermissions-war-1.0.war</web-uri>. I don't
> understand the presence of :/ejb and :/war
>
This bug was caused on Windows systems by the following line
(java/packaging.rb:375)
uri = File.expand_path(File.join(comp[:path],
File.basename(comp[:artifact].to_s)),
'/')[1..-1]
Fix for it is already included in patch 0001 at
https://issues.apache.org/jira/browse/BUILDR-26?focusedCommentId=12565656#action_12565656
--
vic
Quaerendo invenietis.