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

Problems adding xom to Maven project
Maven 3 antrun issue
Is there a way to tell maven to always use the latest _stable_ version of a dependency?
jslint-maven-plugin 1.0.2-SNAPSHOT repository
how to wildcard attach multiple files to an artifact in maven?
SCM-Activity-Plugin and Taglist in SONAR
Maven - Is it possible to specify mirror in pom.xml?
Maven: Show comment/alert in console when a dependency is used (compile/package/…)
Remove filter in web.xml in jetty
How to execute code before TestNG for ie. building up the test suite
Reading a maven settings.xml when building with gradle?
Maven Nested Multi-module project
mvn clean package, I want to copy the created jar to the current directory
Merging configuration values in Maven
In Maven 3 how can I use project.version for the module as a dependency to another project
jmeter plugin maven test-jar

Categories

HOME
gerrit
reflection
nullpointerexception
hashmap
xmpp
rsync
google-oauth
amazon-ecs
microservices
sql-server-2016
google-project-tango
callback
opengl-es-2.0
onelogin
amazon-cloudformation
wheelnav.js
etl
alignment
iolanguage
django-simple-history
opentracing
after-effects
nhibernate-envers
visual-composer
jasonette
tokenize
facebook-instant-articles
fish
facet
selectedindexchanged
fopen
maxmind
kendo-datasource
javascriptcore
yadcf
galsim
preg-match-all
scorm2004
revolution-slider
scaffold
xenforo
graphenedb
jvm-languages
node-gyp
ibpy
thin
babel-core
taffy
smartcontracts
termination
zip4j
clean-architecture
pg-dump
sqlbulkcopy
sqldf
orthogonal
account-kit
mathematica-frontend
bstr
gridview-sorting
apachebench
cloudbees
tcpserver
execute
retina
libressl
oberon
unity5.2.3
proj4js
python-green
camanjs
nsbutton
issuu
jquery-layout
reactfx
poller
ccss
quartz-graphics
bulkloader
batterylevel
eventual-consistency
xamlparseexception
limejs
wsdl-2.0
e4x
onsubmit
ticoredatasync
dotnethighcharts
semantic-diff
window-management
invite
netbeans-7.1
android-sdk-2.1
suppress
icanhaz.js
fixed-width
nintendo-ds
ti-dsp
data-acquisition

Resources

Encrypt Message