exclude WEB-INF from a maven generated war

user3731460

How do I prevent the WEB-INF directory from being included in the .war package?

This does not work.

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-war-plugin</artifactId>
    <version>2.1</version>
    <configuration>
        <warSourceExcludes>WEB-INF/**</warSourceExcludes>
    </configuration>
</plugin>

This does not work, either.

        <warSourceExcludes>WEB-INF</warSourceExcludes>
user3731460

Since it's a static HTML site with only .js, .css, and .html, I switched to the rar package format that only generates a META-INF. Then I added this:

<project>
  ...
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <version>2.3</version>
        <configuration>
          <archive>
            <addMavenDescriptor>false</addMavenDescriptor>
          </archive>
        </configuration>
      </plugin>
    </plugins>
  </build>
  ...
</project>

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Exclude META-INF/maven folder from the generated jar file

From Dev

Maven - Exclude class files from war

From Dev

Conditionally exclude some resources in maven from war

From Dev

Maven - Exclude class files from war

From Dev

maven - how to exclude an entire module on from war

From Dev

How to exclude certain resources from the maven war plugin war file?

From Dev

Maven - How to exclude dependencies from generated JAR

From Dev

Maven war and put the version number in the jars in WEB-INF/lib

From Dev

Remove version information from maven generated war file

From Dev

How to exclude specific jars from WEB-INF/lib

From Dev

How to Include specific jars in WAR, WEB-INF/lib directory with maven

From Dev

Jar maven dependency disappears from my WEB-INF/lib

From Dev

Maven war plugin archiveClasses but exclude a package

From Dev

Spring Boot - Loading 'logback.xml' from the WEB-INF/ folder when deploying as WAR

From Dev

class files from WEB-INF of war file are not produced when processing with proguard

From Dev

Is it possible to have Maven "WAR" pom.xml package up my classes up in a JAR and put the JAR in the /WEB-INF/lib folder?

From Dev

How to exclude target folder from maven source packages generated with mvn deploy?

From Dev

Cannot run the war generated from Gradle BootRepackage in a JHipster-based web Application

From Dev

Filtering in maven-war-plugin does not exclude directory

From Dev

maven-war-plugin: exclude all directories but one

From Dev

Filtering in maven-war-plugin does not exclude directory

From Dev

Package Java classes under WEB-INF folder in WAR file

From Dev

Duplicate WEB-INF folder created with maven build with package goal from Eclipse Kepler

From Dev

Maven - exclude folder from build

From Dev

maven: exclude jar from JDK

From Dev

Cannot set web-uri with gradle ear plugin to inclue war from maven repository

From Dev

Best maven practices for modifying built war-file with generated resources

From Dev

How to exclude generated code from coverage statistics

From Dev

Force weblogic to exclude IncludeTimestamp from generated wsdl

Related Related

  1. 1

    Exclude META-INF/maven folder from the generated jar file

  2. 2

    Maven - Exclude class files from war

  3. 3

    Conditionally exclude some resources in maven from war

  4. 4

    Maven - Exclude class files from war

  5. 5

    maven - how to exclude an entire module on from war

  6. 6

    How to exclude certain resources from the maven war plugin war file?

  7. 7

    Maven - How to exclude dependencies from generated JAR

  8. 8

    Maven war and put the version number in the jars in WEB-INF/lib

  9. 9

    Remove version information from maven generated war file

  10. 10

    How to exclude specific jars from WEB-INF/lib

  11. 11

    How to Include specific jars in WAR, WEB-INF/lib directory with maven

  12. 12

    Jar maven dependency disappears from my WEB-INF/lib

  13. 13

    Maven war plugin archiveClasses but exclude a package

  14. 14

    Spring Boot - Loading 'logback.xml' from the WEB-INF/ folder when deploying as WAR

  15. 15

    class files from WEB-INF of war file are not produced when processing with proguard

  16. 16

    Is it possible to have Maven "WAR" pom.xml package up my classes up in a JAR and put the JAR in the /WEB-INF/lib folder?

  17. 17

    How to exclude target folder from maven source packages generated with mvn deploy?

  18. 18

    Cannot run the war generated from Gradle BootRepackage in a JHipster-based web Application

  19. 19

    Filtering in maven-war-plugin does not exclude directory

  20. 20

    maven-war-plugin: exclude all directories but one

  21. 21

    Filtering in maven-war-plugin does not exclude directory

  22. 22

    Package Java classes under WEB-INF folder in WAR file

  23. 23

    Duplicate WEB-INF folder created with maven build with package goal from Eclipse Kepler

  24. 24

    Maven - exclude folder from build

  25. 25

    maven: exclude jar from JDK

  26. 26

    Cannot set web-uri with gradle ear plugin to inclue war from maven repository

  27. 27

    Best maven practices for modifying built war-file with generated resources

  28. 28

    How to exclude generated code from coverage statistics

  29. 29

    Force weblogic to exclude IncludeTimestamp from generated wsdl

HotTag

Archive