多模块项目可以全部构建,但是带有工件的最后一个模块不是zip错误

时间:2019-05-24 15:53:13

标签: apache maven multi-module

我有一个多模块项目,并且所有模块都可以编译,除了一个以外,其他所有版本均作为maven全新安装。最后一个eGSoftware不会。我收到以下错误:maven -assembly-plugin:3.1.1:single无法创建程序集:创建程序集存档应用程序时出错:存档不是zip存档。

这是旧项目的新编译-主要是软件更新以及Maven更新。我已经用谷歌找到的东西反复检查了pom和project文件,但是没有找到。我是一名新手,但确实需要完成此操作。

eGSoftware pom.xml

<modelVersion>4.0.0</modelVersion>
<parent>
    <groupId>org.widernet</groupId>
    <artifactId>pieParent</artifactId>
    <version>3.0</version>
</parent>
<artifactId>PIE</artifactId>
<name>PIE Assembly</name>
<build>
    <plugins>
        <plugin>
            <artifactId>maven-assembly-plugin</artifactId>
            <version>3.1.1</version>
            <configuration>
            <basedir>
                E:\software\lib
            </basedir>
                <descriptors>
                    <descriptor>src/main/assemblies/project.xml</descriptor>
                </descriptors>
                <finalName>PIE-${project.version}-rel-${buildNumber}</finalName>
                <appendAssemblyId>true</appendAssemblyId>
                <dryRun>true</dryRun>
            </configuration>
            <executions>
                <execution>
                    <id>make-assembly</id> <!-- this is used for inheritance merges -->
                    <phase>package</phase> <!-- append to the packaging phase. -->
                    <goals>
                        <!--<goal>directory-inline</goal>-->
                        <goal>single</goal> <!-- goals == mojos -->
                    </goals>
                </execution>
            </executions>

        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-antrun-plugin</artifactId>
            <version>1.8</version>
            <executions>
                <execution>
                    <id>ant-magic</id>
                    <phase>prepare-package</phase>
                    <goals>
                        <goal>run</goal>
                    </goals>
                    <configuration>
                        <tasks>
                            <mkdir dir="/target/version" />
                            <echo file="/target/version/version.txt" message="${project.version}r${buildNumber}" />
                        </tasks>
                    </configuration>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>


