1

I'm currently trying to build my holoeverywhere project using the guidelines on this page. https://github.com/ChristopheVersieux/HoloEverywhere/wiki/Maven

When I try to build my project, however, it eventually gets to a build failure regarding the jarsigner.

Here is the the error:

[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

I went to the directory where it tried to find jarsigner.exe and it wasn't there! So I found it in C:\Program Files\Java\jdk1.7.0_11\bin\ and realized that it has the wrong location for the jarsigner.exe.

I tried googling tags to include in the pom.xml for specifying the location of the jarsigner. I even set up the path variables correctly to the jdk installations, the jarsigner (in JARSIGNERLOCATION), and much much more...

My question is, where do I set the location of the jarsigner.exe so the builder finds the file?

Here is my pom.xml for reference.

<?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>

Thank you!!!!!

aindurti
  • 632
  • 1
  • 8
  • 24
  • 2
    To see the full stack trace of the errors, re-run Maven with the -e switch. Re-run Maven using the -X switch to enable full debug logging. Run mvn -X -e clean package – Prototik Jan 23 '13 at 07:16
  • apparently it also can't find the debug.keystore. I went to the directory and it wasn't there, so I think I have to manually generate it. Can anyone tell me how? – aindurti Jan 23 '13 at 22:38
  • 1
    Nvm, I figured it out. I used the keytool from cmd. – aindurti Jan 24 '13 at 02:23
  • Sorry what do you mean you used the keytool from the command line? Did you avoid the maven-jarsigner-plugin entirely? How did you solve the issue in your build process? – Fotis Paraskevopoulos Feb 08 '13 at 15:17
  • Turns out that I had not had a keystore in the location that my settings.xml file said I did. I simply went to the command line, cd to the directory of the keytool, and created a new keystore that fit the parameters I had put in the settings.xml. Hope that helps! – aindurti Feb 10 '13 at 02:39

0 Answers0