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 stop CI builds in Jenkins from accidentally publishing to release repository?
Install custom maven plugin from local jar into local repository with dependencies
Show code coverage on Xtend files with jacoco
Why is Maven trying to resolve a dependency from my company's repository when it isn't referenced in this project?
How to iterate the sub projects in maven pom?
Can not find the tag library descriptor for "http://www.day.com/taglibs/cq/personalization/1.0
Access a file other than jar in local maven repository
Annotation processor is not being invoked by the maven compiler plugin
Setting JMeter properties from Maven plugin
Maven, exclude dependency with condition
when call projects poms using maven-invoker-plugin it throws OutOfMemoryException
How do I remove comments from CSS files when using with minify-maven-plugin?
Maven Central versions with a red background
Publishing a private artifact to AWS S3 private repository
Set a global custom build directory in Maven
maven 3.3.9: default folder structure not created when setting up maven project with eclipse neon/luna

Categories

HOME
twitter
xamarin
jdo
atom-editor
push-notification
reserved
view
wamp
convolution
amazon-cloudformation
facebook-php-sdk
percona
opentracing
ab-testing
normalizr
excel-vba-mac
introduction
clickonce
sylius
wijmo
h2db
vlsi
react-css-modules
greendao
web-api-testing
gsmcomm
nouislider
commit
phpfreechat
wallpaper
cloud-code
host
mixture-model
hilbert-curve
uft-api
sfdc
total-commander
jedis
errordocument
typescript1.8
return-value
rdfs
libusb-win32
ifs
imanage
lync-client-sdk
blacklist
chord-diagram
nxt
gridpane
xml-attribute
ipconfig
intellij-14
mutation-observers
citrus-pay
wyam
dukescript
sortedlist
sonarqube5.1.2
dia
block-device
coldbox
asp.net-web-api-odata
rdl
zend-route
poller
srs
xsockets.net
sharp-repository
referrer
browser-detection
gil
broken-links
armcc
enter
buildr
xtype
appender
imac
perfect-hash
photoshop-cs4
ubuntu-9.04
django-notification
misv
ntvdm.exe

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
Mobile App
Mobile App
Mobile App