Skip to content
This repository was archived by the owner on May 13, 2025. It is now read-only.
This repository was archived by the owner on May 13, 2025. It is now read-only.

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

Description

@pjonnlagadda

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>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions