Skip to content

Commit c92f421

Browse files
committed
[jetbrains]: force initialize maven project
to work around initialization after warmup in prebuilds
1 parent 52a5bcd commit c92f421

File tree

4 files changed

+32
-1
lines changed

4 files changed

+32
-1
lines changed

components/ide/jetbrains/backend-plugin/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ platformType=IU
1010
platformDownloadSources=true
1111
# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
1212
# Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22
13-
platformPlugins=Git4Idea, org.jetbrains.plugins.terminal, com.jetbrains.codeWithMe
13+
platformPlugins=Git4Idea, org.jetbrains.plugins.terminal, com.jetbrains.codeWithMe, org.jetbrains.idea.maven
1414
# Opt-out flag for bundling Kotlin standard library.
1515
# See https://plugins.jetbrains.com/docs/intellij/kotlin.html#kotlin-standard-library for details.
1616
kotlin.stdlib.default.dependency=false
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Copyright (c) 2022 Gitpod GmbH. All rights reserved.
2+
// Licensed under the GNU Affero General Public License (AGPL).
3+
// See License-AGPL.txt in the project root for license information.
4+
5+
package io.gitpod.jetbrains.remote.maven
6+
7+
import com.intellij.openapi.project.Project
8+
import org.jetbrains.idea.maven.project.MavenProjectsManager
9+
10+
class GitpodMavenProjectManager(
11+
private val project: Project
12+
) {
13+
14+
init {
15+
// force initialize maven project
16+
MavenProjectsManager.getInstance(project)
17+
}
18+
19+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!--
2+
Copyright (c) 2022 Gitpod GmbH. All rights reserved.
3+
Licensed under the GNU Affero General Public License (AGPL).
4+
See License-AGPL.txt in the project root for license information.
5+
-->
6+
<!--suppress PluginXmlValidity -->
7+
<idea-plugin>
8+
<extensions defaultExtensionNs="com.intellij">
9+
<projectService serviceImplementation="io.gitpod.jetbrains.remote.maven.GitpodMavenProjectManager" preload="true"/>
10+
</extensions>
11+
</idea-plugin>

components/ide/jetbrains/backend-plugin/src/main/resources/META-INF/plugin.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
<!-- Product and plugin compatibility requirements -->
1616
<!-- https://plugins.jetbrains.com/docs/intellij/plugin-compatibility.html -->
1717
<depends>com.intellij.modules.platform</depends>
18+
<depends optional="true" config-file="maven.xml">org.jetbrains.idea.maven</depends>
1819
<dependencies>
1920
<plugin id="Git4Idea"/>
2021
<plugin id="org.jetbrains.plugins.terminal"/>

0 commit comments

Comments
 (0)