On Mon, 2004-03-15 at 08:54, [EMAIL PROTECTED] wrote:
> I have a Test class that requires to load a XML file.
> I do it like this:
> Thread.currentThread().getContextClassLoader
> ().getResource(Constants.XML_CONFIG_FILENAME_DEFAULT)
> Issue is that my Maven project does not include my xml/dtd files, so
> the test fails to load the xml resource.
> 
> My XML file is located in root source directory.
> $project/src/my.xml
> $project/src/com/.../.../.../
> 
> I have played around with my project.xml <build/> stuff with no luck.

<project>
  ...
  <build>
    ...
    <unitTest>
      ...
      <resources>
        <resource>
          <directory>${basedir}/src</directory>
          <includes>
            <include>*.xml</include>
          </includes>
        </resource>
      </resources>
    </unitTest>
    ...
  </build>
  ...
</project>

-- 
Craig S. Cottingham
[EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to