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

Mockito won't build on a Windows machine #97

Closed
jerzykrlk opened this issue Oct 7, 2014 · 5 comments
Closed

Mockito won't build on a Windows machine #97

jerzykrlk opened this issue Oct 7, 2014 · 5 comments

Comments

@jerzykrlk
Copy link
Contributor

Executing gradlew pTLM results in the following:

(...)
:buildSrc:build UP-TO-DATE
Version: 1.10.45-dev
:compileJava UP-TO-DATE
:processResources UP-TO-DATE
:classes UP-TO-DATE
:allJar FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':allJar'.
> A problem occurred starting process 'command 'ant''

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 24.438 secs

The stacktrace ends with this:

Caused by: org.gradle.process.internal.ExecException: A problem occurred starting process 'command 'ant''
        at org.gradle.process.internal.DefaultExecHandle.setEndStateInfo(DefaultExecHandle.java:196)
        at org.gradle.process.internal.DefaultExecHandle.failed(DefaultExecHandle.java:325)
        at org.gradle.process.internal.ExecHandleRunner.run(ExecHandleRunner.java:83)
        ... 1 more
Caused by: net.rubygrapefruit.platform.NativeException: Could not start 'ant'
        at net.rubygrapefruit.platform.internal.DefaultProcessLauncher.start(DefaultProcessLauncher.java:27)
        at net.rubygrapefruit.platform.internal.WindowsProcessLauncher.start(WindowsProcessLauncher.java:22)
        at net.rubygrapefruit.platform.internal.WrapperProcessLauncher.start(WrapperProcessLauncher.java:36)
        at org.gradle.process.internal.ExecHandleRunner.run(ExecHandleRunner.java:65)
        ... 1 more
Caused by: java.io.IOException: Cannot run program "ant" (in directory "C:\projects\mockito\src\mockito"): CreateProcess
 error=2, The system cannot find the file specified
        at net.rubygrapefruit.platform.internal.DefaultProcessLauncher.start(DefaultProcessLauncher.java:25)
        ... 4 more
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
        ... 5 more

Not a big deal, but caused some trouble.

@mockitoguy
Copy link
Member

Did you resolve the issue? Does 'ant' work in your windows box? Unfortunately, the build still calls out to ant shell to get the bnd stuff done.

@jerzykrlk
Copy link
Contributor Author

Yes, I made a dirty quickfix in gradle build. I just call
ant_home/bin/ant.bat on Windows.

Not something to be particularly proud of, but it did the trick.

BR,
JK
8 paź 2014 20:54 "Szczepan Faber" notifications@github.com napisał(a):

Did you resolve the issue? Does 'ant' work in your windows box?
Unfortunately, the build still calls out to ant shell to get the bnd stuff
done.


Reply to this email directly or view it on GitHub
#97 (comment).

@mockitoguy
Copy link
Member

Let's close it for now. We will fix this ant issue at some point.

@jerzykrlk
Copy link
Contributor Author

See #102 - ugly but may work until it's completely rewritten.

It looks like project.exec won't pick up ant.bat when trying to call ant.

@mockitoguy
Copy link
Member

Thanks!

On Thu, Oct 9, 2014 at 8:56 PM, jerzykrlk notifications@github.com wrote:

See #102 #102 - ugly but may
work until it's completely rewritten.

It looks like project.exec won't pick up ant.bat when trying to call ant.

Reply to this email directly or view it on GitHub
#97 (comment).

Szczepan Faber
Core dev@gradle; Founder@mockito

neworld pushed a commit to neworld/mockito that referenced this issue Aug 31, 2019
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

2 participants