You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "sdedic (via GitHub)" <gi...@apache.org> on 2024/10/09 09:38:41 UTC
[PR] Fixing ProjectReload with missing artifacts [netbeans]
sdedic opened a new pull request, #7855:
URL: https://github.com/apache/netbeans/pull/7855
It was discovered that if `ProjectReload.withProjectState` is used and the project contains a truly unresolvable artifact (i.e. a reference to a local custom build, that can be never downloaded), the priming support will keep telling the project state is not good. The past priming information (with an old timestamp) was incorrectly cached and has been merged with the new MavenProject, but degraded its timestamp ... so it was older than constituent files, which resulted in an inconsistent state right after load.
This PR extends the SPI to indicate that the ReloadImplementation should execute whenever previous ReloadImplementations changed anything. It also fixes various conditions with missing artifacts and project (re)loads - see the added test cases.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [PR] Fixing ProjectReload with missing artifacts [netbeans]
Posted by "sdedic (via GitHub)" <gi...@apache.org>.
sdedic commented on code in PR #7855:
URL: https://github.com/apache/netbeans/pull/7855#discussion_r1916789295
##########
java/maven/test/unit/data/projects/multiproject/democa/oci/pom_add_artifact.xml:
##########
@@ -0,0 +1,253 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>com.exampleca</groupId>
+ <artifactId>oci</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <packaging>${packaging}</packaging>
+ <name>democa-${artifactId}</name>
+
+ <parent>
+ <groupId>com.exampleca</groupId>
+ <artifactId>democa-parent</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+ <properties>
+ <packaging>jar</packaging>
+ <jdk.version>17</jdk.version>
+ <release.version>17</release.version>
+ <micronaut.version>4.0.3-oracle-00001</micronaut.version>
+ <micronaut.test.resources.enabled>true</micronaut.test.resources.enabled>
+ <micronaut.runtime>netty</micronaut.runtime>
+ <exec.mainClass>com.exampleca.Application</exec.mainClass>
+ </properties>
+
+ <repositories>
+ <repository>
+ <id>central</id>
+ <url>https://repo.maven.apache.org/maven2</url>
+ </repository>
+
+ <repository>
+ <id>gcn</id>
+ <url>https://maven.oracle.com/public</url>
+ </repository>
Review Comment:
@mbien I've reduced dependncies in the test data projects and removed custom repositories. I've checked that the test + test data fails in the master; should succeed when fixed implemenation is present here in the branch.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [PR] Fixing ProjectReload with missing artifacts [netbeans]
Posted by "sdedic (via GitHub)" <gi...@apache.org>.
sdedic commented on PR #7855:
URL: https://github.com/apache/netbeans/pull/7855#issuecomment-2595559392
Last call, will merge tonight if no objections.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [PR] Fixing ProjectReload with missing artifacts [netbeans]
Posted by "sdedic (via GitHub)" <gi...@apache.org>.
sdedic commented on code in PR #7855:
URL: https://github.com/apache/netbeans/pull/7855#discussion_r1914738679
##########
java/maven/test/unit/data/projects/multiproject/democa/oci/pom_add_artifact.xml:
##########
@@ -0,0 +1,253 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>com.exampleca</groupId>
+ <artifactId>oci</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <packaging>${packaging}</packaging>
+ <name>democa-${artifactId}</name>
+
+ <parent>
+ <groupId>com.exampleca</groupId>
+ <artifactId>democa-parent</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+ <properties>
+ <packaging>jar</packaging>
+ <jdk.version>17</jdk.version>
+ <release.version>17</release.version>
+ <micronaut.version>4.0.3-oracle-00001</micronaut.version>
+ <micronaut.test.resources.enabled>true</micronaut.test.resources.enabled>
+ <micronaut.runtime>netty</micronaut.runtime>
+ <exec.mainClass>com.exampleca.Application</exec.mainClass>
+ </properties>
+
+ <repositories>
+ <repository>
+ <id>central</id>
+ <url>https://repo.maven.apache.org/maven2</url>
+ </repository>
+
+ <repository>
+ <id>gcn</id>
+ <url>https://maven.oracle.com/public</url>
+ </repository>
Review Comment:
Sorry for late response; I completely forgot about this one.
The bug was caught in this configuration / application. I need something that has a parent-POM and some other artifacts in a public repository; I might be able to trim down it a little.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [PR] Fixing ProjectReload with missing artifacts [netbeans]
Posted by "sdedic (via GitHub)" <gi...@apache.org>.
sdedic merged PR #7855:
URL: https://github.com/apache/netbeans/pull/7855
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [PR] Fixing ProjectReload with missing artifacts [netbeans]
Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on code in PR #7855:
URL: https://github.com/apache/netbeans/pull/7855#discussion_r1807761338
##########
java/maven/test/unit/data/projects/multiproject/democa/oci/pom_add_artifact.xml:
##########
@@ -0,0 +1,253 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>com.exampleca</groupId>
+ <artifactId>oci</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <packaging>${packaging}</packaging>
+ <name>democa-${artifactId}</name>
+
+ <parent>
+ <groupId>com.exampleca</groupId>
+ <artifactId>democa-parent</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+ <properties>
+ <packaging>jar</packaging>
+ <jdk.version>17</jdk.version>
+ <release.version>17</release.version>
+ <micronaut.version>4.0.3-oracle-00001</micronaut.version>
+ <micronaut.test.resources.enabled>true</micronaut.test.resources.enabled>
+ <micronaut.runtime>netty</micronaut.runtime>
+ <exec.mainClass>com.exampleca.Application</exec.mainClass>
+ </properties>
+
+ <repositories>
+ <repository>
+ <id>central</id>
+ <url>https://repo.maven.apache.org/maven2</url>
+ </repository>
+
+ <repository>
+ <id>gcn</id>
+ <url>https://maven.oracle.com/public</url>
+ </repository>
Review Comment:
can this be reproduced without requiring two repos and so many dependencies?
unit tests shouldn't download entire demo applications if it is somehow avoidable.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists