I just wrote a goal based on the code for jar:deploy. I copied the contents of the goal and then inserted a <signjar> right before deploying. If anyone is interested here is the code:
<maven:user-check user="${maven.username}"/> <attainGoal name="jar:jar"/> <property name="maven.jar.to.deploy" value="${maven.final.name}.jar"/> <j:set var="sl" value="/"/> <util:replace var="jarToDeploy" oldChar="\" newChar="/">${maven.build.dir}/${maven.jar.to.deploy}</util:replace> <util:replace var="forwardSlashBaseDir" oldChar="\" newChar="/" value="${basedir}"/> <j:if test="${!forwardSlashBaseDir.endsWith('/')}"> <j:set var="base" value="${forwardSlashBaseDir}/" /> </j:if> <j:set var="relativePath">${jarToDeploy.substring(base.length())}</j:set> <signjar jar="${maven.build.dir}/${maven.jar.to.deploy}" alias="milkshake" storepass="frylock"/> <deploy:artifact artifact="${relativePath}" type="jars" assureDirectoryCommand="mkdir -p" siteCommand="cd @deployDirectory@; chmod g+w ${maven.jar.to.deploy}; chgrp ${maven.remote.group} ${maven.jar.to.deploy}" /> Also, was wondering if it would make sense to have a property where you could specify the alias and storepass and if these have been set, have all the jar goals sign the jar right after generating it. I was thinking maybe a maven.keystore.alias and maven.keystore.pass and then in the jar goals just check if any of these are set. -----Original Message----- From: Buorn, Yoway Sent: Monday, May 03, 2004 11:05 AM To: [EMAIL PROTECTED] Subject: Signing jars before deployment Does anyone know of a good way to sign jars before deploying them? I've tried writing the following goal: <goal name="jar:sign"> <attainGoal name="jar:jar"/> <signjar jar="${maven.build.dir}/${maven.final.name}.jar" alias="milkshake" storepass="frylock"/> <attainGoal name="jar:deploy"/> </goal> Unfortunately, after the jar is signed the deploy goal causes the jar to be built again, without being signed. I couldn't seem to find any properties in the jar plugin reference to help with this, so I was wondering if anyone has any idea what the best approach to this would be. Thanks. Yoway Buorn Software Engineer Imagery Systems Engineering GENERAL DYNAMICS Advanced Information Systems "I refuse to tiptoe through life only to arrive safely at death's door." -- ??? --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]