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

Support Maven build #164

Open
ymli0215 opened this issue Apr 27, 2024 · 8 comments
Open

Support Maven build #164

ymli0215 opened this issue Apr 27, 2024 · 8 comments

Comments

@ymli0215
Copy link
Contributor

從JavaAutoTestService看到有放一個 todo: add maven ??
測試起來應該也還沒有支援Maven吧??

請問我想要動手增加,除了UI部分
應該是針對哪幾隻程式去做調整比較好呢??
不然我就是一個一個慢慢查有gradle的蹤影,同時增加maven處理
這樣怕有遺漏,也怕沒有效率

@phodal
Copy link
Member

phodal commented Apr 27, 2024

现在相关的任务应该是:

  • 获取构建任务信息,以用于生成 dockerfile 、 jenkinsfile 等信息。详细见:JavaBuildSystemProvider
  • 利用 Gradle 来执行生成的测试。见:JavaAutoTestService
  • 生成上下文所需要的依赖信息,诸如 Spring boot 测试等。见:SpringContextProvider

@ymli0215
Copy link
Contributor Author

ymli0215 commented Apr 30, 2024

抱歉,因為真沒有開發過,想問個基本問題
就是我要import新的程式,是怎樣做的

例如 JavaAutoTestService.kt有 import GradleRunConfiguration,他要怎樣做才能import成功??
我目前想要增加支援Maven,所以想import org.jetbrains.idea.maven.execution.MavenRunConfiguration
結果不知道怎樣去設定相關環境.. @@

補充一下,我目前是透過vscode改東西後,自己透過gradle去build的
還是說應該要用intellij開發,他就會自動匯入相關的jar?

@phodal
Copy link
Member

phodal commented Apr 30, 2024

IDEA 的插件,如果依赖于特定的其它插件,比如 maven,需要手动添加依赖。

这里应该有类似于 org.jetbrains.plugins.gradle 的依赖:

auto-dev/build.gradle.kts

Lines 94 to 100 in 3e890af

val ideaPlugins =
listOf(
"Git4Idea",
// "org.jetbrains.plugins.terminal",
"com.intellij.java",
"org.jetbrains.plugins.gradle",
"org.jetbrains.kotlin",

随后再 Gradle Sync 一下试试。

@phodal
Copy link
Member

phodal commented Apr 30, 2024

我刚大概看了一下 Maven 的 plugin 名字应该是:org.jetbrains.idea.maven

至于如何创建的逻辑,我还没研究过,可以参考:

https://github.com/JetBrains/intellij-community/blob/9b5e8782f3e31be25eb2a38bbb31edab58cf36c4/plugins/maven/src/main/java/org/jetbrains/idea/maven/execution/MavenRunAnythingProvider.kt

@c913168497
Copy link
Contributor

image
我想你说的是这个
image
你可以把命令改为其它的

@phodal
Copy link
Member

phodal commented May 24, 2024

@c913168497 你看你都写好了,不来个 PR 吗,哈哈哈

@c913168497
Copy link
Contributor

还没想好完整的功能设计啊 哈哈, 我目前都是脚本功能形式

@phodal
Copy link
Member

phodal commented May 24, 2024

哈哈,边写边想

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

3 participants