<dependencies>
    <dependency>
        <groupId>org.widernet</groupId>
        <artifactId>egranutils</artifactId>
        <version>${project.version}</version>
        <scope>compile</scope>
    </dependency>

    <dependency>
        <groupId>org.widernet</groupId>
        <artifactId>controlcenter</artifactId>
        <version>${project.version}</version>
        <scope>compile</scope>
    </dependency>

    <dependency>
        <groupId>org.widernet</groupId>
        <artifactId>controlcenter</artifactId>
        <version>${project.version}</version>
        <scope>compile</scope>
        <type>zip</type>
        <classifier>exe</classifier>
    </dependency>

    <dependency>
        <groupId>org.apache.httpd</groupId>
        <artifactId>winEgranApache</artifactId>
        <version>2.4.6</version>
        <scope>compile</scope>
        <type>zip</type>
    </dependency>

    <dependency>
        <groupId>com.sysinternals</groupId>
        <artifactId>junction</artifactId>
        <version>1.05</version>
        <scope>compile</scope>
        <type>zip</type>
    </dependency>

    <dependency>
        <groupId>com.sun.java</groupId>
        <artifactId>win_jdk</artifactId>
        <version>1.8.0_202</version>
        <scope>compile</scope>
        <type>zip</type>
    </dependency>

    <dependency>
        <groupId>com.mysql</groupId>
        <artifactId>winEgranMysql</artifactId>
        <version>5.7.25</version>
        <scope>compile</scope>
        <type>zip</type>
    </dependency>

    <dependency>
        <groupId>org.widernet</groupId>
        <artifactId>apacheConf</artifactId>
        <version>${project.version}</version>
        <classifier>zip</classifier>
        <scope>compile</scope>
        <type>zip</type>
    </dependency>

    <dependency>
        <groupId>org.widernet</groupId>
        <artifactId>confTemplates</artifactId>
        <version>${project.version}</version>
        <classifier>zip</classifier>
        <scope>compile</scope>
        <type>zip</type>
    </dependency>

    <dependency>
        <groupId>net.php</groupId>
        <artifactId>winEgranPhp</artifactId>
        <version>7.2.14</version>
        <scope>compile</scope>
        <type>zip</type>
    </dependency>

    <dependency>
        <groupId>org.widernet</groupId>
        <artifactId>winscripts</artifactId>
        <version>${project.version}</version>
        <classifier>zip</classifier>
        <scope>compile</scope>
        <type>zip</type>
    </dependency>

    <dependency>
        <groupId>org.widernet</groupId>
        <artifactId>openDS</artifactId>
        <version>2.3r6408</version>
        <type>zip</type>
    </dependency>

    <dependency>
        <groupId>net.sourceforge.phpldapadmin</groupId>
        <artifactId>phpldapadmin</artifactId>
        <version>1.2.3</version>
        <type>zip</type>
    </dependency>

    <dependency>
        <groupId>net.phpmyadmin</groupId>
        <artifactId>phpMyAdmin</artifactId>
        <version>4.0.8</version>
        <type>zip</type>
    </dependency>

    <dependency>
        <groupId>com.strawberryperl</groupId>
        <artifactId>perl</artifactId>
        <version>5.10.0.4</version>
        <type>zip</type>
    </dependency>
    <dependency>
        <groupId>org.widernet.cip.apptemp</groupId>
        <artifactId>drupalbasic</artifactId>
        <version>2.0</version>
        <scope>compile</scope>
        <type>zip</type>
    </dependency>

    <dependency>
        <groupId>org.widernet.cip.base</groupId>
        <artifactId>drupalbasic</artifactId>
        <version>2.0</version>
        <scope>compile</scope>
        <type>zip</type>
    </dependency>

    <dependency>
        <groupId>org.widernet</groupId>
        <artifactId>winutility</artifactId>
        <version>${project.version}</version>
        <classifier>zip</classifier>
        <scope>compile</scope>
        <type>zip</type>
    </dependency>
    <dependency>
        <groupId>org.widernet.webapp</groupId>
        <artifactId>status</artifactId>
        <version>2.0</version>
        <scope>compile</scope>
        <type>zip</type>
    </dependency>

    <dependency>
        <groupId>org.widernet.webapp</groupId>
        <artifactId>pfn</artifactId>
        <version>${project.version}</version>
        <classifier>zip</classifier>
        <scope>compile</scope>
        <type>zip</type>
    </dependency>

    <dependency>
        <groupId>org.widernet.webapp</groupId>
        <artifactId>vufind</artifactId>
        <version>${project.version}</version>
        <classifier>zip</classifier>
        <scope>compile</scope>
        <type>zip</type>
    </dependency>

    <dependency>
        <groupId>org.widernet.webapp</groupId>
        <artifactId>common</artifactId>
        <version>${project.version}</version>
        <classifier>zip</classifier>
        <scope>compile</scope>
        <type>zip</type>
    </dependency>

    <dependency>
        <groupId>org.widernet.webapp</groupId>
        <artifactId>cippanel</artifactId>
        <version>${project.version}</version>
        <classifier>zip</classifier>
        <scope>compile</scope>
        <type>zip</type>
    </dependency>

    <dependency>
        <groupId>org.widernet.webapp</groupId>
        <artifactId>moodle</artifactId>
        <version>${project.version}</version>
        <classifier>zip</classifier>
        <scope>compile</scope>
        <type>zip</type>
    </dependency>

    <dependency>
        <groupId>org.widernet.webapp</groupId>
        <artifactId>wordpress</artifactId>
        <version>${project.version}</version>
        <classifier>zip</classifier>
        <scope>compile</scope>
        <type>zip</type>
    </dependency>

    <dependency>
        <groupId>org.widernet</groupId>
        <artifactId>Installer</artifactId>
        <version>${project.version}</version>
        <classifier>zip</classifier>
        <scope>compile</scope>
        <type>zip</type>
    </dependency>

    <dependency>
        <groupId>org.widernet.data</groupId>
        <artifactId>mysqldata</artifactId>
        <version>2.1</version>
        <scope>compile</scope>
        <type>zip</type>
    </dependency>

    <dependency>
        <groupId>org.widernet.data</groupId>
        <artifactId>opendsdata</artifactId>
        <version>2.1</version>
        <scope>compile</scope>
        <type>zip</type>
    </dependency>

    <dependency>
        <groupId>org.widernet.data.mysql</groupId>
        <artifactId>pfndata</artifactId>
        <version>3.0</version>
        <scope>compile</scope>
        <type>zip</type>
    </dependency>
    <dependency>
        <groupId>org.widernet.data.mysql</groupId>
        <artifactId>zpaneldata</artifactId>
        <version>2.1</version>
        <scope>compile</scope>
        <type>zip</type>
    </dependency>

    <dependency>
        <groupId>org.widernet</groupId>
        <artifactId>eGBrowser</artifactId>
        <version>52.9.0</version>
        <scope>compile</scope>
        <type>zip</type>
    </dependency>

