Re: test data location question
use getResource to get the URL of the resource and then parsethe URL to find the file path On 07/05/2009, Pete Siemsen siem...@ucar.edu wrote: That seems reasonable, but I still don't understand how to make it work. The program I'm trying to test is like a compiler. It reads source files that can contain include statements. When it parses such a statement, the program needs to open the include file and start parsing statements in the include file. If I use getResourceAsStream, what can I do when I encounter the include statement? How can I open the include file if I can't specify the path that leads to the include file, relative to the initial input stream? As I wrote, the program is working just fine. It reads a file name from the command line. My question is how to test it within the maven framework, without specifying absolute test file names. Cheers, -- Pete On May 5, 2009, at 3:55 PM, Jeff MAURY wrote: You should store your files under src/test/resources and load your files using getResourceAsStream Regards Jeff MAURY On Tue, May 5, 2009 at 11:37 PM, Pete Siemsen siem...@ucar.edu wrote: This is a basic question about how to run Java unit tests that require file names. I use maven to develop a program that reads input file names from the command line. It's working fine, but now I want to share the code with someone else. The test programs live in ../src/test/ java, and the test data lives in ../src/test/data. Until now, I've used fully-qualified paths hard-coded into my test programs, like / Users/siemsen/TranslateCIM/src/test/data/cim/ testArrayTypeOnNonArray/testATONA.mof. If I tar up my development directory and give it to someone else, the fully-qualified paths obviously don't work. I want to make the paths relative somehow. The program reads an input file that may contain include statements that cause the program to open other files relative to the first input file. It seems to my newbie eyes that using resources and getResourceAsStream won't allow me to open subfiles. What I think I want is a runtime environment variable or something that tells me the path to the maven development directory. Any suggestion would be appreciated. -- Pete - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Transitive and inherited dependencies - potential bug, or my misunderstanding of the mechanism
This is really a symptom of the nearest-wins mentality of Maven 2, since scopes specified in the current POM take precedence over their transitive values, and not widened as expected. AFAIK Mercury will replace nearest-wins version conflict resolution with a more usable highest-wins, so I was hoping that it'd also take a similar approach with scope conflicts and always widen them, irrespective of where they are defined. Perhaps Oleg could clarify? Cheers, Mark 2009/5/7 Brian Fox bri...@infinity.nu: I think this will help you understand it better: Think of inheritance as including the contents of the parents inside your own pom. (obviously merging occurs). I used to be a C programmer so I refer to this as #include-ing the contents. Therefore the result of inheritance is that it updates your local pom. Things declared in your local pom always superceede transitive, thus the behavior seems to be correct. So to restate the problem, you are using in one module a jar LIB that you only need in your tests, but transitively you depend on something which needs LIB at runtime and thus it should be packed into your war? If so, just flip your dependency to a compile scope since this is also included in test classpaths. This is generally an unusual scenario, I don't think it's solved yet with Mercury. My suggestion is to provide a sample project as an IT and write up an issue for this. On Wed, May 6, 2009 at 5:29 AM, Stevo Slavić ssla...@gmail.com wrote: Hello Maven users, If a parent module (e.g. P) of a multi module project defines a test scope dependency to some library (e.g. library LIB), and if one of projects's child modules which inherit P (e.g. jar module A) defines compile scope dependency to the same (LIB) library, and if some other child module which also inherits P (e.g. war module B) defines compile scope dependency on module A, then (at least when using maven 2.1.0) library LIB does not get included in war of module B. It seems that scope (in this example test scope) of inherited dependency wins over scope (in this example compile scope) of transitive dependency. This looks like a bug to me (maybe just in maven-war-plugin:2.1-beta-1, or maven-dependency-plugin:2.1) - even though module B (through inheritance) defines LIB as test scope dependency but on the other hand it's dependency defines same LIB as compile scope dependency so LIB should be included in module B war. Currently a workaround is to explicitly define compile time dependency to LIB in module B, even though it doesn't make direct use of the LIB. As subject states, maybe I've misunderstood the dependency resolution mechanism. Attached is example project which demonstrates the issue. Regards, Stevo. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Unknown source for assertion in surefire driven JUnit test with Tellurium
Hi, I've started looking at the Tellurium web testing framework. I'm using their template with Maven, Surefire and JUnit to drive the tests. It's very easy to test it, just follow this guide. http://code.google.com/p/aost/wiki/TenMinutesToTellurium What happens is that when I have an assertion failure the JVM (?) doesn't provide the source file and line number! See stacktrace (1) This leads to a number of issues, i.e. you can't build reports. See stacktrace (2) I can't see that anything Tellurium-specific goes on here and neither can the Tellurium maintainer. Does anyone have a clue what might be causing this? Using surefire 2.4.3. Regards /Ernst Persson (1) more target/surefire-reports/test.SomethingTestCase.txt --- Test set: test.SomethingTestCase --- Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 18.251 sec FAILURE! testDuplicateName(test.SomethingTestCase) Time elapsed: 2.231 sec FAILURE! java.lang.AssertionError: expected not same at org.junit.Assert.fail(Assert.java:74) at org.junit.Assert.failSame(Assert.java:437) at org.junit.Assert.assertNotSame(Assert.java:420) at org.junit.Assert.assertNotSame(Assert.java:430) at test.SomethingTestCase.testDuplicateName(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59) at org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98) at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79) at org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87) at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77) at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42) at org.junit.internal.runners.JUnit4ClassRunner.invokeTestMethod(JUnit4ClassRunner.java:88) at org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51) at org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44) at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27) at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37) at org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42) at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127) at org.apache.maven.surefire.Surefire.run(Surefire.java:177) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345) at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009) (2) [ERROR] FATAL ERROR [INFO] [INFO] String index out of range: -1 [INFO] [INFO] Trace java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1938) at org.apache.maven.plugins.surefire.report.SurefireReportGenerator.getErrorLineNumber(SurefireReportGenerator.java:638) at org.apache.maven.plugins.surefire.report.SurefireReportGenerator.constructFailureDetails(SurefireReportGenerator.java:600) at org.apache.maven.plugins.surefire.report.SurefireReportGenerator.doGenerateReport(SurefireReportGenerator.java:111) at org.apache.maven.plugins.surefire.report.SurefireReportMojo.executeReport(SurefireReportMojo.java:180) at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:98) at org.apache.maven.plugins.site.ReportDocumentRenderer.renderDocument(ReportDocumentRenderer.java:139) at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderModule(DefaultSiteRenderer.java:269) at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.render(DefaultSiteRenderer.java:101)
Re: Transitive and inherited dependencies - potential bug, or my misunderstanding of the mechanism
Mark Hobson wrote at Freitag, 8. Mai 2009 11:05: This is really a symptom of the nearest-wins mentality of Maven 2, since scopes specified in the current POM take precedence over their transitive values, and not widened as expected. AFAIK Mercury will replace nearest-wins version conflict resolution with a more usable highest-wins, so I was hoping that it'd also take a similar approach with scope conflicts and always widen them, irrespective of where they are defined. Perhaps Oleg could clarify? This would be the show stopper for me for ever using Mercury. If I narrow the scope in the local POM it is done *because I want it so*, e.g. preventing compile time deps to a specific implementation that's hidden behind an interface. - Jörg - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
setup maven2 with icefaces
Hi folks, I'm triing since a few days to setup an maven2-project in eclipse using icefaces. Unfortunatly I fail to get a running example. My problem is that the examples for icefaces aren't provided for maven2. Specially with the dependencies I have a lot of problems. Is anybody here who already setup a running iceface-project for eclipse using maven? I'm very interested in the web.xml an the pom-file.. I'm running out of ideas - sorry. Maybe someone can help me? -- View this message in context: http://n2.nabble.com/setup-maven2-with-icefaces-tp2844860p2844860.html Sent from the maven users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
[ANN] Flexmojos 3.2 Released
Hi people, I released last night the latest version of flexmojos, version 3.2.0. Release notes: https://issues.sonatype.org/browse/FLEXMOJOS/fixforversion/10296 This release was mainly focused on improving the unit test support. The greatest new is for Linux headless machines (CI servers). Now flexmojos will automatically launch Xvfb to run the tests. It is only necessary to have xvfb-run installed. https://docs.sonatype.org/display/FLEXMOJOS/Running+unit+tests Fork mode for unit test is now configurable. configuration forkModeonce/forkMode!-- valid values once and always, default once -- /configuration Fork once means all unit test classes will be compiled into a single SWF file, and all tests will be run at once. Fork always means one SWF per unit test classes. This is very helpful on automated UI tests using flexmonkey. Changes on html-wrapper mojo too, it does now interpolate all files on the template. On previous versions it only interpolate the index.template.html. Optimization is now available to SWF projects too. Now, if for any reason you need to optimize your SWF that can be done using optimizer mojo. That is it. For 3.3 we are planning some improvements on ActionScript generation. Stay tunned. VELO
General questions regarding dependencies
Hello, I'm rather new to Maven, but I've been working through the Maven: The Definitive Guide, 1st Edition book. I've been fairly successful so far making Java and Groovy projects and adding dependencies. I've even got it working with Eclipse, which for various reasons was rather painful. I have some questions about how dependencies are handled within Maven. I understand that when you add a dependency that Maven looks at the central repository, finds the correct files and downloads them. I'm wondering if this can only be done for JAR/WAR files? For the record, I'm a ColdFusion/CFML developer. ColdFusion applications are made up of a collection of CFML files. These files are compiled to Java byte code at runtime and executed by the Java server. ColdFusion itself is really just a servlet that handles this process for you. The thing is, there are a number of ColdFusion frameworks that are commonly used. There's a framework similar to Spring called ColdSpring, there's an MVC framework called Model-Glue (which has a dependency on ColdSpring), and there are a few ORM frameworks to choose frome. A framework in CF are really just a directory filled with various CFML files. There isn't a concept like a JAR file in CF. So, if I wanted to use a framework in my application the simplest way to do it is simply copy it into the root of my application. My question then is, is it possible to somehow define a dependency which is a collection of files? Also, if I did somehow define that dependency, is there a way to make sure that the dependency is coppied to a specific directory within he webapp? Or, should I be looking at plugins to accomplish this, or something else entirely? Thanks for your help, Doug Hughes, President Alagad Inc. dhug...@alagad.com 888 Alagad4 (x300) Office: 919-550-0755 Fax: 888-248-7836
Re: Transitive and inherited dependencies - potential bug, or my misunderstanding of the mechanism
Issue is elsewhere. Initial example I gave included inheritance, but unwanted behavior happens even without it. E.g. if project P has test scoped dependency to a LIB1, and compile scoped dependency to LIB2, while LIB2 has compile scope dependency to LIB1, currently project P's war will wrongly end up without LIB1 included. In P one expects LIB1 to be available for testing, but that shouldn't affect availability of LIB1 as compile scoped transitive dependency, it should be the other way round, in this case scope of declared test scoped dependency should be broadened. As I wrote earlier, things are made worse by fact that during regular packaging/install of such an artifact no warning message is printed about narrower scope being chosen, so without appropriate (functional) tests or checking of dependency:tree one ends up knowing that dependency is missing only at runtime (it's a thril when it happens very late, at production... :) ). Regards, Stevo. On Fri, May 8, 2009 at 1:43 PM, Jörg Schaible joerg.schai...@gmx.de wrote: Mark Hobson wrote at Freitag, 8. Mai 2009 11:05: This is really a symptom of the nearest-wins mentality of Maven 2, since scopes specified in the current POM take precedence over their transitive values, and not widened as expected. AFAIK Mercury will replace nearest-wins version conflict resolution with a more usable highest-wins, so I was hoping that it'd also take a similar approach with scope conflicts and always widen them, irrespective of where they are defined. Perhaps Oleg could clarify? This would be the show stopper for me for ever using Mercury. If I narrow the scope in the local POM it is done *because I want it so*, e.g. preventing compile time deps to a specific implementation that's hidden behind an interface. - Jörg - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: setup maven2 with icefaces
My problem is that the examples for icefaces aren't provided for maven2. Specially with the dependencies I have a lot of problems. You will probably have a lot more luck asking this question on the Icefaces Users list (where everyone uses Icefaces, and probably some of them also use Maven) than on the Maven Users list (where very few people use Icefaces). Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: General questions regarding dependencies
My question then is, is it possible to somehow define a dependency which is a collection of files? Also, if I did somehow define that dependency, is there a way to make sure that the dependency is coppied to a specific directory within he webapp? Or, should I be looking at plugins to accomplish this, or something else entirely? I would package those framework files etc into jars or zips, deploy them to your Corporate repo, and then use dependency:unpack or similar plugins/approaches to put them in the right place during the construction of your webapp. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Multiple resources directory for site plugin
Hi, is it possible to change the resources directory for the site plugin? And is it possible to use multiple resources directories with this plugin? Thanks Daniel - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Transitive and inherited dependencies - potential bug, or my misunderstanding of the mechanism
Hi Stevo, Stevo Slavić wrote at Freitag, 8. Mai 2009 14:15: Issue is elsewhere. Initial example I gave included inheritance, but unwanted behavior happens even without it. E.g. if project P has test scoped dependency to a LIB1, and compile scoped dependency to LIB2, while LIB2 has compile scope dependency to LIB1, currently project P's war will wrongly end up without LIB1 included. This is the whole point: This is not wrong, Maven did it right! Actually we use scope narrowing to trim down dependencies that are not needed/only needed for test or provided by the container. In P one expects LIB1 to be available for testing, but that shouldn't affect availability of LIB1 as compile scoped transitive dependency, it should be the other way round, in this case scope of declared test scoped dependency should be broadened. Although Maven helps you with Dependency management, it is still your task as dev to actively maintain them. This implies a check of the dependency tree. As I wrote earlier, things are made worse by fact that during regular packaging/install of such an artifact no warning message is printed about narrower scope being chosen, so without appropriate (functional) tests or checking of dependency:tree one ends up knowing that dependency is missing only at runtime (it's a thril when it happens very late, at production... :) ). Broadening the scope will have some really nasty other side-effects which will again put you in the role of actively maintaining the dep tree ;-) - Jörg - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: setup maven2 with icefaces
Wayne Fay wrote: You will probably have a lot more luck asking this question on the Icefaces Users list (where everyone uses Icefaces, and probably some of them also use Maven) than on the Maven Users list (where very few people use Icefaces). Wayne Thanks for your quick reply. But I can't find an icefaces user list in here :( In Nabble1 you can approximate by clicking from root element to the next one (for example: Software - Java - ...). I can't find this posibility in the new nabble. Am I doing something wrong? -- View this message in context: http://n2.nabble.com/setup-maven2-with-icefaces-tp2844860p2845268.html Sent from the maven users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: General questions regarding dependencies
Doug Hughes wrote: I have some questions about how dependencies are handled within Maven. I understand that when you add a dependency that Maven looks at the central repository, finds the correct files and downloads them. I'm wondering if this can only be done for JAR/WAR files? No, any artifact from your build can be deployed into a maven repository. The maven-rpm-plugin for example creates an RPM file as an artifact, and the maven deploy step will deploy the RPM into a repository, it doesn't have to be a jar or a war (or an ear, or whatever). My question then is, is it possible to somehow define a dependency which is a collection of files? Yes, group the files together into some kind of archive (zip is good, or jar seeing we are in the java universe), and then deploy that. Also, if I did somehow define that dependency, is there a way to make sure that the dependency is coppied to a specific directory within he webapp? Yes. The maven-dependency-plugin can be asked to unpack directories and put them in certain places during your build. Alternatively, for more general purpose stuff, the maven-assembly-plugin can be used to produce an assembly of multiple things combined into a single tree. Regards, Graham -- smime.p7s Description: S/MIME Cryptographic Signature
Child POM inherit reporting configurtaion from parent POM?
I have javadoc reporting configuration in a PARENT POM an it looks like this: reporting plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-javadoc-plugin/artifactId inheritedtrue/inherited configuration links linkhttp://java.sun.com/j2se/1.5.0/docs/api/link linkhttp://jakarta.apache.org/commons/chain/apidocs/link /links /configuration /plugin /plugins /reporting Now for a CHILD POM I want to add a new link for a library which the CHILD project uses. So I have this in the CHILD POM reporting plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-javadoc-plugin/artifactId configuration links linkhttp://flickrj.sourceforge.net/api//link /links /configuration /plugin /plugins /reporting My problem is Maven isn't combining the two. I expected help:effective-pom to have 3 link tags but it only shows the one from the CHILD POM. So the CHILD POM configuration is overriding the PARENT POM. Is there a way to get Maven to combine the two? Mike - This e-mail message may contain privileged and/or confidential information, and is intended to be received only by persons entitled to receive such information. If you have received this e-mail in error, please notify the sender immediately. Please delete it and all attachments from any servers, hard drives or any other media. Other use of this e-mail by you is strictly prohibited. All e-mails and attachments sent and received are subject to monitoring, reading and archival by Monsanto, including its subsidiaries. The recipient of this e-mail is solely responsible for checking for the presence of Viruses or other Malware. Monsanto, along with its subsidiaries, accepts no liability for any damage caused by any such code transmitted by or accompanying this e-mail or any attachment. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: setup maven2 with icefaces
Contact me off list -- I recently completed two projects using IceFaces and Maven. I can share the config files with you, but would prefer not to post them to the list as they need to be stripped of proprietary info. Thanks! -- Nayan Hajratwala http://agileshrugged.com http://twitter.com/nhajratw 734.658.6032 On May 8, 2009, at 7:49 AM, hrbaer wrote: Hi folks, I'm triing since a few days to setup an maven2-project in eclipse using icefaces. Unfortunatly I fail to get a running example. My problem is that the examples for icefaces aren't provided for maven2. Specially with the dependencies I have a lot of problems. Is anybody here who already setup a running iceface-project for eclipse using maven? I'm very interested in the web.xml an the pom-file.. I'm running out of ideas - sorry. Maybe someone can help me? -- View this message in context: http://n2.nabble.com/setup-maven2-with-icefaces-tp2844860p2844860.html Sent from the maven users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: setup maven2 with icefaces
After looking at the files, it turned out to be pretty simple to sanitize them, so here you go. Hope it helps:pom.xml.generic is the WAR project, and pom.xml.generic-parent is from the parent moduleunder WEB-INF/faces-config.xmlweb.xml?xml version=1.0 encoding=UTF-8? faces-config xmlns=http://java.sun.com/xml/ns/javaee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd; version=1.2 application locale-config default-localeen/default-locale /locale-config view-handlercom.icesoft.faces.facelets.D2DFaceletViewHandler/view-handler el-resolverorg.springframework.web.jsf.el.SpringBeanFacesELResolver/el-resolver message-bundlejsf.errorMessages/message-bundle /application /faces-config web.xml.generic Description: Binary data pom.xml.generic Description: Binary data pom.xml.generic-parent Description: Binary data ---Nayan Hajratwalahttp://agileshrugged.comhttp://twitter.com/nhajratw734.658.6032 On May 8, 2009, at 9:21 AM, hrbaer wrote:Wayne Fay wrote:You will probably have a lot more luck asking this question on theIcefaces Users list (where everyone uses Icefaces, and probably someof them also use Maven) than on the Maven Users list (where very fewpeople use Icefaces).WayneThanks for your quick reply.But I can't find an icefaces user list in here :(In Nabble1 you can approximate by clicking from root element to the next one(for example: Software -> Java -> ...). I can't find this posibility in the"new" nabble. Am I doing something wrong?-- View this message in context: http://n2.nabble.com/setup-maven2-with-icefaces-tp2844860p2845268.htmlSent from the maven users mailing list archive at Nabble.com.-To unsubscribe, e-mail: users-unsubscr...@maven.apache.orgFor additional commands, e-mail: users-h...@maven.apache.org
RE: Re: Transitive and inherited dependencies - potential bug, or my misunderstanding of the mechanism
Your argument Jorg I think applies to provided and runtime scope, but not to test. The root smell here lies in the definition of scope. Test scope means needed to compile test code. Compile scope means needed to compile production and test code. These are both related to when a dependency is needed to compile. Provided and runtime scope are related to when a dependency is needed at runtime. So the way I see it, a compile transitive dependency should always override a test dependency but not provided or runtime. There is some technical debt here in terms of how scoping works. You really need a further scope classification like: Scope = compile classifier = test classifier = production Scope = runtime classifier = provided Something like this. You likely get the idea. --- Todd Thiessen -Original Message- From: news [mailto:n...@ger.gmane.org] On Behalf Of Jörg Schaible Sent: Friday, May 08, 2009 9:11 AM To: users@maven.apache.org Subject: Re: Transitive and inherited dependencies - potential bug, or my misunderstanding of the mechanism Hi Stevo, Stevo Slavić wrote at Freitag, 8. Mai 2009 14:15: Issue is elsewhere. Initial example I gave included inheritance, but unwanted behavior happens even without it. E.g. if project P has test scoped dependency to a LIB1, and compile scoped dependency to LIB2, while LIB2 has compile scope dependency to LIB1, currently project P's war will wrongly end up without LIB1 included. This is the whole point: This is not wrong, Maven did it right! Actually we use scope narrowing to trim down dependencies that are not needed/only needed for test or provided by the container. In P one expects LIB1 to be available for testing, but that shouldn't affect availability of LIB1 as compile scoped transitive dependency, it should be the other way round, in this case scope of declared test scoped dependency should be broadened. Although Maven helps you with Dependency management, it is still your task as dev to actively maintain them. This implies a check of the dependency tree. As I wrote earlier, things are made worse by fact that during regular packaging/install of such an artifact no warning message is printed about narrower scope being chosen, so without appropriate (functional) tests or checking of dependency:tree one ends up knowing that dependency is missing only at runtime (it's a thril when it happens very late, at production... :) ). Broadening the scope will have some really nasty other side-effects which will again put you in the role of actively maintaining the dep tree ;-) - Jörg - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Undocumented Feature: Usage of negation for profile activation
Hello, I just found a---to my best knowledge---undocumented feature and though I should share it with the community in the hope that it will made its way into the Maven documentation. The feature is that you can use the negation symbol ! within a profile activation specifification not only to test the absence of a property but also within the os tag, for instance, to express something like activate the profile if the OS family name is _not_ xyz. The following example illustrates this: profiles profile idtools-jar-windows/id activation os familywindows/family /os /activation !-- ... -- /profile profile idtools-jar-unix/id activation os !-- We need to exclude Mac OS X since it is in family 'unix' -- familyunix/family name!mac os x/name /os /activation !-- ... -- /profile profile!-- Mac OSX Java JDK doesn't has separate tools.jar. -- idtools-jar-mac/id activation os !-- We can not only use 'family' discriminator since Mac also has 'family = unix' -- familyunix/family namemac os x/name /os /activation !-- ... -- /profile profiles So in this example I use name!mac os x/name to specify that the profile idtools-jar-unix/id should be applied to all UNIX family operating systems _except_ Mac OS X. This example was tested with Maven 2.0.9, 2.0.10, 2.1.0 on Windows, Linux, and Mac OS X and it works for all of them. Nice :-) Cheers, Thorsten -- View this message in context: http://www.nabble.com/Undocumented-Feature%3A-Usage-of-negation-for-profile-activation-tp23446509p23446509.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: General questions regarding dependencies
So, I'm getting the impression that the dependencys need to be a single file such as a jar, zip, or something else. I can't have a folder of files as my dependency? This is fine, it seems that dependency or assembly plugin can be used to explode this as needed. Where can I find documentation on creating my own repository and using it with Maven? Thanks, Doug Hughes, President Alagad Inc. dhug...@alagad.com 888 Alagad4 (x300) Office: 919-550-0755 Fax: 888-248-7836 On Fri, May 8, 2009 at 9:28 AM, Graham Leggett minf...@sharp.fm wrote: Doug Hughes wrote: I have some questions about how dependencies are handled within Maven. I understand that when you add a dependency that Maven looks at the central repository, finds the correct files and downloads them. I'm wondering if this can only be done for JAR/WAR files? No, any artifact from your build can be deployed into a maven repository. The maven-rpm-plugin for example creates an RPM file as an artifact, and the maven deploy step will deploy the RPM into a repository, it doesn't have to be a jar or a war (or an ear, or whatever). My question then is, is it possible to somehow define a dependency which is a collection of files? Yes, group the files together into some kind of archive (zip is good, or jar seeing we are in the java universe), and then deploy that. Also, if I did somehow define that dependency, is there a way to make sure that the dependency is coppied to a specific directory within he webapp? Yes. The maven-dependency-plugin can be asked to unpack directories and put them in certain places during your build. Alternatively, for more general purpose stuff, the maven-assembly-plugin can be used to produce an assembly of multiple things combined into a single tree. Regards, Graham --
Re: setup maven2 with icefaces
Thank you very much for the files. I'm realy looking forward to try these in my application! -- View this message in context: http://n2.nabble.com/setup-maven2-with-icefaces-tp2844860p2845570.html Sent from the maven users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: hi, how to specify java_opts in maven
I said below to set MAVEN_OPTS in your environment ;-) On Fri, May 8, 2009 at 1:46 AM, shrimpywu imx...@gmail.com wrote: so what should i do??? BRIAN FOX-5 wrote: set MAVEN_OPTS = -Xmx512m for example. It can't be done directly from the cli. On Thu, May 7, 2009 at 1:39 AM, shrimpywu imx...@gmail.com wrote: Before i run my program like this plugin groupIdorg.codehaus.mojo/groupId artifactIdexec-maven-plugin/artifactId executions execution goals goalexec/goal /goals /execution /executions configuration executablejava/executable arguments argument-Xms32m/argument argument-Xmx1024m/argument argument-classpath/argument classpath / argumentorg.myproject.Main/argument /arguments /configuration /plugin however i have to pass arguments in run time, so i have to do things like this mvn exec:java -Dexec.mainClass=org.myproject.Main -Dexec.args=argument1 but i found out that, if i do in comand line, i can specify any argument in the POM any more, coz it will complain and throws exception. but i do want to increase the java heap size, otherwise i will get Out of memory exception So...can any one help me how can i do both??? -- View this message in context: http://www.nabble.com/hi%2C-how-to-specify-java_opts-in-maven-tp23420573p23420573.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- View this message in context: http://www.nabble.com/hi%2C-how-to-specify-java_opts-in-maven-tp23420573p23440459.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Re: Transitive and inherited dependencies - potential bug, or my misunderstanding of the mechanism
2009/5/8 Todd Thiessen thies...@nortel.com Your argument Jorg I think applies to provided and runtime scope, but not to test. The root smell here lies in the definition of scope. Test scope means needed to compile test code. Compile scope means needed to compile production and test code. These are both related to when a dependency is needed to compile. Provided and runtime scope are related to when a dependency is needed at runtime. So the way I see it, a compile transitive dependency should always override a test dependency but not provided or runtime. What do you mean by override? There is some technical debt here in terms of how scoping works. You really need a further scope classification like: Scope = compile classifier = test classifier = production Scope = runtime classifier = provided Something like this. You likely get the idea. Lost me
Re: General questions regarding dependencies
You can't have a pile of files as dependencies, not the way I think you're looking at it. You want to zip them up as a single artifact and then use those as the dependency. You can use the dependency:unpack / unpack-dependencies goal to extract the files from the artifact prior to compilation. For documentation, take a look at the links below. http://www.sonatype.com/products/maven/documentation/book-defguide http://www.sonatype.com/products/nexus/documentation/book On Fri, May 8, 2009 at 10:01 AM, Doug Hughes d...@doughughes.net wrote: So, I'm getting the impression that the dependencys need to be a single file such as a jar, zip, or something else. I can't have a folder of files as my dependency? This is fine, it seems that dependency or assembly plugin can be used to explode this as needed. Where can I find documentation on creating my own repository and using it with Maven? Thanks, Doug Hughes, President Alagad Inc. dhug...@alagad.com 888 Alagad4 (x300) Office: 919-550-0755 Fax: 888-248-7836 On Fri, May 8, 2009 at 9:28 AM, Graham Leggett minf...@sharp.fm wrote: Doug Hughes wrote: I have some questions about how dependencies are handled within Maven. I understand that when you add a dependency that Maven looks at the central repository, finds the correct files and downloads them. I'm wondering if this can only be done for JAR/WAR files? No, any artifact from your build can be deployed into a maven repository. The maven-rpm-plugin for example creates an RPM file as an artifact, and the maven deploy step will deploy the RPM into a repository, it doesn't have to be a jar or a war (or an ear, or whatever). My question then is, is it possible to somehow define a dependency which is a collection of files? Yes, group the files together into some kind of archive (zip is good, or jar seeing we are in the java universe), and then deploy that. Also, if I did somehow define that dependency, is there a way to make sure that the dependency is coppied to a specific directory within he webapp? Yes. The maven-dependency-plugin can be asked to unpack directories and put them in certain places during your build. Alternatively, for more general purpose stuff, the maven-assembly-plugin can be used to produce an assembly of multiple things combined into a single tree. Regards, Graham --
Re: Transitive and inherited dependencies - potential bug, or my misunderstanding of the mechanism
2009/5/8 Jörg Schaible joerg.schai...@gmx.de: This would be the show stopper for me for ever using Mercury. If I narrow the scope in the local POM it is done *because I want it so*, e.g. preventing compile time deps to a specific implementation that's hidden behind an interface. This should be done in dependency management though, not as a direct dependency. At least it could when MNG-3695 is fixed. Mark - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Transitive and inherited dependencies - potential bug, or my misunderstanding of the mechanism
2009/5/8 Jörg Schaible joerg.schai...@gmx.de: E.g. if project P has test scoped dependency to a LIB1, and compile scoped dependency to LIB2, while LIB2 has compile scope dependency to LIB1, currently project P's war will wrongly end up without LIB1 included. This is the whole point: This is not wrong, Maven did it right! Actually we use scope narrowing to trim down dependencies that are not needed/only needed for test or provided by the container. I don't follow that logic, adding a test dependency shouldn't affect the compile classpath. What's a use case for scope-narrowing? I've had scopes being narrowed before due to bugs (such as MNG-2686) and they're pretty hard to track down in large dependency trees. Mark - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: Re: Transitive and inherited dependencies - potential bug, or my misunderstanding of the mechanism
Override the dependency defined in the POM, as Steve outline in his earlier response. Let me quote his explanation for ease of reference: E.g. if project P has test scoped dependency to a LIB1, and compile scoped dependency to LIB2, while LIB2 has compile scope dependency to LIB1, currently project P's war will wrongly end up without LIB1 included. In P one expects LIB1 to be available for testing, but that shouldn't affect availability of LIB1 as compile scoped transitive dependency, it should be the other way round, in this case scope of declared test scoped dependency should be broadened. I used the term override to descibe the situation when project P should have LIB1 defined as a compile dependency, when the POM actually defines it as test. But it should should only override for test dependencies, not for provided or runtime. As for your lost me comment I am not sure what you would like explained. Scope basically has multiple meanings. Compile/test are both related to requiring a dependency for compilation; runtime/provided are both related to requiring a dependency only at runtime. These multiple meanings are not suited to a single variable. --- Todd Thiessen -Original Message- From: Brian Fox [mailto:bri...@infinity.nu] Sent: Friday, May 08, 2009 11:00 AM To: Maven Users List Subject: Re: Re: Transitive and inherited dependencies - potential bug, or my misunderstanding of the mechanism 2009/5/8 Todd Thiessen thies...@nortel.com Your argument Jorg I think applies to provided and runtime scope, but not to test. The root smell here lies in the definition of scope. Test scope means needed to compile test code. Compile scope means needed to compile production and test code. These are both related to when a dependency is needed to compile. Provided and runtime scope are related to when a dependency is needed at runtime. So the way I see it, a compile transitive dependency should always override a test dependency but not provided or runtime. What do you mean by override? There is some technical debt here in terms of how scoping works. You really need a further scope classification like: Scope = compile classifier = test classifier = production Scope = runtime classifier = provided Something like this. You likely get the idea. Lost me - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Child POM inherit reporting configurtaion from parent POM?
The merging inside the configuration doesn't add the things together because it isn't known ahead of time if replacement or merging makes sense for a given plugin. On Fri, May 8, 2009 at 9:33 AM, REMIJAN, MICHAEL J [AG/1000] michael.j.remi...@monsanto.com wrote: I have javadoc reporting configuration in a PARENT POM an it looks like this: reporting plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-javadoc-plugin/artifactId inheritedtrue/inherited configuration links linkhttp://java.sun.com/j2se/1.5.0/docs/api/link linkhttp://jakarta.apache.org/commons/chain/apidocs/link /links /configuration /plugin /plugins /reporting Now for a CHILD POM I want to add a new link for a library which the CHILD project uses. So I have this in the CHILD POM reporting plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-javadoc-plugin/artifactId configuration links linkhttp://flickrj.sourceforge.net/api//link /links /configuration /plugin /plugins /reporting My problem is Maven isn't combining the two. I expected help:effective-pom to have 3 link tags but it only shows the one from the CHILD POM. So the CHILD POM configuration is overriding the PARENT POM. Is there a way to get Maven to combine the two? Mike - This e-mail message may contain privileged and/or confidential information, and is intended to be received only by persons entitled to receive such information. If you have received this e-mail in error, please notify the sender immediately. Please delete it and all attachments from any servers, hard drives or any other media. Other use of this e-mail by you is strictly prohibited. All e-mails and attachments sent and received are subject to monitoring, reading and archival by Monsanto, including its subsidiaries. The recipient of this e-mail is solely responsible for checking for the presence of Viruses or other Malware. Monsanto, along with its subsidiaries, accepts no liability for any damage caused by any such code transmitted by or accompanying this e-mail or any attachment. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
duplicate entry error with maven eclipse and tomcat
Hi, I'm working on a private/solo project and I've set up a project with maven on eclipse using the m2 plugin. A parent project and 2 maven subprojects (modules?). 1 module is a spring project, the other a web project wicket. In the spring project I want to use profiles to dispatch the database configuration per environment (dev, tst, uat, prd) In all of the environments I need an file which i call application.properties and which is fed to a PropertyPlaceHolderConfigurer like: bean id=propertyConfigurer class = org .springframework.beans.factory.config.PropertyPlaceholderConfigurer property name=location value=classpath:application.properties / /bean apart from that I also want to unittest both projects (but starting with the spring project) so I also have testResources element in my pom, also containing the application.properties. The unittest are working fine, and I can successfully add the web project to a tomcat configuration in eclipse. However when I try to startup tomcat it fails telling me: Error creating zip file mypoll-domain.jar: duplicate entry: application.properties duplicate entry: application.properties I suspect it has to do with the testResources, commenting it out in the pom doesnt solve the problem however explicitly renaming the application.properties in the src/test/resource directory solves the problem (and brings me to the next file in line (hibernate.cfg.xml) Is there a way to solve this and prevent the test/resource's contents to appear on the tomcat project? Or is there something I'm completely overlooking and should I use other approaches? Any help is greatly appreciated. regards, Jeroen. PS I did check on google but I could not find any useful information. PPS versions: eclipse ganymede. java 1.5 (mac os x). m2 0.9.6.20080905 maven version 2.0.9 (on the command line, and I hope eclipse is using the same version..?)
Re: Maven scm:checkin requires developerConnectionUrl ?
http://maven.apache.org/pom.html#SCM Well, connectionUrl is used for readonly access (for example, when you provide users with public access), and access for developers (developerConnection) is the one used for committing (write access). IMO, your problem also comes from the fact that you should put connection information into the project/scm block and not in some configuration specific to the scm plugin. Cheers. 2009/5/8 Nafter hdo...@allshare.nl I have to profiles in my pom.xml. The first profile does a scm:update in a workingDirectory using the connectionUrl. This works just fine. Then later during the same build within Hudson, another profile is triggered which is also using the maven scm plugin. Now I would like to commit (checkin) a modified file. I did configure the workingDirectory and the connectionUrl. But now an exception is thrown about the fact that the developerConnectionUrl is missing! Why? Why can't I just use the connectionUrl to do the checkin/commit? Now I did try using the developerConnectionUrl and providing a message. But now the actual file is not committed, but it seems it is looking at a time file instead of the location of my workingdirectory. I use tortoisesvn and the workingdirectory does already have a svn checkout. And doing a commit with tortoisesvn is working just fine. This is a part of my configuration: !-- SUBVERSION COMMIT VERSION.TXT -- profile idcommit_version_id/id activation property namecommit_version/name /property /activation build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-scm-plugin/artifactId version1.2/version configuration username${SVN_USERNAME}/username password${SVN_PASSWORD}/password developerConnectionUrl${SVN_CONNECTIONURL}/developerConnectionUrl /configuration executions execution idsvn_commit/id phaseverify/phase goals goalcheckin/goal /goals configuration messageAutomatically generated build id/message workingDirectory${SVN_WORKINGDIRECTORY__PV50}/workingDirectory /configuration /execution /executions /plugin /plugins /build /profile -- View this message in context: http://www.nabble.com/Maven-scm%3Acheckin-requires-developerConnectionUrl---tp23436610p23436610.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Baptiste Batmat MATHUS - http://batmat.net Sauvez un arbre, Mangez un castor !
Re: Undocumented Feature: Usage of negation for profile activation
On Fri, May 8, 2009 at 6:59 AM, TM thorsten.moel...@unibas.ch wrote: Hello, I just found a---to my best knowledge---undocumented feature and though I should share it with the community in the hope that it will made its way into the Maven documentation. The feature is that you can use the negation symbol ! within a profile activation specifification not only to test the absence of a property but also within the os tag, for instance, to express something like activate the profile if the OS family name is _not_ xyz. The following example illustrates this: It could go on http://maven.apache.org/guides/introduction/introduction-to-profiles.html . Can you open a JIRA issue if there isn't one, and possibly suggest a patch? -- Wendy - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: Undocumented Feature: Usage of negation for profile activation
fantastic..what are the chances of opening the capability to use regular expresssions? thanks, Martin Gainty __ Disclaimer and Confidentiality/Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité This message is confidential. If you should not be the intended receiver, then we ask politely to report. Each unauthorized forwarding or manufacturing of a copy is inadmissible. This message serves only for the exchange of information and has no legal binding effect. Due to the easy manipulation of emails we cannot take responsibility over the the contents. Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. From: wsm...@gmail.com Date: Fri, 8 May 2009 14:39:33 -0700 Subject: Re: Undocumented Feature: Usage of negation for profile activation To: users@maven.apache.org On Fri, May 8, 2009 at 6:59 AM, TM thorsten.moel...@unibas.ch wrote: Hello, I just found a---to my best knowledge---undocumented feature and though I should share it with the community in the hope that it will made its way into the Maven documentation. The feature is that you can use the negation symbol ! within a profile activation specifification not only to test the absence of a property but also within the os tag, for instance, to express something like activate the profile if the OS family name is _not_ xyz. The following example illustrates this: It could go on http://maven.apache.org/guides/introduction/introduction-to-profiles.html . Can you open a JIRA issue if there isn't one, and possibly suggest a patch? -- Wendy - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org _ Windows Live™: Keep your life in sync. http://windowslive.com/explore?ocid=TXT_TAGLM_BR_life_in_synch_052009
Dynamically Modifying the Classpath
Hi, We are trying to find a way to add some jars that are generated during the pre-integration-test phase to the class path when the integration tests run. There is also a folder with configuration files that is created at the same time that we also need to add to the class path. The jar and directory are both built programatically by another plugin, and maven does not know anything about them. Does anyone know a way to do this? I have an idea about how to do this, but it is rather convoluted. My idea is to create a plugin that basically calls mvn install:install-file on each jar to put it in the local maven repository and then programatically add the jars as a dependencies of the project by adding artifacts for them to the list returned by project.getDependencies(). My plan is to make the plugin invoke the install:install-file plugin by doing something similar to what the maven invoker plugin does. I don't think we can do this by using install:install-file plugin directly because we don't know ahead of time what the exact set of jars will be. We want to add jars in a certain directory whose name matches a certain pattern. There's also the fact that it would have to happen during the pre-integration-test phase, and as far as I know the execution order is undefined for goals executing in different execution groups within the same phase. That is, I don't think you can't tell whether the executions for plugin1 or plugin2 will happen first if they are both in the same phase. We can't have this run before the jars are generated! I'd love to find out I'm wrong about this, though. As for adding the directory to the classpath, I am somewhat at a loss. If the folder was created earler, I think we could add it as a test resource. However, I think that the copying happens before the pre-integration-test phase. Right now, the only thing I can think of is to manually copy the contents of the folder into the test-classes directory where the compiled classes are. Does anyone have any other ideas? Does anyone know to do these things or if what I suggested above will work? We're using maven 2.1.0. Thanks in advance for any help you can provide. -Jeff Jeffrey Hagelberg, Software Engineer XMeta Development IBM Software Group Phone: 978-899-2055 T/L:276-2055) Email:jnhag...@us.ibm.com
Maven 2.1.0, threads in tests failing for site
I have a test that is suddenly failing in 2.1.0 but only when I do a site build. The test is a little wierd in that it is testing some code that makes the 2nd thread to enter a method pause with a thread wait until the 1st thread to enter is finished. To do this the test makes up a couple of runnables, starts one, waits a bit and starts the other and makes sure the 2nd thread in takes longer to run than it otherwise would. This wasn't something I got right the first time. (The way Java decides what thread to run and when isn't immediately obvious to my mind at least.) I know that this isn't the final word on testing thread stuff. But the test works on multi and single CPU workstations under Windows XP and on a VmWare vm under Linux (RHE 4.2) so I haven't worried about it. Its been okay for a year or so under Maven 2.0.7 and 2.0.8. Further, it runs on all those machines when not doing the site build. (mvn clean install site) My first thought has to do with reports using instrumentation and such which causes the tests run multiple times. So I have turned off the Dashboard Report and the Cobertura Report first. Before I go through all the pain of taking out reports until it starts working I was wondering if this rung any bells with any of you. Clues are good. Answers are better. Whatever someone finds. (Oh, it runs for 32 minutes before failing so taking out reports trial and error takes forever. There is a parent POM and a whole bunch of its children building a RAR and an EAR.) Thanks. -- Lee Meador
Re: Maven 2.1.0, threads in tests failing for site
Oh ... I do have the plugins locked down except for two that I just found courtesy of the Versions plugin. Source and Deploy plugins weren't locked down. I think I updated to the latest release on SureFire plugins too. Thanks. -- Lee On Fri, May 8, 2009 at 10:12 PM, Lee Meador l...@leemeador.com wrote: I have a test that is suddenly failing in 2.1.0 but only when I do a site build. The test is a little wierd in that it is testing some code that makes the 2nd thread to enter a method pause with a thread wait until the 1st thread to enter is finished. To do this the test makes up a couple of runnables, starts one, waits a bit and starts the other and makes sure the 2nd thread in takes longer to run than it otherwise would. This wasn't something I got right the first time. (The way Java decides what thread to run and when isn't immediately obvious to my mind at least.) I know that this isn't the final word on testing thread stuff. But the test works on multi and single CPU workstations under Windows XP and on a VmWare vm under Linux (RHE 4.2) so I haven't worried about it. Its been okay for a year or so under Maven 2.0.7 and 2.0.8. Further, it runs on all those machines when not doing the site build. (mvn clean install site) My first thought has to do with reports using instrumentation and such which causes the tests run multiple times. So I have turned off the Dashboard Report and the Cobertura Report first. Before I go through all the pain of taking out reports until it starts working I was wondering if this rung any bells with any of you. Clues are good. Answers are better. Whatever someone finds. (Oh, it runs for 32 minutes before failing so taking out reports trial and error takes forever. There is a parent POM and a whole bunch of its children building a RAR and an EAR.) Thanks. -- Lee Meador -- -- Lee Meador Sent from gmail. My real email address is lee AT leemeador.com