This is an automated email from the ASF dual-hosted git repository. matthiasblaesing pushed a commit to branch release120 in repository https://gitbox.apache.org/repos/asf/netbeans.git
The following commit(s) were added to refs/heads/release120 by this push: new e6145be [NETBEANS-4341] Disable maven global cache new 497a0e7 Merge pull request #2181 from matthiasblaesing/NETBEANS-4341-12.0 e6145be is described below commit e6145be91a154a38a1a956871806e4063648bbd3 Author: Matthias Bläsing <mblaes...@doppel-helix.eu> AuthorDate: Tue Jun 9 18:01:14 2020 +0200 [NETBEANS-4341] Disable maven global cache With the cache enabled updates to the pom or the dependencies are not picked up correctly. Diagnosis and work-around was provided by Christian Oyarzun. --- java/maven/manifest.mf | 2 +- .../netbeans/modules/maven/MavenCacheDisabler.java | 42 ++++++++++++++++++++++ 2 files changed, 43 insertions(+), 1 deletion(-) diff --git a/java/maven/manifest.mf b/java/maven/manifest.mf index a845bde..713a3c4 100644 --- a/java/maven/manifest.mf +++ b/java/maven/manifest.mf @@ -1,6 +1,6 @@ Manifest-Version: 1.0 OpenIDE-Module: org.netbeans.modules.maven/2 -OpenIDE-Module-Specification-Version: 2.138 +OpenIDE-Module-Specification-Version: 2.138.1 OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/maven/Bundle.properties OpenIDE-Module-Layer: org/netbeans/modules/maven/layer.xml AutoUpdate-Show-In-Client: false diff --git a/java/maven/src/org/netbeans/modules/maven/MavenCacheDisabler.java b/java/maven/src/org/netbeans/modules/maven/MavenCacheDisabler.java new file mode 100644 index 0000000..856630d --- /dev/null +++ b/java/maven/src/org/netbeans/modules/maven/MavenCacheDisabler.java @@ -0,0 +1,42 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.netbeans.modules.maven; + +import org.openide.modules.OnStart; + +import static org.apache.maven.project.DefaultProjectBuilder.DISABLE_GLOBAL_MODEL_CACHE_SYSTEM_PROPERTY; + +/** + * Disable the maven global cache. With the cache enabled updates to the pom or + * the dependencies are not picked up correctly. + * + * @see + * <a href="https://issues.apache.org/jira/browse/NETBEANS-4341">NETBEANS-4341</a> + * @see <a href="https://issues.apache.org/jira/browse/MNG-6530">MNG-6530</a> + */ +@OnStart +public class MavenCacheDisabler implements Runnable { + + @Override + public void run() { + if(System.getProperty(DISABLE_GLOBAL_MODEL_CACHE_SYSTEM_PROPERTY) == null) { + System.setProperty(DISABLE_GLOBAL_MODEL_CACHE_SYSTEM_PROPERTY, "true"); + } + } +} --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists