Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Maven 从.war文件中排除文件夹_Maven_Tomcat_Spark Java - Fatal编程技术网

Maven 从.war文件中排除文件夹

Maven 从.war文件中排除文件夹,maven,tomcat,spark-java,Maven,Tomcat,Spark Java,我是马文的新手。我的战争建筑专家如下 <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.4</version> <configuration> <failOnMissingWebXml&g

我是马文的新手。我的战争建筑专家如下

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-war-plugin</artifactId>
    <version>2.4</version>
    <configuration>
        <failOnMissingWebXml>false</failOnMissingWebXml>
        <webXml>src/main/webapp/WEB-INF/web.xml</webXml>
        <packagingIncludes>resources/src/**</packagingIncludes>
    </configuration>
</plugin>

org.apache.maven.plugins
maven战争插件
2.4
假的
src/main/webapp/WEB-INF/WEB.xml
资源/src/**
我的应用程序是spark java web应用程序。我也在使用angular2。Typescript和相关库文件位于src/main/resources/src/文件夹中。我使用gulp编译typescrpt文件,生成的文件进入src/main/resources/public/文件夹。我想从src/main/resources/src/中排除所有文件和子文件夹


我尝试过PackageIncludes和warSourceExcludes,但都不适合我。任何帮助都将不胜感激

您可以这样排除整个目录:

<build>
    <resources>
        <resource>
            <directory>src/main/resources/src/</directory>
            <excludes>
                <exclude>*</exclude>
            </excludes>
        </resource>
    </resources>
</build>

src/main/resources/src/
*

或者将文件夹更改为:“src/main/typescript”。

您可以这样排除整个目录:

<build>
    <resources>
        <resource>
            <directory>src/main/resources/src/</directory>
            <excludes>
                <exclude>*</exclude>
            </excludes>
        </resource>
    </resources>
</build>

src/main/resources/src/
*
或者将文件夹更改为:“src/main/typescript”。

生成的文件将转到src/main/resources/public/folder:请不要这样做。从未。在
目标下生成文件。不同的位置对你来说意味着痛苦和痛苦,仅此而已。生成的文件转到src/main/resources/public/folder:请不要这样做。从未。在
目标下生成文件。一个不同的位置对你来说意味着痛苦和痛苦,仅此而已。