maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wayne Fay" <>
Subject Eclipse complaining about filter tokens in orion-application.xml file
Date Mon, 24 Sep 2007 16:13:32 GMT
If you read all of my posts to this list (doubtful), then you'll know
that I'm working with Eclipse lately (under the guise of SAP NWDS).

Things are generally OK except that Eclipse is complaining about my
orion-application.xml file. I am using filtering to insert values
during the build, but Eclipse doesn't know that so it complains, and
I'm not sure what the best approach is to get around this annoyance.

Here's the file and it works great in Maven:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE orion-application PUBLIC "-//ORACLE//DTD OC4J Application
runtime 9.04//EN"
	<jazn ${jazn.config} />

And my corresponding profiles.xml:
prod,qe => <jazn.config>provider="LDAP"</jazn.config>
local => <jazn.config>provider="XML" location="jazn-data.xml"

(Basically its a hassle to set up the LDAP option, so we just use the
XML option locally, but then on the prod and qe environment we like to
use LDAP.)

I've tried the following:
	<jazn provider="${jazn.config}" />

Plus changed profiles.xml:
prod,qe => <jazn.config>LDAP</jazn.config>
local => <jazn.config>XML" location="jazn-data.xml"

That should work, but Eclipse looks at the DTD and says "options for
provider are XML and LDAP" and breaks.

Similar stuff happens when I tried:
and other things similar. The DTD says the file is bad so Eclipse complains.

My next thought is to simply replace the filtered file with a full
(proper) XML file for each environment and then tell Maven to copy one
or the other using profiles. But I'm not certain if this is the best
approach, nor am I sure how the main/src/resources folder should look
to make this work best. Another option is to write a little plugin
that I can add some configuration options to etc and allow it to
generate the file for me during the build.

Anyone run into this (or something similar) and have some
advice/options for the best way forward? I'd be OK with a simple way
to tell Eclipse "shut up, this file is fine" but can't find that
option... ;-)


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message