Re: MessageBundle problem for using maven test
+1. That should do the trick. Eclipse classpath system is unfortunately not finely configurable. You'll generally be able to do things in eclipse you can't with maven. And this will be an issue on eclipse side... Cheers Le 3 juin 2013 04:53, Russell Gold r...@gold-family.us a écrit : Hi Jade, Could you please try placing the fpt.properties file at the root of src/main/resources? That's the convention in Maven for resources that you want copied int the jar. Regards, Russ On Jun 2, 2013, at 10:27 PM, Jade evokeraluc...@gmail.com wrote: Hi Russell: I put the file fpt.properties in the root of java source code foler src/main/java. And I load the file with ResourceBundle: ResourceBundle resourceBundle = ResourceBundle.getBundle(ftp); String host= resourceBundle.getString(host); Java Doc says ResourceBundle will looking for the file ftp_en_US.properties for my system local is en_US. If it can not file the file ftp_en_US.properties, ResourceBundle will load the file ftp.properties as default. Now the problem is : If my project was compile byEclipse, it's all OK when I run the test case both in Eclipe or run the test case by command mvn test. But if the project was compile by maven (I mean I run mvn clean), the test case will fail with the exception Can't find bundle. I think the class file compile by maven will not load fpt.properties as default when it can not file the file ftp_en_US.properties On Mon, Jun 3, 2013 at 2:19 AM, Russell Gold [via Maven] ml-node+s40175n5757956...@n5.nabble.com wrote: Hi Jade, Where are you placing the ftp.properties file and how does your program attempt to find it? - Russ On Jun 2, 2013, at 12:07 AM, Jade [hidden email] http://user/SendEmail.jtp?type=nodenode=5757956i=0 wrote: Hello everyone : I'm a beginner of maven. In my project, I have an file ftp.proterties only use for ftp config, not for I18N useage. This file's Content like : host=192.168.1.105 port=21 username=jade password=p@55w0rd When I run the JUnit test in Eclipse, Everything is OK. But when I run the TestCase with mvn test I get an exception: Tests in error: test(jadeutils.ftp.FtpServiceTest): Can't find bundle for base name ftp, locale en_US -- View this message in context: http://maven.40175.n5.nabble.com/MessageBundle-problem-for-using-maven-test-tp5757876.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [hidden email] http://user/SendEmail.jtp?type=nodenode=5757956i=1 For additional commands, e-mail: [hidden email] http://user/SendEmail.jtp?type=nodenode=5757956i=2 - Come read my webnovel, Take a Lemon http://www.takealemon.com, and listen to the Misfile radio play http://www.gold-family.us/audio/misfile.html! -- If you reply to this email, your message will be added to the discussion below: http://maven.40175.n5.nabble.com/MessageBundle-problem-for-using-maven-test-tp5757876p5757956.html To unsubscribe from MessageBundle problem for using maven test, click here http://maven.40175.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=5757876code=ZXZva2VyYWx1Y2FyZEBnbWFpbC5jb218NTc1Nzg3NnwtMTc3OTU4MDg4NQ== . NAML http://maven.40175.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml -- View this message in context: http://maven.40175.n5.nabble.com/MessageBundle-problem-for-using-maven-test-tp5757876p5758036.html Sent from the Maven - Users mailing list archive at Nabble.com. - Come read my webnovel, Take a Lemon http://www.takealemon.com, and listen to the Misfile radio play http://www.gold-family.us/audio/misfile.html!
Re: MessageBundle problem for using maven test
mvn clean doesn't build anything it just deletes stuff. Ron On 02/06/2013 10:27 PM, Jade wrote: Hi Russell: I put the file fpt.properties in the root of java source code foler src/main/java. And I load the file with ResourceBundle: ResourceBundle resourceBundle = ResourceBundle.getBundle(ftp); String host= resourceBundle.getString(host); Java Doc says ResourceBundle will looking for the file ftp_en_US.properties for my system local is en_US. If it can not file the file ftp_en_US.properties, ResourceBundle will load the file ftp.properties as default. Now the problem is : If my project was compile byEclipse, it's all OK when I run the test case both in Eclipe or run the test case by command mvn test. But if the project was compile by maven (I mean I run mvn clean), the test case will fail with the exception Can't find bundle. I think the class file compile by maven will not load fpt.properties as default when it can not file the file ftp_en_US.properties On Mon, Jun 3, 2013 at 2:19 AM, Russell Gold [via Maven] ml-node+s40175n5757956...@n5.nabble.com wrote: Hi Jade, Where are you placing the ftp.properties file and how does your program attempt to find it? - Russ On Jun 2, 2013, at 12:07 AM, Jade [hidden email]http://user/SendEmail.jtp?type=nodenode=5757956i=0 wrote: Hello everyone : I'm a beginner of maven. In my project, I have an file ftp.proterties only use for ftp config, not for I18N useage. This file's Content like : host=192.168.1.105 port=21 username=jade password=p@55w0rd When I run the JUnit test in Eclipse, Everything is OK. But when I run the TestCase with mvn test I get an exception: Tests in error: test(jadeutils.ftp.FtpServiceTest): Can't find bundle for base name ftp, locale en_US -- View this message in context: http://maven.40175.n5.nabble.com/MessageBundle-problem-for-using-maven-test-tp5757876.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=5757956i=1 For additional commands, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=5757956i=2 - Come read my webnovel, Take a Lemon http://www.takealemon.com, and listen to the Misfile radio play http://www.gold-family.us/audio/misfile.html! -- If you reply to this email, your message will be added to the discussion below: http://maven.40175.n5.nabble.com/MessageBundle-problem-for-using-maven-test-tp5757876p5757956.html To unsubscribe from MessageBundle problem for using maven test, click herehttp://maven.40175.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=5757876code=ZXZva2VyYWx1Y2FyZEBnbWFpbC5jb218NTc1Nzg3NnwtMTc3OTU4MDg4NQ== . NAMLhttp://maven.40175.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml -- View this message in context: http://maven.40175.n5.nabble.com/MessageBundle-problem-for-using-maven-test-tp5757876p5758036.html Sent from the Maven - Users mailing list archive at Nabble.com. -- Ron Wheeler President Artifact Software Inc email: rwhee...@artifact-software.com skype: ronaldmwheeler phone: 866-970-2435, ext 102 - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Javadoc: single configuration
Hm, I fail to find such reference, and I'm actually reading `mvn site` and `mvn javadoc:javadoc` behave differently, given they are configured in different sections (reporting vs. build): | IMPORTANT NOTE: configuring the Javadoc plugin in the | reporting/ or build/ elements in the pom have NOT the same | behavior as described in the Guide to Configuring Plug-ins. Stanimir That section warns me that the behaviour is different, but not *how* it differs. In the example at the bottom of that page the javadoc:javadoc uses elements from the configuration defined in the build *and* reporting sections: |mvn javadoc:javadoc |It will generate the Javadoc for private members (defined in build/) |using the stylesheet (defined in reporting/), and with no help page |(defined in build/). This is the documented behaviour that I can not reproduce. ( mvn javadoc:javadoc only looks at the configuration in the build section instead of both build and reporting sections) Ultimately I'm trying to define the javadoc configuration once and have it apply to all invocations of the javadoc plugin. Regards, Evan -- View this message in context: http://maven.40175.n5.nabble.com/Javadoc-single-configuration-tp5757784p5758128.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: using ants listeners and loggers in maven-antrun-plugin
Figured it out. I had to use javascript to add a listener inside of my build.xml Thanks anyway... Cody Fyler Cell: (515) 441 - 0814 Upcoming PTO 3/15/2013 - 3/18/2013 -Original Message- From: cody.a.fy...@wellsfargo.com [mailto:cody.a.fy...@wellsfargo.com] Sent: Friday, May 31, 2013 12:45 PM To: users@maven.apache.org Subject: using ants listeners and loggers in maven-antrun-plugin I'm looking for a way to use Ant's org.apache.tools.ant.listener.ProfileLogger in combination with the maven-antrun-plugin. Cody Fyler - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Transitive Dependency Question
Hello, I have a question about transitive dependencies. According to the pom documentation here: http://maven.apache.org/pom.html#Dependencies project dependencies marked with test scope are not transitive. I assumed that this also applied to it's dependencies, so my question is if I declare a dependency on a project at test scope, that project's dependencies should all be included at test scope. For example, given the following project(s) Project test-utils defines a junit dependency like such: dependency groupIdjunit/groupId artifactIdjunit/artifactId /dependency Project application defines a dependency on test-utils with a scope of test like such dependency groupId${project.groupId}/groupId artifactIdtest-utils/artifactId version${project.version}/version scopetest/scope /dependency Now running mvn clean dependency:tree shows that the junit dependency is being passed to the application project at compile scope which is not expected. [INFO] --- maven-dependency-plugin:2.7:tree (default-cli) @ application --- [INFO] org.sandbox:application:war:1.0.0-SNAPSHOT [INFO] \- org.sandbox:test-utils:jar:1.0.0-SNAPSHOT:test [INFO]+- junit:junit:jar:4.8.2:compile [INFO]+- org.mockito:mockito-all:jar:1.8.5:test [INFO]+- com.h2database:h2:jar:1.3.165:test [INFO]\- log4j:log4j:jar:1.2.16:test Is this a bug or was my interpretation of the transitive dependency logic incorrect? Thank you for your time.
Re: Copy an artifact with its transitive dependencies to a specified location
From my understanding of your need you should use dependency:get and use destination parameter. Dependency:copy-dependencies inadequately forces you to have a pom which I understand you don't have. There's a feature hole here that might be filled. Could you please file a jira abt this so that it can be fixed? I suppose we need to figure out where this feature would be located: either by undeprecating destination param some way , either removing the requirement for a maven pom for copy-deps or by creating a brand new goal. Thanks a lot. Le 2 juin 2013 17:13, Stanimir Stamenkov s7a...@netscape.net a écrit : I want to copy an artifact with its transitive dependencies to a specified location. The artifact is not a dependency of the project the given build step would be part of. I've tried the copy goal of the maven-dependency-plugin [1], but it doesn't have a transitive option. I've also tried the get goal, but its destination parameter is deprecated and after all it doesn't copy the transitive dependencies to that destination. I've also tried using the copy-dependencies goal by first declaring the needed artifact as runtime dependency to the project, which I don't really want to, and then specifying includeGroupIds and includeArtifactIds parameters, but this is mostly the same as copy specifying all artifacts explicitly, which I don't want to manually resolve and hard-code. Is there an easy way to achieve what I'm after? [1] http://maven.apache.org/**plugins/maven-dependency-**plugin/http://maven.apache.org/plugins/maven-dependency-plugin/ -- Stanimir --**--**- To unsubscribe, e-mail: users-unsubscribe@maven.**apache.orgusers-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Transitive Dependency Question
Hi, Tree is showing the tree. So it seems correct at first sight. Its showing you the dependency beetween your test-utils of the project and junit which is in fact scope compile. What you seem to actually want to have is the resolved list of dependencies for your application project. That goal is called dependency:list. Hope this helps. Cheers -- Baptiste Le 3 juin 2013 19:21, Jamal B jm151...@gmail.com a écrit : Hello, I have a question about transitive dependencies. According to the pom documentation here: http://maven.apache.org/pom.html#Dependencies project dependencies marked with test scope are not transitive. I assumed that this also applied to it's dependencies, so my question is if I declare a dependency on a project at test scope, that project's dependencies should all be included at test scope. For example, given the following project(s) Project test-utils defines a junit dependency like such: dependency groupIdjunit/groupId artifactIdjunit/artifactId /dependency Project application defines a dependency on test-utils with a scope of test like such dependency groupId${project.groupId}/groupId artifactIdtest-utils/artifactId version${project.version}/version scopetest/scope /dependency Now running mvn clean dependency:tree shows that the junit dependency is being passed to the application project at compile scope which is not expected. [INFO] --- maven-dependency-plugin:2.7:tree (default-cli) @ application --- [INFO] org.sandbox:application:war:1.0.0-SNAPSHOT [INFO] \- org.sandbox:test-utils:jar:1.0.0-SNAPSHOT:test [INFO]+- junit:junit:jar:4.8.2:compile [INFO]+- org.mockito:mockito-all:jar:1.8.5:test [INFO]+- com.h2database:h2:jar:1.3.165:test [INFO]\- log4j:log4j:jar:1.2.16:test Is this a bug or was my interpretation of the transitive dependency logic incorrect? Thank you for your time.
Re: Transitive Dependency Question
Hi, thanks for your response. Running dependency:list shows also shows that junit is at compile scope which I expected to be at test scope. [INFO] --- maven-dependency-plugin:2.7:list (default-cli) @ application --- [INFO] [INFO] The following files have been resolved: [INFO]junit:junit:jar:4.8.2:compile So is it a correct statement that the base scope of a dependency is fixed regardless of the declared scope of the outer dependency? This appears to be the behavior, but I am not sure that this is correct. On Mon, Jun 3, 2013 at 1:53 PM, Baptiste MATHUS m...@batmat.net wrote: Hi, Tree is showing the tree. So it seems correct at first sight. Its showing you the dependency beetween your test-utils of the project and junit which is in fact scope compile. What you seem to actually want to have is the resolved list of dependencies for your application project. That goal is called dependency:list. Hope this helps. Cheers -- Baptiste Le 3 juin 2013 19:21, Jamal B jm151...@gmail.com a écrit : Hello, I have a question about transitive dependencies. According to the pom documentation here: http://maven.apache.org/pom.html#Dependencies project dependencies marked with test scope are not transitive. I assumed that this also applied to it's dependencies, so my question is if I declare a dependency on a project at test scope, that project's dependencies should all be included at test scope. For example, given the following project(s) Project test-utils defines a junit dependency like such: dependency groupIdjunit/groupId artifactIdjunit/artifactId /dependency Project application defines a dependency on test-utils with a scope of test like such dependency groupId${project.groupId}/groupId artifactIdtest-utils/artifactId version${project.version}/version scopetest/scope /dependency Now running mvn clean dependency:tree shows that the junit dependency is being passed to the application project at compile scope which is not expected. [INFO] --- maven-dependency-plugin:2.7:tree (default-cli) @ application --- [INFO] org.sandbox:application:war:1.0.0-SNAPSHOT [INFO] \- org.sandbox:test-utils:jar:1.0.0-SNAPSHOT:test [INFO]+- junit:junit:jar:4.8.2:compile [INFO]+- org.mockito:mockito-all:jar:1.8.5:test [INFO]+- com.h2database:h2:jar:1.3.165:test [INFO]\- log4j:log4j:jar:1.2.16:test Is this a bug or was my interpretation of the transitive dependency logic incorrect? Thank you for your time.
source and javadoc jars from test-jar
Hi guys, I'm trying to add 'test-jar' resources to my assembly; i.e. the following jars are created by one of our other modules: main: -rw-r--r-- 1 kstam admin 11603 Jun 3 11:29 uddi-tck-3.2.0-SNAPSHOT.jar -rw-r--r-- 1 kstam admin 27880 Jun 3 11:29 uddi-tck-3.2.0-SNAPSHOT-javadoc.jar -rw-r--r-- 1 kstam admin 8873 Jun 3 11:29 uddi-tck-3.2.0-SNAPSHOT-sources.jar test: -rw-r--r-- 1 kstam admin106397 Jun 3 11:29 uddi-tck-3.2.0-SNAPSHOT-tests.jar -rw-r--r-- 1 kstam admin149558 Jun 3 11:29 uddi-tck-3.2.0-SNAPSHOT-test-javadoc.jar -rw-r--r-- 1 kstam admin 62545 Jun 3 11:29 uddi-tck-3.2.0-SNAPSHOT-test-sources.jar I can successfully add the uddi-tck-3.2.0-SNAPSHOT-tests.jar to my assembly using ... dependencySet outputDirectorybin/outputDirectory includes includeorg.apache.juddi:juddi-client:jar/include includeorg.apache.juddi:uddi-tck:jar/include includeorg.apache.juddi:uddi-tck:test-jar/include ... However when I try to add the source jar: ... !-- The source archives JARs -- dependencySet outputDirectorysrc/outputDirectory scopetest/scope includes includeorg.apache.juddi:juddi-client:jar:sources/include includeorg.apache.juddi:uddi-tck:jar:sources/include includeorg.apache.juddi:uddi-tck:test-jar:sources/include ... Then the uddi-tck-3.2.0-SNAPSHOT-sources.jar is NOT picked up. I made sure we reference the source and javadoc artifacts in the pom.xml: dependency groupIdorg.apache.juddi/groupId artifactIduddi-tck/artifactId version${project.parent.version}/version typetest-jar/type classifiersources/classifier /dependency dependency groupIdorg.apache.juddi/groupId artifactIduddi-tck/artifactId version${project.parent.version}/version classifierjavadoc/classifier typetest-jar/type /dependency Full pom and assembly.xml: http://svn.apache.org/repos/asf/juddi/trunk/uddi-client-dist/pom.xml http://svn.apache.org/repos/asf/juddi/trunk/uddi-client-dist/src/main/assembly/assembly.xml When running with -X it says: [DEBUG] Adding artifact: org.apache.juddi:uddi-tck:test-jar:sources:3.2.0-SNAPSHOT with file: /Users/kstam/.m2/repository/org/apache/juddi/uddi-tck/3.2.0-SNAPSHOT/uddi-tck-3.2.0-SNAPSHOT-sources.jar to assembly location: src/uddi-tck-3.2.0-SNAPSHOT-sources.jar. so it seem to be adding the source *jar*, rather then the *test-jar*. eventhough it says it's going to add the *test-jar* version: Adding artifact: org.apache.juddi:uddi-tck:test-jar:sources:3.2.0-SNAPSHOT Does anyone has an idea what I'm doing wrong? Is this a bug? Any help you can provide would be great. Thx, --Kurt - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Copy an artifact with its transitive dependencies to a specified location
Mon, 3 Jun 2013 19:46:11 +0200, /Baptiste MATHUS/: From my understanding of your need you should use dependency:get and use destination parameter. Seems like, but the transitive dependencies get only downloaded to the local repository and not copied to the specified `destination`, as far as I understand and as far as I've observed. Dependency:copy-dependencies inadequately forces you to have a pom which I understand you don't have. I have a POM where I would like to include the given dependency goal at certain phase (like `package`), but the dependency I would like to set up (copying it to a specified location, including its transitive dependencies) is not a declared dependency in/of the POM. There's a feature hole here that might be filled. Could you please file a jira abt this so that it can be fixed? I'll post back a reference. I suppose we need to figure out where this feature would be located: either by undeprecating destination param some way , either removing the requirement for a maven pom for copy-deps or by creating a brand new goal. Thanks a lot. Le 2 juin 2013 17:13, Stanimir Stamenkov s7a...@netscape.net a écrit : I want to copy an artifact with its transitive dependencies to a specified location. The artifact is not a dependency of the project the given build step would be part of. I've tried the copy goal of the maven-dependency-plugin [1], but it doesn't have a transitive option. I've also tried the get goal, but its destination parameter is deprecated and after all it doesn't copy the transitive dependencies to that destination. I've also tried using the copy-dependencies goal by first declaring the needed artifact as runtime dependency to the project, which I don't really want to, and then specifying includeGroupIds and includeArtifactIds parameters, but this is mostly the same as copy specifying all artifacts explicitly, which I don't want to manually resolve and hard-code. Is there an easy way to achieve what I'm after? [1] http://maven.apache.org/plugins/maven-dependency-plugin/ - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Transitive Dependency Question
Hi Jamal, Jamal B wrote: Hello, I have a question about transitive dependencies. According to the pom documentation here: http://maven.apache.org/pom.html#Dependencies project dependencies marked with test scope are not transitive. I assumed that this also applied to it's dependencies, so my question is if I declare a dependency on a project at test scope, that project's dependencies should all be included at test scope. For example, given the following project(s) Project test-utils defines a junit dependency like such: dependency groupIdjunit/groupId artifactIdjunit/artifactId /dependency Project application defines a dependency on test-utils with a scope of test like such dependency groupId${project.groupId}/groupId artifactIdtest-utils/artifactId version${project.version}/version scopetest/scope /dependency Now running mvn clean dependency:tree shows that the junit dependency is being passed to the application project at compile scope which is not expected. [INFO] --- maven-dependency-plugin:2.7:tree (default-cli) @ application [--- INFO] org.sandbox:application:war:1.0.0-SNAPSHOT [INFO] \- org.sandbox:test-utils:jar:1.0.0-SNAPSHOT:test [INFO]+- junit:junit:jar:4.8.2:compile [INFO]+- org.mockito:mockito-all:jar:1.8.5:test [INFO]+- com.h2database:h2:jar:1.3.165:test [INFO]\- log4j:log4j:jar:1.2.16:test Is this a bug or was my interpretation of the transitive dependency logic incorrect? Thank you for your time. Actually I was fooled by such an output with M3 in one of my projects at first sight also. So, please make a test: Comment out the org.sandbox:test-utils in your POM and print the tree again. I am quite sure that you will see that junit:junit is now introduced by a different dependency that is not of test scope. What you see above is only the result of the dependency resolver. It detected that it already has a junit:junit in its transitive deps in compile scope (maybe even in a different version), but the nearest path to junit was as direct child of org.sandbox:test-utils. Therefor it was promoted to compile scope in this place, but the overall result of the compilation classpath is still OK, it is only the displayed tree that is somewhat inconsistent (compared to M2). - Jörg - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: MessageBundle problem for using maven test
YES! It works! thank you everyone~ It looks like maven treateresource folder for resource file , not only add the folder to build path On Mon, Jun 3, 2013 at 2:29 PM, Baptiste MATHUS [via Maven] ml-node+s40175n5758040...@n5.nabble.com wrote: +1. That should do the trick. Eclipse classpath system is unfortunately not finely configurable. You'll generally be able to do things in eclipse you can't with maven. And this will be an issue on eclipse side... Cheers Le 3 juin 2013 04:53, Russell Gold [hidden email]http://user/SendEmail.jtp?type=nodenode=5758040i=0 a écrit : Hi Jade, Could you please try placing the fpt.properties file at the root of src/main/resources? That's the convention in Maven for resources that you want copied int the jar. Regards, Russ On Jun 2, 2013, at 10:27 PM, Jade [hidden email]http://user/SendEmail.jtp?type=nodenode=5758040i=1 wrote: Hi Russell: I put the file fpt.properties in the root of java source code foler src/main/java. And I load the file with ResourceBundle: ResourceBundle resourceBundle = ResourceBundle.getBundle(ftp); String host= resourceBundle.getString(host); Java Doc says ResourceBundle will looking for the file ftp_en_US.properties for my system local is en_US. If it can not file the file ftp_en_US.properties, ResourceBundle will load the file ftp.properties as default. Now the problem is : If my project was compile byEclipse, it's all OK when I run the test case both in Eclipe or run the test case by command mvn test. But if the project was compile by maven (I mean I run mvn clean), the test case will fail with the exception Can't find bundle. I think the class file compile by maven will not load fpt.properties as default when it can not file the file ftp_en_US.properties On Mon, Jun 3, 2013 at 2:19 AM, Russell Gold [via Maven] [hidden email] http://user/SendEmail.jtp?type=nodenode=5758040i=2 wrote: Hi Jade, Where are you placing the ftp.properties file and how does your program attempt to find it? - Russ On Jun 2, 2013, at 12:07 AM, Jade [hidden email] http://user/SendEmail.jtp?type=nodenode=5757956i=0 wrote: Hello everyone : I'm a beginner of maven. In my project, I have an file ftp.proterties only use for ftp config, not for I18N useage. This file's Content like : host=192.168.1.105 port=21 username=jade password=p@55w0rd When I run the JUnit test in Eclipse, Everything is OK. But when I run the TestCase with mvn test I get an exception: Tests in error: test(jadeutils.ftp.FtpServiceTest): Can't find bundle for base name ftp, locale en_US -- View this message in context: http://maven.40175.n5.nabble.com/MessageBundle-problem-for-using-maven-test-tp5757876.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [hidden email] http://user/SendEmail.jtp?type=nodenode=5757956i=1 For additional commands, e-mail: [hidden email] http://user/SendEmail.jtp?type=nodenode=5757956i=2 - Come read my webnovel, Take a Lemon http://www.takealemon.com, and listen to the Misfile radio play http://www.gold-family.us/audio/misfile.html! -- If you reply to this email, your message will be added to the discussion below: http://maven.40175.n5.nabble.com/MessageBundle-problem-for-using-maven-test-tp5757876p5757956.html To unsubscribe from MessageBundle problem for using maven test, click here . NAML http://maven.40175.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml -- View this message in context: http://maven.40175.n5.nabble.com/MessageBundle-problem-for-using-maven-test-tp5757876p5758036.html Sent from the Maven - Users mailing list archive at Nabble.com. - Come read my webnovel, Take a Lemon http://www.takealemon.com, and listen to the Misfile radio play http://www.gold-family.us/audio/misfile.html! -- If you reply to this email, your message will be added to the discussion below: http://maven.40175.n5.nabble.com/MessageBundle-problem-for-using-maven-test-tp5757876p5758040.html To unsubscribe from MessageBundle problem for using maven test, click
Re: MessageBundle problem for using maven test
Yes, but it clean stuff build by eclipse. So because eclipse copy the *.properties file to classpath. maven only copy files in resource folder. On Mon, Jun 3, 2013 at 9:09 PM, Ron Wheeler [via Maven] ml-node+s40175n5758126...@n5.nabble.com wrote: mvn clean doesn't build anything it just deletes stuff. Ron On 02/06/2013 10:27 PM, Jade wrote: Hi Russell: I put the file fpt.properties in the root of java source code foler src/main/java. And I load the file with ResourceBundle: ResourceBundle resourceBundle = ResourceBundle.getBundle(ftp); String host= resourceBundle.getString(host); Java Doc says ResourceBundle will looking for the file ftp_en_US.properties for my system local is en_US. If it can not file the file ftp_en_US.properties, ResourceBundle will load the file ftp.properties as default. Now the problem is : If my project was compile byEclipse, it's all OK when I run the test case both in Eclipe or run the test case by command mvn test. But if the project was compile by maven (I mean I run mvn clean), the test case will fail with the exception Can't find bundle. I think the class file compile by maven will not load fpt.properties as default when it can not file the file ftp_en_US.properties On Mon, Jun 3, 2013 at 2:19 AM, Russell Gold [via Maven] [hidden email] http://user/SendEmail.jtp?type=nodenode=5758126i=0 wrote: Hi Jade, Where are you placing the ftp.properties file and how does your program attempt to find it? - Russ On Jun 2, 2013, at 12:07 AM, Jade [hidden email] http://user/SendEmail.jtp?type=nodenode=5757956i=0 wrote: Hello everyone : I'm a beginner of maven. In my project, I have an file ftp.proterties only use for ftp config, not for I18N useage. This file's Content like : host=192.168.1.105 port=21 username=jade password=p@55w0rd When I run the JUnit test in Eclipse, Everything is OK. But when I run the TestCase with mvn test I get an exception: Tests in error: test(jadeutils.ftp.FtpServiceTest): Can't find bundle for base name ftp, locale en_US -- View this message in context: http://maven.40175.n5.nabble.com/MessageBundle-problem-for-using-maven-test-tp5757876.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [hidden email] http://user/SendEmail.jtp?type=nodenode=5757956i=1 For additional commands, e-mail: [hidden email] http://user/SendEmail.jtp?type=nodenode=5757956i=2 - Come read my webnovel, Take a Lemon http://www.takealemon.com, and listen to the Misfile radio play http://www.gold-family.us/audio/misfile.html! -- If you reply to this email, your message will be added to the discussion below: http://maven.40175.n5.nabble.com/MessageBundle-problem-for-using-maven-test-tp5757876p5757956.html To unsubscribe from MessageBundle problem for using maven test, click here . NAML http://maven.40175.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml -- View this message in context: http://maven.40175.n5.nabble.com/MessageBundle-problem-for-using-maven-test-tp5757876p5758036.html Sent from the Maven - Users mailing list archive at Nabble.com. -- Ron Wheeler President Artifact Software Inc email: [hidden email]http://user/SendEmail.jtp?type=nodenode=5758126i=1 skype: ronaldmwheeler phone: 866-970-2435, ext 102 - To unsubscribe, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=5758126i=2 For additional commands, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=5758126i=3 -- If you reply to this email, your message will be added to the discussion below: http://maven.40175.n5.nabble.com/MessageBundle-problem-for-using-maven-test-tp5757876p5758126.html To unsubscribe from MessageBundle problem for using maven test, click herehttp://maven.40175.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=5757876code=ZXZva2VyYWx1Y2FyZEBnbWFpbC5jb218NTc1Nzg3NnwtMTc3OTU4MDg4NQ== .
Re: Transitive Dependency Question
Interesting Taking your suggestion, it looks like it is coming in from another compile dependency, and was promoted to compile. [INFO] +- org.apache.maven.shared:maven-shared-jar:jar:1.1:compile [INFO] | +- org.codehaus.plexus:plexus-digest:jar:1.0:compile [INFO] | | \- org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-8:compile [INFO] | | +- junit:junit:jar:3.8.1:compile Is there a way to prevent this from happening without having to add exclude stanzas across projects where this is happening? On Mon, Jun 3, 2013 at 7:56 PM, Jörg Schaible joerg.schai...@gmx.de wrote: Hi Jamal, Jamal B wrote: Hello, I have a question about transitive dependencies. According to the pom documentation here: http://maven.apache.org/pom.html#Dependencies project dependencies marked with test scope are not transitive. I assumed that this also applied to it's dependencies, so my question is if I declare a dependency on a project at test scope, that project's dependencies should all be included at test scope. For example, given the following project(s) Project test-utils defines a junit dependency like such: dependency groupIdjunit/groupId artifactIdjunit/artifactId /dependency Project application defines a dependency on test-utils with a scope of test like such dependency groupId${project.groupId}/groupId artifactIdtest-utils/artifactId version${project.version}/version scopetest/scope /dependency Now running mvn clean dependency:tree shows that the junit dependency is being passed to the application project at compile scope which is not expected. [INFO] --- maven-dependency-plugin:2.7:tree (default-cli) @ application [--- INFO] org.sandbox:application:war:1.0.0-SNAPSHOT [INFO] \- org.sandbox:test-utils:jar:1.0.0-SNAPSHOT:test [INFO]+- junit:junit:jar:4.8.2:compile [INFO]+- org.mockito:mockito-all:jar:1.8.5:test [INFO]+- com.h2database:h2:jar:1.3.165:test [INFO]\- log4j:log4j:jar:1.2.16:test Is this a bug or was my interpretation of the transitive dependency logic incorrect? Thank you for your time. Actually I was fooled by such an output with M3 in one of my projects at first sight also. So, please make a test: Comment out the org.sandbox:test-utils in your POM and print the tree again. I am quite sure that you will see that junit:junit is now introduced by a different dependency that is not of test scope. What you see above is only the result of the dependency resolver. It detected that it already has a junit:junit in its transitive deps in compile scope (maybe even in a different version), but the nearest path to junit was as direct child of org.sandbox:test-utils. Therefor it was promoted to compile scope in this place, but the overall result of the compilation classpath is still OK, it is only the displayed tree that is somewhat inconsistent (compared to M2). - Jörg - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Cobertura multi-module report?
Hi, I see that the cobertura-maven-plugin has a parameter named, aggregate which I had hoped was similar to the aggregate report supported by the jar and javadoc plugins; however, when I enable it and disable inheritance, the report it generates is a blank page, so presumably I am not using it correctly. What is it supposed to do? - Russ - Come read my webnovel, Take a Lemon http://www.takealemon.com, and listen to the Misfile radio play http://www.gold-family.us/audio/misfile.html!