</dependencies>

父pom.xml

<modules>
    <module>apacheConf</module>
    <module>cippanel</module>
    <module>egranutils</module>
    <module>linscripts</module>
    <module>confTemplates</module>
    <module>egranaryApp</module>
    <module>controlcenter</module>
    <module>winscripts</module>
    <module>cipedit</module>
    <module>vufind</module>
    <module>winutility</module>
    <module>Installer</module>
    <module>eGSoftware</module>
    <module>moodle</module>
    <module>wordpress</module>
    <module>common</module>
</modules>
<developers>
    <developer>
        <name>Widernet Development Team</name>
        <email>support@widernet.org</email>

    </developer>
</developers>
<scm>
    <connection>scm:svn:https://lome.widernet.org/svn/egranary/tags/pie-3.0</connection>
    <developerConnection>scm:svn:https://lome.widernet.org/svn/egranary/tags/pie-3.0</developerConnection>
    <url>https://lome.widernet.org/svn/egranary/tags/pie-3.0</url>
</scm>

<distributionManagement>
    <site>
        <id>lomeRepo</id>
        <url>dav:https://lome.widernet.org/site/</url>
    </site>
    <repository>
        <id>lomeRepo</id>
        <url>dav:https://lome.widernet.org/repo</url>
    </repository>
</distributionManagement>

<repositories>
    <repository>
        <id>lomeRepo</id>
        <url>https://lome.widernet.org/repo</url>
    </repository>
</repositories>
<build>
    <extensions>
        <extension>
            <groupId>org.apache.maven.wagon</groupId>
            <artifactId>wagon-webdav-jackrabbit</artifactId>
            <version>3.3.2</version>
        </extension>
    </extensions>
    <plugins>

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>3.1.0</version>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>3.0.1</version>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-deploy-plugin</artifactId>
            <version>3.0.0-M1</version>
        </plugin>

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-site-plugin</artifactId>
            <version>3.7.1</version>
        </plugin>

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.8.0</version>
            <configuration>
                <source>1.8</source>
                <target>1.8</target>
            </configuration>
        </plugin>

        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>buildnumber-maven-plugin</artifactId>
            <version>1.4</version>
            <executions>
                <execution>
                    <phase>validate</phase>
                    <goals>
                        <goal>create</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <doCheck>false</doCheck>
                <doUpdate>true</doUpdate>
            </configuration>
        </plugin>

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-release-plugin</artifactId>
            <version>2.5.3</version>
            <configuration>
                <preparationGoals>clean verify install</preparationGoals>
            </configuration>
        </plugin>


        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-jar-plugin</artifactId>
            <version>3.1.0</version>
            <configuration>
                <archive>
                    <manifest>
                      <!--  <addClasspath>true</addClasspath>
                        <classpathPrefix>lib</classpathPrefix>
                        <mainClass>org.widernet.egranutils.UtilMain</mainClass>-->
                    </manifest>
                    <manifestEntries>
                        <org_widernet_version>${project.version}</org_widernet_version>
                        <org_widernet_svnrev>${buildNumber}</org_widernet_svnrev>
                    </manifestEntries>
                </archive>
            </configuration>
        </plugin>
    </plugins>
</build>
<dependencies />

eGSoftware Project.xml

<id>app</id>
<formats>
    <format>zip</format>
</formats>
<includeBaseDirectory>true</includeBaseDirectory>
<baseDirectory>pie</baseDirectory>
<fileSets>
    <fileSet>
        <directory>src/main/filesystem</directory>
        <outputDirectory>/</outputDirectory>
    </fileSet>
    <fileSet>
        <directory>target/version</directory>
        <outputDirectory>/</outputDirectory>
    </fileSet>
