【问题标题】:How to create a directory structure using maven pom xml file如何使用 maven pom xml 文件创建目录结构
【发布时间】:2016-06-06 04:40:35
【问题描述】:

我有一个基于 maven 的项目,其中包含一个 pom.xml 文件。当我点击命令时:

mvn clean install 什么的

我希望它创建一个目录结构,例如

project_root/dir1/temp project_root/dir2/engine project_root/dir2/content project_root/dir2/new project_root/dir2/old

这是对target、src 等的补充......

我对@9​​87654324@不感兴趣

我想让这个目录在 pom xml 文件中创建逻辑。

有什么办法吗?任何帮助或建议将不胜感激。

【问题讨论】:

  • maven archetype 可能会帮助您根据需要创建模板并使用它

标签: java xml maven pom.xml


【解决方案1】:

您必须为您的要求编写一个新的原型,因为它似乎不是一个非常通用的模型。您可以采用更适合您的原型,下载实际源代码并将您的目录添加到 artifactDescriptor 并重新打包(快速修复)。

编辑 https://github.com/sundarmr/mavenarchetypes/tree/master/myarchetype,根据需要,但我不建议创建此类项目。

【讨论】:

    【解决方案2】:
    猜你喜欢
    • 2011-05-09
    • 1970-01-01
    • 1970-01-01
    • 2018-12-26
    • 2014-01-27
    • 2021-05-08
    • 2012-07-24
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多