ebourg / jsign

Java implementation of Microsoft Authenticode for signing Windows executables, installers & scripts
https://ebourg.github.io/jsign
Apache License 2.0
250 stars 107 forks source link

Add documentation on how to build from source #70

Closed Thunderforge closed 1 year ago

Thunderforge commented 4 years ago

I'm interested in using the new functionality for signing MSI files, specifically the Gradle plugin. But since version 3.0 hasn't been released yet (and there's no 3.0-SNAPSHOT or similar available in public repos), I'll have to build from source.

Unfortunately, I'm having trouble figuring out how. I'm not very familiar with Maven, so I'm unsure of the proper way to do this. I don't see any sort of wrapper, so I installed the latest version of Maven, and tried running mvn compile, but it didn't seem to produce a Gradle plugin. I tried going to jsign-gradle-plugin and running gradle build (again, no wrapper) and got the following error:

> Could not resolve all files for configuration ':compileClasspath'.
   > Could not find net.jsign:jsign-core:2.0.
     Searched in the following locations:
       - file:/~/.m2/repository/net/jsign/jsign-core/2.0/jsign-core-2.0.pom
     If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
     Required by:
         project :

I assume I'm doing something wrong, but I have no idea what. If directions on building from source could be added to either the readme or to a separate file in the root project, I would appreciate it.

ebourg commented 4 years ago

Building with Maven is just a matter of typing mvn package -DskipTests at the root of the project, not in the plugin directory. You'll need jsign-core-3.0-SNAPSHOT.jar and jsign-gradle-plugin-3.0-SNAPSHOT.jar on the classpath to use the plugin.

Thunderforge commented 4 years ago

Great! Can this documentation be added to the project so others can benefit from it too?

ebourg commented 4 years ago

@Thunderforge the version 3.0 has just been released.

gillg commented 2 years ago

Hello, this procedure seems not work anymore, it was working some times ago but seems broken since v4.0.

Failed to execute goal on project jsign-ant: Could not resolve dependencies for project net.jsign:jsign-ant:jar:4.0: Could not find artifact net.jsign:jsign-core:jar:tests:4.0 in central (...)

Any needed change in build command ?

ebourg commented 2 years ago

Is your branch up to date? I've fixed this error 3 days ago.

gillg commented 2 years ago

Ah ! Indeed 😅 thanks for this proactive fix