Domanda

  <plugin>
    <artifactId>maven-war-plugin</artifactId>
    <configuration>
      <webResources>
        <resource>
          <directory>${jquery.ui.dir}/build/dist</directory>
          <includes>
            <include>**/ui/minified/jquery-ui.min.js</include>
          </includes>
          <targetPath>${js.resources.dir}</targetPath>
        </resource>
      </webResources>
    </configuration>
  </plugin>

This would cause subdirectories:

${js.resources.dir} > jquery-ui-1.9pre > ui > minified > jquery-ui.min.js

But I would like to have the file directly in ${js.resources.dir} and I cannot change the folder structure of jquery-ui and patterns are not possible in <directory> tag.

Isn't there any way to use a flatten mapper or a flatten option?

È stato utile?

Soluzione 2

jquery-ui switched to another build system called grunt. Maybe this build mechanism will change folder structure. I have to use maven-antrun-plugin to copy the necessary files instead if there's no folder structure change...

Altri suggerimenti

In this specific case, you could do the following:

  <directory>${jquery.ui.dir}/build/dist/ui/minified</directory>
  <includes>
    <include>jquery-ui.min.js</include>
  </includes>
  <targetPath>${js.resources.dir}</targetPath>

In general, this could be one approach to avoid creating subfolders in the targetPath.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top