Skip to content

[JetBrains] Ensure prebuilt workspaces using Maven Wrapper are properly initialized in IntelliJ IDEA #14656

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

Merged
merged 1 commit into from
Nov 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ platformType=IU
platformDownloadSources=true
# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
# Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22
platformPlugins=Git4Idea, org.jetbrains.plugins.terminal, com.jetbrains.codeWithMe
platformPlugins=Git4Idea, org.jetbrains.plugins.terminal, com.jetbrains.codeWithMe, org.jetbrains.idea.maven
# Opt-out flag for bundling Kotlin standard library.
# See https://plugins.jetbrains.com/docs/intellij/kotlin.html#kotlin-standard-library for details.
kotlin.stdlib.default.dependency=false
Expand Down
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.")
}
}
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>
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
<vendor>Gitpod</vendor>
<description>Provides integrations within a Gitpod workspace.</description>


<!-- Product and plugin compatibility requirements -->
<!-- https://plugins.jetbrains.com/docs/intellij/plugin-compatibility.html -->
<depends>com.intellij.modules.platform</depends>
<depends optional="true" config-file="maven.xml">org.jetbrains.idea.maven</depends>
<dependencies>
<plugin id="Git4Idea"/>
<plugin id="org.jetbrains.plugins.terminal"/>
Expand Down