当我要去Maven时,用pom安装我的项目
<build>
<defaultGoal>package</defaultGoal>
<sourceDirectory>${basedir}/src/main/izpack</sourceDirectory>
<resources>
<resource>
<filtering>true</filtering>
<directory>src/main/izpack</directory>
<includes>
<include>**</include>
</includes>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
</resources>
<plugins>
<!-- Configure the compiler to use Java 1.5 -->
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<encoding>${project.build.sourceEncoding}</encoding>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<!-- Have project dependencies be picked up by izPack when its compiler runs -->
<plugin>
<groupId>org.codehaus.izpack</groupId>
<artifactId>izpack-maven-plugin</artifactId>
<version>5.0.0-rc4</version>
<dependencies>
<dependency>
<groupId>org.codehaus.izpack</groupId>
<artifactId>izpack-panel</artifactId>
<version>5.0.0-rc4</version>
</dependency>
</dependencies>
<!-- mvn help:describe -DgroupId=org.codehaus.izpack -DartifactId=izpack-maven-plugin -Dversion=5.0.0-beta11 -Ddetail -->
<configuration>
<installFile>${staging.dir}/install.xml</installFile>
<attach>false</attach>
<kind>standard</kind>
<descriptorEncoding>UTF-8</descriptorEncoding>
<izpackBasedir>${staging.dir}</izpackBasedir>
<customPanelDirectory>${staging.dir}</customPanelDirectory>
</configuration>
<executions>
<execution>
<id>standard-installer</id>
<phase>package</phase>
<goals>
<goal>izpack</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Do not deploy any of the installer artifacts. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
<properties>
<staging.dir>${project.build.directory}/staging</staging.dir>
</properties>
无法在项目上执行目标org.codehaus.izpack:izpack-maven-plugin:5.0.0-rc4:izpack(standard-installer)Izpack-Installer:编译过程中失败:无效的基目录:workspace / myproject /目标/分期
以上错误让我整天浪费...请发布izpack Maven插件的工作pom,它支持Linux中的控制台安装。
注意:我将install.xml放在src / main / izpack / install.xml以及src / main / resources / install.xml中。
答案 0 :(得分:0)
最后在一天结束后得到答案......:)
<build>
<defaultGoal>package</defaultGoal>
<sourceDirectory>${basedir}/src/main/resources</sourceDirectory>
<resources>
<resource>
<filtering>true</filtering>
<directory>src/main/resources</directory>
<includes>
<include>**</include>
</includes>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
</resources>
<plugins>
<!-- Configure the compiler to use Java 1.7 -->
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<encoding>${project.build.sourceEncoding}</encoding>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<!-- Have project dependencies be picked up by izPack when its compiler runs -->
<plugin>
<groupId>org.codehaus.izpack</groupId>
<artifactId>izpack-maven-plugin</artifactId>
<version>5.0.0-rc4</version>
<configuration>
<installerFile>${basedir}/target</installerFile>
<izpackBasedir>${staging.dir}</izpackBasedir>
<dependencies>
<dependency>
<groupId>org.codehaus.izpack</groupId>
<artifactId>izpack-standalone-compiler</artifactId>
<version>4.3.5</version>
</dependency>
</dependencies>
</configuration>
<executions>
<execution>
<id>izpack</id>
<phase>package</phase>
<goals>
<goal>izpack</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Do not deploy any of the installer artifacts. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
<properties>
<staging.dir>${project.build.directory}/staging</staging.dir>
</properties>
目标文件夹中的“staging”目录是手动创建的......:)