</fileSets>
<dependencySets>
    <dependencySet>
        <includes>
            <include>*:jar:*</include>
        </includes>
        <useTransitiveDependencies>true</useTransitiveDependencies>
        <useTransitiveFiltering>false</useTransitiveFiltering>
        <outputDirectory>E:/software/lib</outputDirectory>
        <useProjectArtifact>false</useProjectArtifact>           <outputFileNameMapping>${artifact.artifactId}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
    </dependencySet>
    <dependencySet>
        <includes>
            <include>org.widernet.data:*</include>
        </includes>
        <unpack>true</unpack>
        <outputDirectory>data</outputDirectory>
        <useProjectArtifact>false</useProjectArtifact>
    </dependencySet>
    <dependencySet>
        <includes>
            <include>org.widernet.data.mysql:*</include>
        </includes>
        <unpack>true</unpack>
        <outputDirectory>data/mysql/data</outputDirectory>
        <useProjectArtifact>false</useProjectArtifact>
    </dependencySet>
    <dependencySet>
        <includes>
            <include>org.widernet:openDS</include>
            <include>org.widernet:controlcenter:zip:exe</include>
            <include>org.widernet:eGBrowser</include>
        </includes>
        <unpack>true</unpack>
        <outputDirectory>software</outputDirectory>
        <useProjectArtifact>false</useProjectArtifact>
    </dependencySet>
    <dependencySet>
        <includes>
            <include>org.apache.httpd:winEgranApache</include>
            <include>com.sysinternals:junction</include>
            <include>com.mysql:winEgranMysql</include>
            <include>net.php:winEgranPhp</include>
            <include>com.sun.java:win_jdk</include>
            <include>org.widernet:winscripts</include>
            <include>org.widernet:winutility</include> 
            <include>com.strawberryperl:perl</include>
        </includes>
        <unpack>true</unpack>
        <outputDirectory>software/windows</outputDirectory>
        <useProjectArtifact>false</useProjectArtifact>
    </dependencySet>
    <dependencySet>
        <includes>
            <include>org.widernet:apacheConf</include>
        </includes>
        <unpack>true</unpack>
        <outputDirectory>software/windows/apache/</outputDirectory>
        <useProjectArtifact>false</useProjectArtifact>
    </dependencySet>    
  <dependencySet>
        <includes>
            <include>org.widernet.cip.base:*</include>
        </includes>
        <unpack>false</unpack>
       <outputFileNameMapping>${artifact.artifactId}.${artifact.extension}</outputFileNameMapping>
        <outputDirectory>software/drupal/default/base</outputDirectory>
        <useProjectArtifact>false</useProjectArtifact>
    </dependencySet>
    <dependencySet> 
        <includes> 
            <include>org.widernet:confTemplates</include> 
        </includes> 
        <unpack>true</unpack> 
        <outputDirectory>software/</outputDirectory> 
        <useProjectArtifact>false</useProjectArtifact> 
    </dependencySet>
    <dependencySet>
        <includes>
            <include>org.widernet.cip.apptemp:*</include>
        </includes>
        <unpack>false</unpack>
      <outputFileNameMapping>${artifact.artifactId}.${artifact.extension}</outputFileNameMapping>
        <outputDirectory>software/drupal/default/apptemp</outputDirectory>
        <useProjectArtifact>false</useProjectArtifact>
    </dependencySet>
    <dependencySet>
        <includes>
            <include>org.widernet.webapp:*</include>
            <include>net.sourceforge.phpldapadmin:phpldapadmin</include>
            <include>net.phpmyadmin:phpMyAdmin</include>
        </includes>
        <excludes>
            <exclude>org.widernet.webapp:moodle</exclude>
            <exclude>org.widernet.webapp:wordpress</exclude>
        </excludes>
        <unpack>true</unpack>
        <outputDirectory>webcontent</outputDirectory>
        <useProjectArtifact>false</useProjectArtifact>
    </dependencySet>
    <dependencySet>
        <includes>
            <include>org.widernet.webapp:moodle</include>
            <include>org.widernet.webapp:wordpress</include>
        </includes>
        <unpack>true</unpack>
        <outputDirectory></outputDirectory>
        <useProjectArtifact>false</useProjectArtifact>
    </dependencySet>
    <dependencySet>
        <includes>
            <include>org.widernet:Installer</include>
        </includes>
        <unpack>true</unpack>
        <outputDirectory></outputDirectory>
        <useProjectArtifact>false</useProjectArtifact>
    </dependencySet>
</dependencySets>

0 个答案:

没有答案