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

jdeploy install fails #1

Closed
thatsIch opened this issue Jan 3, 2017 · 5 comments
Closed

jdeploy install fails #1

thatsIch opened this issue Jan 3, 2017 · 5 comments

Comments

@thatsIch
Copy link

thatsIch commented Jan 3, 2017

I just tried it and I got an error while running jdeploy install on my application.

Github branch: https://github.com/thatsIch/sublime-rainmeter-image-smoother/tree/jdeploy

while running jdeploy install I get:

Executing copy rule CopyRule{dir=target, includes=[sublime-rainmeter-image-smoother-1.2-jar-with-dependencies.jar], excludes=null}
target\archive-tmp does not match any patterns.
target\classes does not match any patterns.
target\generated-sources does not match any patterns.
target\maven-archiver does not match any patterns.
target\maven-status does not match any patterns.
target\sublime-rainmeter-image-smoother-1.2-jar-with-dependencies.jar does not match any patterns.
target\sublime-rainmeter-image-smoother-1.2.jar does not match any patterns.
target\test-classes does not match any patterns.
    
Exception in thread "main" java.lang.RuntimeException: java.io.IOException: Cannot run program "npm": CreateProcess error=2, Das System kann die angegebene Datei nicht finden
        at ca.weblite.jdeploy.JDeploy.main(JDeploy.java:1252)
Caused by: java.io.IOException: Cannot run program "npm": CreateProcess error=2, Das System kann die angegebene Datei nicht finden
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
        at ca.weblite.jdeploy.JDeploy.install(JDeploy.java:1146)
        at ca.weblite.jdeploy.JDeploy.main(JDeploy.java:1239)
Caused by: java.io.IOException: CreateProcess error=2, Das System kann die angegebene Datei nicht finden
        at java.lang.ProcessImpl.create(Native Method)
        at java.lang.ProcessImpl.<init>(ProcessImpl.java:386)
        at java.lang.ProcessImpl.start(ProcessImpl.java:137)
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
        ... 2 more

I guess the pattern does not match, because it searches for the file directly and it does not work, because the jar is in the target folder? Or am I supposed to install it directly in the target folder (as suggested in the README) (will be cleaned throgh mvn clean though)

@shannah
Copy link
Owner

shannah commented Jan 3, 2017 via email

@thatsIch
Copy link
Author

thatsIch commented Jan 3, 2017

If I would have not have npm on my path, I could not even install/run jdeploy.

λ npm link
C:\Users\thatsIch\AppData\Roaming\npm\sublime-rainmeter-image-smoother -> C:\Users\thatsIch\AppData\Roaming\npm\node_modules\sublime-rainmeter-image-smoother\jdeploy-bundle\jdeploy.js
C:\Users\thatsIch\AppData\Roaming\npm\node_modules\sublime-rainmeter-image-smoother -> D:\Work\Rainmeter\RainmeterImageSmoother

jdeploy init works, install not:

λ jdeploy install
Executing copy rule CopyRule{dir=target, includes=[sublime-rainmeter-image-smoother-1.3.0-jar-with-dependencies.jar], excludes=null}
target\archive-tmp does not match any patterns.
target\classes does not match any patterns.
target\generated-sources does not match any patterns.
target\maven-archiver does not match any patterns.
target\maven-status does not match any patterns.
target\sublime-rainmeter-image-smoother-1.3.0-jar-with-dependencies.jar does not match any patterns.
target\sublime-rainmeter-image-smoother-1.3.0.jar does not match any patterns.
target\test-classes does not match any patterns.
Exception in thread "main" java.lang.RuntimeException: java.io.IOException: Cannot run program "npm": CreateProcess error=2, Das System kann die angegebene Datei nicht finden
        at ca.weblite.jdeploy.JDeploy.main(JDeploy.java:1252)
Caused by: java.io.IOException: Cannot run program "npm": CreateProcess error=2, Das System kann die angegebene Datei nicht finden
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
        at ca.weblite.jdeploy.JDeploy.install(JDeploy.java:1146)
        at ca.weblite.jdeploy.JDeploy.main(JDeploy.java:1239)
Caused by: java.io.IOException: CreateProcess error=2, Das System kann die angegebene Datei nicht finden
        at java.lang.ProcessImpl.create(Native Method)
        at java.lang.ProcessImpl.<init>(ProcessImpl.java:386)
        at java.lang.ProcessImpl.start(ProcessImpl.java:137)
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
        ... 2 more

Why is

 Executing copy rule CopyRule{dir=target, includes=[sublime-rainmeter-image-smoother-1.3.0-jar-with-dependencies.jar], excludes=null}

not matching with

target\sublime-rainmeter-image-smoother-1.3.0-jar-with-dependencies.jar does not match any patterns.

is this a windows issue using \?

@shannah
Copy link
Owner

shannah commented Jan 3, 2017 via email

@thatsIch
Copy link
Author

thatsIch commented Jan 3, 2017

I found the problem

http://stackoverflow.com/questions/40503074/how-to-run-npm-command-in-java-using-process-builder

€:
you are just susing "npm", "link" which will fail on windows because the ProcessBuilder will not use the path extensions (upon npm it will add extensions and tries to execute them like .bat or .cmd)

€€:
I just tried it with npm.cmd and it works in a toy project

@shannah
Copy link
Owner

shannah commented Jan 3, 2017

Thanks. I have fixed this issue and tested/verified on my Windows 10 box. I have updated it on NPM. Version 1.0.18 includes the fix. You should update your jdeploy with

npm update -g jdeploy

@shannah shannah closed this as completed Jan 3, 2017
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