-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[jetbrains]: force initialize maven project
to work around initialization after warmup in prebuilds Co-authored-by: Victor Nogueira <[email protected]>
- Loading branch information
Showing
4 changed files
with
34 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
...main/kotlin/io/gitpod/jetbrains/remote/optional/GitpodForceUpdateMavenProjectsActivity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Copyright (c) 2022 Gitpod GmbH. All rights reserved. | ||
// Licensed under the GNU Affero General Public License (AGPL). | ||
// See License-AGPL.txt in the project root for license information. | ||
|
||
package io.gitpod.jetbrains.remote.optional | ||
|
||
import com.intellij.openapi.diagnostic.thisLogger | ||
import com.intellij.openapi.project.Project | ||
import com.intellij.openapi.startup.StartupActivity | ||
import org.jetbrains.idea.maven.project.MavenProjectsManager | ||
|
||
class GitpodForceUpdateMavenProjectsActivity : StartupActivity.RequiredForSmartMode { | ||
override fun runActivity(project: Project) { | ||
val mavenProjectManager = MavenProjectsManager.getInstance(project) | ||
|
||
if (!mavenProjectManager.isMavenizedProject) return | ||
|
||
mavenProjectManager.forceUpdateAllProjectsOrFindAllAvailablePomFiles() | ||
|
||
thisLogger().warn("gitpod: Forced the update of Maven Project.") | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
components/ide/jetbrains/backend-plugin/src/main/resources/META-INF/maven.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<!-- | ||
Copyright (c) 2022 Gitpod GmbH. All rights reserved. | ||
Licensed under the GNU Affero General Public License (AGPL). | ||
See License-AGPL.txt in the project root for license information. | ||
--> | ||
<idea-plugin> | ||
<extensions defaultExtensionNs="com.intellij"> | ||
<backgroundPostStartupActivity implementation="io.gitpod.jetbrains.remote.optional.GitpodForceUpdateMavenProjectsActivity"/> | ||
</extensions> | ||
</idea-plugin> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters