[
https://issues.apache.org/jira/browse/CALCITE-3776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17031974#comment-17031974
]
Rui Wang commented on CALCITE-3776:
-----------------------------------
{code:java}
> Task :buildSrc:fmpp:build UP-TO-DATE
> Configure project :
Building Apache Calcite 1.22.0-SNAPSHOT
FAILURE: Build failed with an exception.
* Where:
Initialization script '/tmp/JdbcExample_main__.gradle' line: 18
* What went wrong:
A problem occurred configuring project ':core'.
> Could not create task ':core:JdbcExample.main()'.
> Unnecessarily replacing a task that does not exist is not supported. Use
create() or register() directly instead. You attempted to replace a task named
'JdbcExample.main()', but there is no existing task with that name.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with
Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See
https://docs.gradle.org/6.1.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 457ms
{code}
> Create a task in Gradle to run JdbcExample
> ------------------------------------------
>
> Key: CALCITE-3776
> URL: https://issues.apache.org/jira/browse/CALCITE-3776
> Project: Calcite
> Issue Type: Task
> Reporter: Rui Wang
> Priority: Major
> Labels: pull-request-available
> Attachments: jdbcexample.png
>
> Time Spent: 50m
> Remaining Estimate: 0h
>
> Got some troubles to run main class
> "org.apache.calcite.examples.foodmart.java.JdbcExample":
> 1. Intellij cannot run it directly.
> 2. "java -cp" style commands was not easy to run: 1) ended up with a "Class
> Not Found" situation while jar should be added to classpath already. 2) "java
> -cp" need add more jars to classpath (e.g. lingq4j, avatica, etc.)
> So I proposal to create a gradle task to run "JdbcExample". It will be as
> easy as running "./gradlew :core:runJdbcExample". Intellij can also be easily
> configured to run this command thus using debugger in IDE becomes possible.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)