Put this in a pom.xml and run it with mvn install.
<project>
<modelVersion>1.0.0</modelVersion>
<groupId>com.mycompany.app</groupId>
<artifactId>my-app</artifactId>
<version>1</version>
<build><plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>keytool-maven-plugin</artifactId>
<version>1.2</version>
<executions>
<execution>
<phase>generate-resources</phase>
<id>clean</id>
<goals>
<goal>clean</goal>
</goals>
</execution>
<execution>
<phase>generate-resources</phase>
<id>genkey</id>
<goals>
<goal>genkey</goal>
</goals>
</execution>
</executions>
<configuration>
<keystore>example.keystore</keystore>
<dname>cn=localhost</dname>
<keypass>broadleaf</keypass>
<storepass>broadleaf</storepass>
<alias>broadleaf</alias>
<keyalg>RSA</keyalg>
</configuration>
</plugin>
</plugins>
</build>
</project>
its deprecated since 1.2... what to do now..?
ReplyDeletechange the goal to generateKeyPair
ReplyDeleterefer http://mojo.codehaus.org/keytool/keytool-maven-plugin/usage.html
thanks
DeleteHey,
ReplyDeleteI am getting the error 'Failed to execute goal org.codehaus.mojo:keytool-maven-plugin:1.5:generateKeyPair (default) on project' when building my project.
a. I am using the generateKeyPair goal and version is 1.5
b. org.codehaus.mojo is not currently in cenral maven repository, is there any repository i have to add ?