maven


Changing digest algorithm for maven-jarsigner-plugin


How can I change the default (in my case SHA256) digest algorithm within the configuration of maven-jarsigner-plugin? I would like it to be SHA1. I tried adding <digestalg>SHA1</digestalg> to the configuration block in the pom but that didn't do it because MANIFEST.MF still came out reporting SHA256.
In a command line, you would just do:
jarsigner ... -digestalg SHA1 myjar.jar myalias
As per this post, using arguments worked for me:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jarsigner-plugin</artifactId>
<version>1.4</version>
<executions>
<execution>
<phase>package</phase>
<id>sign</id>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
<configuration>
<keystore>mykey.jks</keystore>
<alias>myalias</alias>
<storepass>somepass</storepass>
<arguments>
<argument>-digestalg</argument><argument>SHA1</argument>
</arguments>
</configuration>
</plugin>

Related Links

How to package up a leiningen project for recompilation with all the libraries included? [for users without an internet connection]
How to fail when maven profile does not exist?
Sharing dependencies not in central repo with the project
license issue in mule when building with junit test cases
Change Maven repository that NetBeans uses
Maven release-plugin doesn't update LATEST version
How to configure pom.xml so deploy custom artifact to remote repo (archiva)
Making sure all dependency versions are specified in dependencyManagement in maven
How to update archetype-catalog in Nexus repository
deployment of an ejb maven project from eclipse
Maven gwt:compile produces no hosted html file
Grails 2.3.7 repository issues
excluding spring jars from spring-data maven dependency
Unable to resolve artefact org.springframework.transaction via Nexus proxy
How does Hudson/Jenkins determine job result status?
Why Alfresco ignore some webscripts or templates modifications?

Categories

HOME
winforms
gitlab
gremlin
server
homebrew
framework7
adb
maven-3
installshield
networkx
amazon-cloudformation
metatrader4
resize
timeout
spring-tool-suite
static-libraries
hex-editors
clearcase-ucm
reactive-cocoa
contextmenu
openedx
predix
immutable.js
orleans
wkwebview
telerik-reporting
rundeck
url-scheme
filezilla
windows-error-reporting
compatibility
large-file-upload
bosh
xquery-3.0
catel
kendo-ui-grid
avcapturesession
windows-dev-center
subset-sum
bytecode-manipulation
revolution-slider
disassembling
scaffold
mixture-model
ansible-playbook
preconditions
botbuilder
no-www
segment
btrace
executenonquery
datastax-startup
drupal-6
nativeapplication
media-player
nested-sets
static-ip-address
android-fonts
vmware-tools
android-textview
asp.net-4.5
contact-list
python-stackless
whois
two-factor-authentication
freedesktop.org
unity-networking
spim
libressl
coveralls
dukescript
twirl
graph-drawing
notify
onactivityresult
fluentautomation
jubula
hippomocks
java.nio.file
typo3-neos
google-cloud-save
gwt-rpc
jquery-mobile-dialog
xamlparseexception
itmstransporter
jquery-knob
manchester-syntax
objective-c-2.0
bubble-chart
code-cleanup
forums
privilege
pascal-fc
zend-decorators

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html