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 build a module and its submodules using maven reactor?
Example using Jersey (REST resource), OSGi (Apache Felix), and Maven (build and deploy)?
Define Maven plugins in parent pom, but only invoke plugins in child projects
maven dependency form org.eclipse.ui.forms not working
Adding new ANNIE rules to GATE when using maven
Running maven plugins in a specific phase
Maven jboss plugin error: “no plugin found for prefix jboss-as”
Maven deploy plugin override error?
maven: specify package output location
error during build EAR file in Maven
How to rectify deployment error in Tomcat7 using maven?
deployment single ejb module with dependencies in netbeans and glassfish
Maven release plugin: Specifying new development version do not affects on pom's custom property
maven use release:branch to branch select modules
Maven settings via SSO?
Why Doesn't nexus index list snaphot jars?

Categories

HOME
compiler-construction
google-chrome-extension
proxy
cookies
pycharm
platform-builder
syntax
malloc
angular-ui-bootstrap
alpha
azure-storage-tables
iggrid
facebook-php-sdk
izpack
quickbooks
php-7.1
circular-dependency
alignment
n-gram
remote-access
phaser
django-simple-history
workload-scheduler
opentracing
lldb
object-detection
facebook-instant-articles
tibco-mdm
captiveportal
autosys
url-scheme
windowbuilder
c++-amp
r-raster
google-rich-snippets
junit5
semantic-versioning
google-sites-2016
http-get
calibre
cloud-code
stacked
ssjs
unobtrusive-validation
dynamic-reports
logfiles
react-scripts
tropo
np-complete
sqlbulkcopy
flow-control
pycaffe
google-cdn
pintos
xcb
fody
pagedlist
skype4py
master-slave
packagist
rvest
captivenetwork
goose
django-unittest
feedback
libressl
sniffer
sortedlist
remobjects
inmobi
csquery
rake-task
terminfo
starcluster
java.nio.file
centos5
openlaszlo
ms-project-server-2010
.aspxauth
odata4j
dataadapter
django-nonrel
sabredav
enterprisedb
robotics-studio
factory-method
unc
datawindow
dsn
subscript
whoosh
window-management
external-accessory
hirefire
coredump
django-tagging
inotifycollectionchanged
sortable-tables
preference
mirah
zend-tool
noscript
zune

Resources

Encrypt Message