Maven “如何解决一个问题”;此项目的打包未将文件分配给构建工件“0”;错误?

Maven “如何解决一个问题”;此项目的打包未将文件分配给构建工件“0”;错误?,maven,maven-3,maven-war-plugin,maven-install-plugin,Maven,Maven 3,Maven War Plugin,Maven Install Plugin,我使用的是Maven 3.2.3。我曾经能够在我的WAR项目上运行“mvn clean install”,WAR将被安装到我的本地存储库中。但是,我最近添加了一个配置,以便在适当的位置构建WAR(配置如下)。现在,当我跑的时候 mvn clean install 我得到了错误 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.5.2:install (install) on projec

我使用的是Maven 3.2.3。我曾经能够在我的WAR项目上运行“mvn clean install”,WAR将被安装到我的本地存储库中。但是,我最近添加了一个配置,以便在适当的位置构建WAR(配置如下)。现在,当我跑的时候

mvn clean install
我得到了错误

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.5.2:install (install) on project myproject: The packaging for this project did not assign a file to the build artifact -> [Help 1]
我该如何解决这个问题?我尝试将maven安装插件的“安装”目标设为默认目标,但没有帮助。下面是我的Maven配置

                <plugin>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>2.4.1</version>
                    <configuration>
                        <filesets>
                            <fileset>
                                <directory>${project.basedir}/src/main/webapp/WEB-INF/classes</directory>
                            </fileset>
                            <fileset>
                                <directory>${project.basedir}/src/main/webapp/WEB-INF/lib</directory>
                            </fileset>
                        </filesets>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-war-plugin</artifactId>
                    <version>2.6</version>
                    <configuration>
                        <useCache>true</useCache>
                        <workDirectory>/tmp/${project.artifactId}/war/work</workDirectory>
                    </configuration>
                    <executions>
                        <execution>
                            <id>default-war</id>
                            <phase>none</phase>
                        </execution>
                        <execution>
                            <id>war-inplace</id>
                            <phase>package</phase>
                            <goals>
                                <goal>inplace</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>2.5.2</version>
                    <executions>
                        <execution>
                            <id>default-install</id>
                            <phase>none</phase>
                        </execution>
                        <execution>
                            <id>install</id>
                            <phase>install</phase>
                            <goals>
                                <goal>install</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

maven清洁插件
2.4.1
${project.basedir}/src/main/webapp/WEB-INF/classes
${project.basedir}/src/main/webapp/WEB-INF/lib
org.apache.maven.plugins
maven战争插件
2.6
真的
/tmp/${project.artifactId}/war/work
默认战争
没有一个
战事
包裹
原地
org.apache.maven.plugins
maven安装插件
2.5.2
默认安装
没有一个
安装
安装
安装

添加以下rpm条目

    %_rpmfilename noarch/%%{NAME}-%%{VERSION}-%%{RELEASE}.noarch.rpm
在下面提到的每个文件中,我都解决了这个问题。(从64到无拱)


我认为,当您指定
defaultwarnone
时,不会生成任何工件。因此,无法安装任何设备。这确实是答案。
    vim /etc/rpm/macros
    vim ~/.rpmmacros