我目前正在尝试使用此页面上的指南构建我的 holoeverywhere 项目。 https://github.com/ChristopheVersieux/HoloEverywhere/wiki/Maven
但是,当我尝试构建我的项目时,它最终会导致关于 jarsigner 的构建失败。
这是错误:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 50.529s
[INFO] Finished at: Tue Jan 22 17:44:51 EST 2013
[INFO] Final Memory: 18M/139M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-jarsigner-plugin:1.2:sign (default) on project library: Failed executing 'cmd.exe /X /C ""C:\Program Files\Java\jdk1.7.0_11\jre\..\bin\jarsigner.exe" -sigalg MD5withRSA -digestalg SHA1 -keystore C:\Users\Akhil\.'*****'\debug.keystore -storepass '*****' -keypass '*****' C:\Users\Akhil\HoloEverywhere\library\target\library-1.4.2.apklib '*****'debugkey"' - exitcode 1 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
我去了它试图找到 jarsigner.exe 的目录,但它不存在!所以我在 C:\Program Files\Java\jdk1.7.0_11\bin\ 中找到了它,并意识到它的 jarsigner.exe 位置错误。
我尝试使用谷歌搜索标签以包含在 pom.xml 中以指定 jarsigner 的位置。我什至为 jdk 安装、jarsigner(在 JARSIGNERLOCATION 中)等等正确设置了路径变量……
我的问题是,我在哪里设置 jarsigner.exe 的位置以便构建器找到该文件?
这是我的 pom.xml 供参考。
<?xml version="1.0" encoding="UTF-8"?>
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>library</artifactId>
<name>HoloEverywhere Library</name>
<packaging>apklib</packaging>
<parent>
<groupId>org.holoeverywhere</groupId>
<artifactId>parent</artifactId>
<version>1.4.2</version>
</parent>
<dependencies>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
</dependency>
<dependency>
<groupId>com.actionbarsherlock</groupId>
<artifactId>actionbarsherlock</artifactId>
<type>apklib</type>
</dependency>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>support-v4</artifactId>
<version>r7</version>
</dependency>
</dependencies>
<build>
<sourceDirectory>src</sourceDirectory>
<testSourceDirectory>test</testSourceDirectory>
<plugins>
<plugin>
<groupId>org.holoeverywhere</groupId>
<artifactId>builder</artifactId>
<configuration>
<input>
<param>styles.json</param>
<param>styles-v14.json</param>
</input>
</configuration>
</plugin>
<plugin>
<groupId>org.holoeverywhere</groupId>
<artifactId>translator</artifactId>
<configuration>
<input>
<param>strings.json</param>
</input>
</configuration>
</plugin>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jarsigner-plugin</artifactId>
<inherited>true</inherited>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.holoeverywhere</groupId>
<artifactId>builder</artifactId>
<versionRange>[1.4.0,)</versionRange>
<goals>
<goal>build</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute />
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.holoeverywhere</groupId>
<artifactId>translator</artifactId>
<versionRange>[1.4.0,)</versionRange>
<goals>
<goal>build</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<profiles>
<profile>
<id>release</id>
<activation>
<property>
<name>performRelease</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<extensions>true</extensions>
<executions>
<execution>
<id>manifestUpdate</id>
<phase>process-resources</phase>
<goals>
<goal>manifest-update</goal>
</goals>
</execution>
</executions>
<configuration>
<manifest>
<versionName>${project.version}</versionName>
</manifest>
<sign>
<debug>false</debug>
</sign>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<configuration>
<artifacts>
<artifact>
<file>${project.build.directory}/${project.artifactId}-${project.version}.jar</file>
<type>jar</type>
</artifact>
</artifacts>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>attach-artifact</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
谢谢!!!!!