如何配置 RAD7.5 以使用一些预定义的过滤器
我正在使用 RAD7.5 进行项目开发。我的 web.xml 文件如下所示:
<context-param>
<param-name>config.file</param-name>
<param-value>@project.config.location@</param-value>
</context-param>
所以基本上 @project.config.location@ 是在 ant-build 过程中使用过滤器集代码从属性文件(config.properties)检索的,如下所示:
<copy todir="${project.build.dir}">
<fileset dir="${web.project.webcontent.dir}" excludes="**/classes/**" />
<filterset>
<filtersfile file="${web.project.src.dir}/filters/${file.filter.name}" />
</filterset>
</copy>
所以我的问题是如何配置RAD7.5 以便在本地部署应用程序时(右键单击项目 EAR -> 在服务器上运行)将替换这些过滤器。我一直在尝试寻找解决方案,但在网上找不到任何内容。有什么建议吗?
I am using RAD7.5 for the project development. My web.xml file looks like this:
<context-param>
<param-name>config.file</param-name>
<param-value>@project.config.location@</param-value>
</context-param>
So basically @project.config.location@ is retrieved from a properties file(config.properties) during the ant-build process using the filterset code as shown below:
<copy todir="${project.build.dir}">
<fileset dir="${web.project.webcontent.dir}" excludes="**/classes/**" />
<filterset>
<filtersfile file="${web.project.src.dir}/filters/${file.filter.name}" />
</filterset>
</copy>
So my problem is how to configure RAD7.5 so that while deploying the app locally(right click on the project EAR -> run on server) will replace these filters. I have been trying to find the solution but could not find anything on the web yet.Any suggestions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
也许在你的项目的属性->构建器中有蚂蚁构建器?另一方面,RAD 本身编辑和管理 web.xml,因此如果您更喜欢 RAD 流程,请设计不使用 ant 的应用程序。
maybe to have ant builder in properties->builders of your project? On the other way RAD itself edit and managed web.xml, so if you prefer RAD process, design your app without ant.
该项目是在另一个处理 ANT 的 IDE 中设计的。另外,我无法更改流程,因为 ANT 是公司在部署项目时的标准构建器。所有配置管理器都使用 Ant。我只是想让它与这两个选项兼容。我喜欢你的第一个建议,即在项目的属性->构建器中添加 ant 构建器。我该怎么做呢。到目前为止我已经这样做了...右键单击项目->属性->构建器。我只想在部署应用程序时应用该过滤器。所以因为我想将 @....@ 过滤器保留在我的 web.xml 中。有没有办法告诉 RAD 何时将应用程序部署到服务器,只需应用该过滤器(如下所示)进程(我只想修改 RAD 中的默认部署进程):
This project was designed in the other IDE which dealt with ANT. Also I cannot change the process because ANT is the standard builder for the company, when it comes to deploy the project.All the configuration managers use Ant.I just want to make it compatible with both the options. I liked your first suggestion i.e. to have ant builder in properties->builders of your project. How do I do that. I did this so far... Right Click on the project->Properties->Builders. I wanted only to apply that filter while deploying the app.So since I want to keep @....@ filters in my web.xml. Is there a way to tell RAD when It is deploying the app to the server just apply that filter(shown below) process on it's way(I just want to modify the default deploy process in the RAD):