Версия для печати темы
Нажмите сюда для просмотра этой темы в оригинальном формате
Форум программистов > Java tools & IDE's > rpm-maven-plugin ошибка при сборке


Автор: wiremann 3.9.2017, 19:33
Здравствуйте, подскажите пж-та, начинаю изучать java, есть самый простейший проект hello world, который собирается с помощью maven. jar-файл собирается без проблем. Теперь хочу сформировать rpm - использую плагин rpm-maven-plugin в pom.xml своего проекта. Но при выполнении mvn clean install выдается ошибка "Failed to execute goal org.codehaus.mojo:rpm-maven-plugin:2.1.2:attached-rpm (default) on project mymaven: Unable to copy files for packaging: You must set at least one file". В чем может быть проблема? pom.xml прикладываю

pom.xml:
Код

<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

    <modelVersion>4.0.0</modelVersion>

    <groupId>com.mycompany.test</groupId>
    <artifactId>mymaven</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>pom</packaging>

    <name>mymaven</name>
    <url>http://maven.apache.org</url>;

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>3.8.1</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>rpm-maven-plugin</artifactId>
                <version>2.1.2</version>
                <extensions>true</extensions>
                <executions>
                    <execution>
                        <goals>
                            <goal>attached-rpm</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <name>PName</name>
                    <release>1</release>
                    <copyright/>
                    <distribution/>
                    <workarea>target/rpm</workarea>
                    <group>test</group>
                    <mappings>
                        <mapping>
                            <directory>/maven_projects/</directory>
                            <filemode>755</filemode>
                            <username>user</username>
                            <groupname>sysop</groupname>
                            <sources>
                                <source>
                                    <location>/maven_projects/</location>
                                    <includes>
                                        <include>*.jar</include>
                                    </includes>

                                </source>
                            </sources>
                        </mapping>
                        <mapping>
                            <directory>/maven_projects/</directory>
                            <filemode>755</filemode>
                            <username>user</username>
                            <groupname>sysop</groupname>
                            <sources>
                                <source>
                                    <location>src/resources</location>
                                    <includes> 
                                        <include>*.properties</include>
                                    </includes>
                                </source>
                            </sources>
                        </mapping>
                    </mappings>
                    <postinstallScript />
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

Автор: LSD 4.9.2017, 11:14
Подозреваю, что ни один файл не попадает под маски *.jar и *.properties

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)