Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to build standalone jar? #26

Closed
jkindwall opened this issue Apr 16, 2013 · 7 comments
Closed

How to build standalone jar? #26

jkindwall opened this issue Apr 16, 2013 · 7 comments

Comments

@jkindwall
Copy link

I'm interested in running WireMock in Standalone mode. The documentation says to use this command:

$ java -jar wiremock-1.30-standalone.jar

However, I've thus far been unable to build this jar file. I tried running "gradle build", and it got part way through the build process before failing with:

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':signArchives'.

    Cannot perform signing task ':signArchives' because it has no configured signatory

In spite of this failure, it appears that the task did manage to build the following jars:

wiremock-1.31.jar
wiremock-1.31-javadoc.jar
wiremock-1.31-sources.jar

but not

wiremock-1.31-standalone.jar

I'm not seeing any other gradle tasks that look like they're used to build the standalone jar. Am I missing something?

@tomakehurst
Copy link
Member

Hi,

Two options:

  1. If you just want to use the JAR (rather than modifying it in any way) you can download it directly from Maven Central: http://repo1.maven.org/maven2/com/github/tomakehurst/wiremock/1.31/wiremock-1.31-standalone.jar

  2. if you want to build it, use the following:
    gradle clean build jarAll

Hope that helps,
Tom

@jkindwall
Copy link
Author

Thanks.

Tried that gradle build command, but I'm still getting a failure on the "signArchives" task and it never gets far enough to create the standalone jar.

However I was able to download the standalone jar from the link you provided, and that should be sufficient for now.

@tomakehurst
Copy link
Member

Ah sorry, I forgot to mention you need to install PGP for the signing step to work.

@oneeyedhobbit
Copy link

Sorry for posting in an old issue @tomakehurst, but I'm wondering if you have a basic build/development environment setup doc somewhere on github or wiremock.org?

I'm trying to integrate wiremock into an automated testing framework currently using cppunit (but hopefully moving to catch). I've come across a couple of issues that ended up being unrelated to wiremock, but it would be lovely to be able to build and debug wiremock via, say, intellij or eclipse. Its been a while since I've used Java extensively (and even then it was android); do you have any sort of quick start guide you would consider sharing?

Apologies if such a guide already exists and I haven't uncovered it in my searches!

@tomakehurst
Copy link
Member

Assume you mean building WireMock from source?

To test ./gradlew test
To build both JARs: ./gradlew clean jar shadowJar

@kratikagoyel
Copy link

I tried running gradle clean build jarAll

But Facing issues:

FAILURE: Build failed with an exception.

  • Where:
    Build file '/home/kritikagoyal/repos/wiremock/build.gradle' line: 128

  • What went wrong:
    Execution failed for task ':jarAll'.

Could not create an instance of type org.gradle.api.internal.artifacts.publish.DecoratingPublishArtifact_Decorated.
java.lang.UnsupportedOperationException (no error message)

  • Try:
    Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Exception is:
    org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':jarAll'.
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:103)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:73)
    at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
    at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:59)
    at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
    at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:59)
    at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:101)
    at org.gradle.api.internal.tasks.execution.FinalizeInputFilePropertiesTaskExecuter.execute(FinalizeInputFilePropertiesTaskExecuter.java:44)
    at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:91)
    at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:62)
    at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:59)
    at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
    at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
    at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:256)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:317)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:309)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:185)

@kratikagoyel
Copy link

@tomakehurst kindly take a look

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants