Search code examples
javamavenweb-applicationsmaven-pluginmaven-plugin-development

Where Maven Assembly Plugin Reads Static HTML Files From Under Target


I have a project that has maven assembly plugin dependency at its pom.xml. It runs at package phase. I have developed a custom maven plugin that runs before package phase. I have a web application and it has src/main/webapp folder and html files under it. My maven assembly configuration as follows:

    <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>

It is not a project that I developed and I am not familiar with maven assembly plugin. I have just integrated my custom plugin into that project. However I should find where maven assembly plugin read files under target folder? I will change some html files inside it with my custom maven plugin and maven assembly plugin will take the role at its phase.

Where is html files under target folder? There is nothing important seems except for maven assembly generated folders, does that plugin deletes original folder?


Solution

  • target/generated-sources is usually a location that Maven plugins place source files that are created during the build process. It is likely there is some other plugin in your pom file which is placing those HTML files there.