On Thu, 2004-01-01 at 20:47, Chad Woolley wrote: > Hi, > > I use a resource bundle in my app. In my ResourceManager class, I load it like > this: > > ClassLoader classLoader = this.getClass().getClassLoader(); > resourceBundle = ResourceBundle.getBundle(resourceFileName, locale, > classLoader);
Hm. I used cactus tests to run unit tests in a container to get this working. I'm guessing that it won't work unless your resource bundles are on the classpath. How you add *.properties files to a classpath in Maven -- well, I don't know. ;) I'm curious, but does the <resource> tag take care of this? Or do you have to do something interesting in maven.xml? Keith > However, when I run my ResourceManagerTest unit test via the default "test" > goal, my class always fails because it cannot find the resource bundle. > > I tried specifying the bundle in the <resources> section of project.xml, but > this doesn't seem to work. > > Is there a standard way to handle this, or any other maven projects that I can > look at for an example? > > FYI - if I make custom goals to manually copy the bundle to basedir, and > manually invoke JUnit, then it works. This method doesn't work when using the > standard maven "test" goal, though. > > Thanks, > Chad > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]