maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ron Wheeler <rwhee...@artifact-software.com>
Subject Re: MessageBundle problem for using maven test
Date Mon, 03 Jun 2013 13:08:50 GMT
"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+s40175n5757956h15@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=node&node=5757956&i=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=node&node=5757956&i=1>
>>> For additional commands, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=5757956&i=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_code&node=5757876&code=ZXZva2VyYWx1Y2FyZEBnbWFpbC5jb218NTc1Nzg3NnwtMTc3OTU4MDg4NQ==>
>> .
>> NAML<http://maven.40175.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=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: rwheeler@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message