Skip to content
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.

maven-jarsigner-plugin : Using this, want to fail the maven build if the Codesign certificate is expired #157

Open
pjonnlagadda opened this issue Aug 1, 2023 · 0 comments

Comments

@pjonnlagadda
Copy link

Using with the CodeSign in my pom.xml we are signing the jar which is working perfectly.

Now i want to fail the job

  1. in case the jar is unsigned?
  2. in case of the installed code sign certificate is expired?

i think if we add the true into the section, works for unsigned jars??

I want to know exactly about "fail the build in case of the installed code sign certificate is expired?" Can any one help me on this?

Below is the profile used for the code sign configuration in the pom.xml

          <profile>
		<id>CodeSign</id>
		<activation>
			<activeByDefault>false</activeByDefault>
		</activation>
		<properties>
			<codesign.tsa>http://timestamp.comodoca.com/rfc3161</codesign.tsa>
			<codesign.alias>TestCodeSigningCertificate</codesign.alias>
			<codesign.storetype>Windows-My</codesign.storetype>
		</properties>
		<build>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-jarsigner-plugin</artifactId>
					<version>1.4</version>
					<executions>
						<execution>
							<id>sign</id>
							<phase>integration-test</phase>
							<goals>
								<goal>sign</goal>
							</goals>
						</execution>
					</executions>
					<configuration>
						<storetype>${codesign.storetype}</storetype>
						<alias>${codesign.alias}</alias>
						<verbose>false</verbose>
						<tsa>${codesign.tsa}</tsa>
					</configuration>
				</plugin>
			</plugins>
		</build>
	</profile>
@pjonnlagadda pjonnlagadda changed the title maven-jarsigner-plugin : Using this, want to fail the job if the codesign certificate is expired maven-jarsigner-plugin : Using this, want to fail the maven build if the Codesign certificate is expired Aug 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant