|
[x]
Posted via EE Mobile
|
|
| Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
|
|
|
|
Asked by gordon_vt02 in NetBeans IDE, Java Editors & IDEs, Development Editors & IDEs
I have a Java Web Application project that I am developing in NetBeans 6.7.1. The data source is configured in the META-INF/context.xml file but its properties are set at build time using ant filtering during copy. The IDE doesn't recognize the @db.xxxx@ properties in the context.xml file and is telling me there is a data source problem that needs to be resolved (marking project in red, "Resolve Data Source Problem" option added to menu). How can I disable this behavior since I don't need NetBeans to be aware of the data source and, due to the build-time configuration, it won't ever be?
I am unable to change either the method of defining the data source (context.xml) or the configuration strategy for separate deployments (ant filtering) and just want to find out how to turn off the NetBeans notification that there is an error in the project.
Thanks!
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
|
Context.xml:
<Context antiJARLocking="true" path="/myapp">
<Resource name="jdbc/myapp"
auth="Container"
type="javax.sql.DataSource"
maxActive="50"
maxIdle="15"
maxWait="10000"
username="@db.user@"
password="@db.password@"
driverClassName="com.mysql.jdbc.Driver"
url="@db.url@"
validationQuery="SELECT 1"
removeAbandoned="true"
removeAbandonedTimeout="60"/>
filter.properties:
db.user=mydbuser
db.password=mypass
db.url=jdbc:mysql://dbhost:3306/myappdb
Relevant build.xml target (only relevant copy task is listed):
<target name="-copy-webdir">
<!-- Copy all non-filtered files from web and WEB-INF directories to build dir. -->
<!-- Copy all filtered files from WEB-INF to build dir. -->
<copy todir="${buid.web.dir}" filtering="true">
<filterset filtersfile="${basedir}/filter.properties"/>
<fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="**/*.xml,**/*.properties"/>
</copy>
</target>
|
20091021-EE-VQP-81 - Hierarchy / EE_QW_3_20080625