task runModEclipse does not work under Windows
Closed this issue · 5 comments
The solution for Windows was to provide the absolute classpath of the Eclipse bin directory, rather than just the URL('file:bin/'):
def classpath = [new URL("file:${projectDir}/bin/")] as URL[]
This works under Windows, but I could not test it under other OSs.
The other classpath entries are not needed since the JDT compiler copies all content of Eclipse src folders to the bin directory.
Which version of Vert.x? Please always state exact version when filing an issue.
Also please provide instructions for replicating
Update: I can't reproduce the behavior using a Windows cmd anymore, but it still happens when I invoke "gradle runModEclipse" using the gradle-plugin launcher.
vertxVersion=2.0.0-CR3
toolsVersion=2.0.0-CR2
Instructions for replicating:
- Install Eclipse 4.3 classic + gradle plugin on Windows
- clone this git repo
- Import it into Eclipse using the gradle import => project is build by JDT and all artifacts (including mod.json) end up being in the bin directory
- invoke: gradle runModEclipse using the gradle launcher within Eclipse => I get the following error trace:
[sts] -----------------------------------------------------
[sts] Starting Gradle build for the following tasks:
[sts] :runModEclipse
[sts] -----------------------------------------------------
:compileJava UP-TO-DATE
:compileGroovy
:processResources UP-TO-DATE
:classes
:copyMod
:runModEclipse
Failed to deploy module
org.vertx.java.platform.PlatformManagerException: Failed to find mod.json on classpath
at org.vertx.java.platform.impl.DefaultPlatformManager.deployModuleFromCP(DefaultPlatformManager.java:782)
at org.vertx.java.platform.impl.DefaultPlatformManager.access$200(DefaultPlatformManager.java:55)
at org.vertx.java.platform.impl.DefaultPlatformManager$2.run(DefaultPlatformManager.java:163)
at org.vertx.java.platform.impl.DefaultPlatformManager$11.run(DefaultPlatformManager.java:359)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
BUILD SUCCESSFUL
Total time: 1.969 secs
[sts] -----------------------------------------------------
[sts] Build finished succesfully!
[sts] Time taken: 0 min, 1 sec
[sts] -----------------------------------------------------
Since this is not reproducible using a Windows cmd (here the module is deployed as expected), it is probably not a vertx issue but a gradle eclipse plugin issue. But my suggested workaround at least makes it work on both Eclipse and Windows cmd.
Right. Please use the command line for launching ./gradlew runModEclipse
(note, it's ./gradlew not gradle)
On 17/07/13 15:04, Kai Toedter wrote:
Update: I can't reproduce the behavior using a Windows cmd anymore, but it still happens when I invoke "gradle runModEclipse" using the gradle-plugin launcher.
vertxVersion=2.0.0-CR3
toolsVersion=2.0.0-CR2Instructions for replicating:
- Install Eclipse 4.3 classic + gradle plugin on Windows
- clone this git repo
- Import it into Eclipse using the gradle import => project is build by JDT and all artifacts (including mod.json) end up being in the bin directory
- invoke: gradle runModEclipse using the gradle launcher within Eclipse => I get the following error trace:
[sts] -----------------------------------------------------
[sts] Starting Gradle build for the following tasks:
[sts] :runModEclipse
[sts] -----------------------------------------------------
:compileJava UP-TO-DATE
:compileGroovy
:processResources UP-TO-DATE
:classes
:copyMod
:runModEclipse
Failed to deploy module
org.vertx.java.platform.PlatformManagerException: Failed to find mod.json on classpath
at org.vertx.java.platform.impl.DefaultPlatformManager.deployModuleFromCP(DefaultPlatformManager.java:782)
at org.vertx.java.platform.impl.DefaultPlatformManager.access$200(DefaultPlatformManager.java:55)
at org.vertx.java.platform.impl.DefaultPlatformManager$2.run(DefaultPlatformManager.java:163)
at org.vertx.java.platform.impl.DefaultPlatformManager$11.run(DefaultPlatformManager.java:359)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)BUILD SUCCESSFUL
Total time: 1.969 secs
[sts] -----------------------------------------------------
[sts] Build finished succesfully!
[sts] Time taken: 0 min, 1 sec
[sts] -----------------------------------------------------Since this is not reproducible using a Windows cmd (here the module is deployed as expected), it is probably not a vertx issue but a gradle eclipse plugin issue. But my suggested workaround at least makes it work on both Eclipse and Windows cmd.
Reply to this email directly or view it on GitHub:
#5 (comment)
(note, it's ./gradlew not gradle)
sure, actually I usually do that :)
But I just wanted to test if the effect with my locally installed Gradle 1.6 is the same (in the gradle.properties you set gradleVersion=1.4, so gradlew will use gradle 1.4).
Is there a reason why you don't use gradle 1.6?