Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/12.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/5.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
Spring3NamespaceHandler与Maven Shade插件的问题_Spring_Maven_Maven 3_Spring 3_Maven Shade Plugin - Fatal编程技术网

Spring3NamespaceHandler与Maven Shade插件的问题

Spring3NamespaceHandler与Maven Shade插件的问题,spring,maven,maven-3,spring-3,maven-shade-plugin,Spring,Maven,Maven 3,Spring 3,Maven Shade Plugin,Spring3.1.1.1发布了ApacheMaven3.0.3和MavenShade插件1.6 使用mvn shade插件将工件打包到uber jar中,包括其依赖项: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>1.6</ve

Spring3.1.1.1发布了ApacheMaven3.0.3和MavenShade插件1.6

使用mvn shade插件将工件打包到uber jar中,包括其依赖项:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-shade-plugin</artifactId>
    <version>1.6</version>
    <executions>
        <execution>
        <phase>package</phase>
        <goals>
            <goal>shade</goal>
        </goals>
        <configuration>
            <transformers>
                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                    <mainClass>com.MyApplication</mainClass>
                </transformer>
            </transformers>
        </configuration>
    </execution>
</executions>
这适用于util和p名称空间,但不限于:

xmlns:util="http://www.springframework.org/schema/util"
xmlns:p="http://www.springframework.org/schema/p"

如果我直接重写属性或列表(util),问题就会消失。

尝试向配置中添加一个。该示例特别提到这对Spring处理程序非常有用。

这也帮助了我,它不适用于maven assembly插件,不适用于shade,但适用于您的答案。请你解释一下这里发生了什么,为什么会这样?
xmlns:util="http://www.springframework.org/schema/util"
xmlns:p="http://www.springframework.org/schema/p"