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 cache specific maven artifact into local repository?
Mule Maven - error running project with Maven
Dropping a release from (public) Maven Central
Jenkins, Nexus, bypass SVN password cached on box
SonarQube Scanner + Jenkins + Maven = java.lang.ClassFormatError
Invoke a Java program during maven build to generate some files
Maven: Building a sar and adding files
SonarQube Maven plugin: Jazz annotate Timeout exceeded
Checkout and build project using Jenkins
browserstack jenkins pluing error
deploying a Maven based App to heroku with tests
Maven process tests in it/ as well as test/
Jenkins Artifactory plugin not detecting my compiler during maven build
Maven : only deploy root project
How to run tomcat7-maven-plugin in debug mode with IntelliJ IDEA
Non ascii in Sonar profile name

Categories

HOME
maven
twitter
asp.net-core
vbscript
listview
isabelle
plone
angular-material
include
relayjs
spring-jdbc
infragistics
graphql
v8
alpha
ezpublish
opengl-es-2.0
upload
portia
android-youtube-api
cross-validation
cloudkit
vifm
fancybox-3
floating-action-button
visual-studio-cordova
ups
hapi
try-catch
pc
facebook-page
google-cloud-speech
karma-jasmine
visual-composer
paging
devops
blazemeter
microsoft-sync-framework
maquette
gitignore
gsmcomm
skia
google-rich-snippets
binary-data
karaf
noraui
xmlreader
http-referer
picasso
nssegmentedcontrol
wpf-controls
withings
reportbuilder
temporary-files
cookiecutter-django
sfdc
logfiles
jsch
youcompleteme
dandelion
csound
libusb-win32
knpmenubundle
python-cryptography
synchronous
ableton-live
grails-tomcat-plugin
httplistener
login-control
clang-static-analyzer
essence
packagist
netmq
javax.sound.midi
execute
comobject
content-length
sniffer
asp.net-web-api-odata
flexmojos
gridfs
odata4j
orchardcms-1.7
pygit2
selected
google-email-migration
word-processor
propertyeditor
dbproviderfactories
transactionscope
libc++
dmx512
revisions
asp.net-profiles
castle-monorail
simpletest
aquaticprime
msdev
paul-graham

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile