【问题标题】:Where Maven Assembly Plugin Reads Static HTML Files From Under TargetMaven 程序集插件从目标下读取静态 HTML 文件的位置
【发布时间】:2013-01-27 05:21:55
【问题描述】:

我有一个项目在其 pom.xml 中具有 maven 程序集插件依赖项。它在包装阶段运行。我开发了一个在包阶段之前运行的自定义 maven 插件。我有一个 Web 应用程序,它下面有 src/main/webapp 文件夹和 html 文件。我的maven组件配置如下:

    <id>bin</id>
<formats>
    <format>dir</format>
    <format>tar.gz</format>
</formats>

<includeBaseDirectory>false</includeBaseDirectory>

<fileSets>
    <fileSet>
        <directory>src/main/webapp</directory>
        <outputDirectory>${ret}/wwwroot/teo</outputDirectory>
        <includes>
            <include>**/*.*</include>
        </includes>
        <excludes>
            <exclude>**/.idea/**</exclude>
        </excludes>
    </fileSet>
    <fileSet>
        <directory>target/generated-sources</directory>
        <outputDirectory>${ret}/wwwroot/teo</outputDirectory>
        <includes>
            <include>**/*.html</include>
        </includes>
    </fileSet>
</fileSets>

这不是我开发的项目,我对 maven 汇编插件不熟悉。我刚刚将我的自定义插件集成到该项目中。但是我应该找到目标文件夹下的 maven 程序集插件读取文件的位置?我将使用我的自定义 maven 插件更改其中的一些 html 文件,maven 程序集插件将在其阶段发挥作用。

目标文件夹下的html文件在哪里?除了maven程序集生成的文件夹之外似乎没有什么重要的,那个插件会删除原始文件夹吗?

【问题讨论】:

  • 我不完全确定你在问什么。似乎 html 文件来自目标/生成的源。这意味着必须有另一个 Maven 插件正在生成 html 文件。
  • @Pace 你可以把它写成答案,它是用资源插件修复的。

标签: java maven web-applications maven-plugin maven-plugin-development


【解决方案1】:

target/generated-sources 通常是 Maven 插件放置在构建过程中创建的源文件的位置。您的 pom 文件中可能还有一些其他插件将这些 HTML 文件放在那里。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-12-30
    • 1970-01-01
    • 2011-12-13
    • 1970-01-01
    • 2017-01-28
    • 2017-10-23
    • 2013-10-27
    • 2022-01-09
    相关资源
    最近更新 更多