运行 具有自定义 domainsplittings.xml 和 urlrewriterules.xml 的 deployServer gradle 任务失败
Running deployServer gradle task with custom domainsplittings.xml and urlrewriterules.xml fails
将自定义 urlrewriterules.xml 和 domainsplittings.xml 文件添加到 "staticfiles\share\system\config\cluster\" 文件夹中的盒式磁带后,我们无法再执行 deployServer gradle 任务。任务失败并出现以下错误:
* What went wrong:
Execution failed for task ':init_project:deployShareFiles'.
> Could not deploy files of task :init_project:deployShareFiles
> Task :init_project:deployShareFiles: Resource 'C:\Work\Project\intershop-ci\sources\projects\webshop\build\server\share\system\config\cluster\domainsplittings.xml' already defined for Task :bc_urlrewrite:deployShareFiles
> Task :init_project:deployShareFiles: Resource 'C:\Work\Project\intershop-ci\sources\projects\webshop\build\server\share\system\config\cluster\urlrewriterules.xml' already defined for Task :bc_urlrewrite:deployShareFiles
有人知道这是为什么吗?我们如何添加自己的 url 重写规则,而无需每次在 deployServer 后编辑这些文件(从 bc_urlrewrite 盒复制系统规则)?
谢谢您的回答!
请看Cookbook - Deployment Tools ICM 7.x / 23 Recipe: Replace a File Deployed by Another Component:
Replacing a file is a drastic measure. Consider using content filters to alter an existing file instead of providing your own version, because it eases future migrations.
您似乎无法使用配置框架的环境特定文件来重载 $IS_SHARE/system/config/cluster/domainsplittings.xml
和 $IS_SHARE/system/config/cluster/urlrewriterules.xml
文件(使用固定路径加载,而不是通过配置框架加载)。
该错误表明两个不同的组件(bc_urlrewrite
与 init_project
)正在尝试部署相同的目标文件。您有两个选择:
- 使用内容过滤器更改现有文件,请参阅Cookbook - Deployment Tools ICM 7.x / 15 Recipe: Change Deployed File Content With Filters
- 通过从原始组件的部署中排除该文件来解决冲突
bc_urlrewrite
(提供自定义部署逻辑),参见:Cookbook - Deployment Tools ICM 7.x / 14 Recipe: Provide Custom Deployment Configuration and Logic
将自定义 urlrewriterules.xml 和 domainsplittings.xml 文件添加到 "staticfiles\share\system\config\cluster\" 文件夹中的盒式磁带后,我们无法再执行 deployServer gradle 任务。任务失败并出现以下错误:
* What went wrong:
Execution failed for task ':init_project:deployShareFiles'.
> Could not deploy files of task :init_project:deployShareFiles
> Task :init_project:deployShareFiles: Resource 'C:\Work\Project\intershop-ci\sources\projects\webshop\build\server\share\system\config\cluster\domainsplittings.xml' already defined for Task :bc_urlrewrite:deployShareFiles
> Task :init_project:deployShareFiles: Resource 'C:\Work\Project\intershop-ci\sources\projects\webshop\build\server\share\system\config\cluster\urlrewriterules.xml' already defined for Task :bc_urlrewrite:deployShareFiles
有人知道这是为什么吗?我们如何添加自己的 url 重写规则,而无需每次在 deployServer 后编辑这些文件(从 bc_urlrewrite 盒复制系统规则)?
谢谢您的回答!
请看Cookbook - Deployment Tools ICM 7.x / 23 Recipe: Replace a File Deployed by Another Component:
Replacing a file is a drastic measure. Consider using content filters to alter an existing file instead of providing your own version, because it eases future migrations.
您似乎无法使用配置框架的环境特定文件来重载 $IS_SHARE/system/config/cluster/domainsplittings.xml
和 $IS_SHARE/system/config/cluster/urlrewriterules.xml
文件(使用固定路径加载,而不是通过配置框架加载)。
该错误表明两个不同的组件(bc_urlrewrite
与 init_project
)正在尝试部署相同的目标文件。您有两个选择:
- 使用内容过滤器更改现有文件,请参阅Cookbook - Deployment Tools ICM 7.x / 15 Recipe: Change Deployed File Content With Filters
- 通过从原始组件的部署中排除该文件来解决冲突
bc_urlrewrite
(提供自定义部署逻辑),参见:Cookbook - Deployment Tools ICM 7.x / 14 Recipe: Provide Custom Deployment Configuration and Logic