You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@netbeans.apache.org by Mark Eggers <it...@yahoo.com.INVALID> on 2022/06/15 18:24:33 UTC
Maven relativePath issue with NetBeans 14
Folks,
First of all, I apologize for not testing for the last two rounds (my bad).
Second of all, is anyone else seeing this?
Environment:
Windows 10 Professional - latest updates
NetBeans 14 installed from zip file
Running under javac 17.0.3 (adoptium.net)
Maven 3.8.6
Maven projects (Java EE 6 Web, single module) that opened cleanly under
NetBeans 12.4 (JDK 11) and NetBeans 13 (JDK 17) (on Ubuntu), now have
the following warning in pom.xml:
parent.relativePath of (current project) points at (artifact of current
project) rather than (parent pom)
It's annoying, however the project still builds correctly.
I've tried working around this by doing the following:
1. Add <relativePath></relativePath> child to <parent> node per Maven specs
2. Shut down NetBeans
3. Delete cache
4. Restart NetBeans
5. Re-index local repository
6. Fetch and re-index corporate repository
7. open project
8. (error is gone)
Without shutting down and deleting the cache, the warning would still
persist.
However, now every time I open pom.xml, NetBeans goes out to the
corporate (actually my local Nexus installation) repository, transfers
the index, unpacks, and then rebuilds the index.
At the end of the WAR build (Project->Clean and Build, NetBeans pulls
the remote index down again, and rebuilds that index.
I might be able to solve the problem by placing the parent pom.xml in
the parent directory (per Maven specs), but I would think that once the
parent pom is in
C:\Users\[username]\.m2\repository, this wouldn't happen.
This seems less than optimal.
I tried the above with Maven 3.8.5. I have not tried this with the
bundled Maven.
Thoughts on what I might be doing wrong?
. . . just my two cents
/mde/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: Maven relativePath issue with NetBeans 14
Posted by Mark Eggers <it...@yahoo.com.INVALID>.
Fixed (I think).
It turns out that it was a combination of poor Nexus configuration
(group repository set as releases rather than mixed) plus a settings.xml
file that referenced both the group proxy repository as well as
individual repositories.
Why this didn't trigger issues with a command line build or earlier
versions of NetBeans, I have no clue.
I have it working, and thanks for putting up with the noise.
Mark
/mde/
On 6/15/2022 1:14 PM, Mark Eggers wrote:
> Hi,
>
> Matthias, I apologize if I sounded like I was disparaging NetBeans. That
> is not my intention, and I think that NetBeans is an awesome IDE.
>
> I will try to construct a set of projects that will help facilitate
> understanding the issue I'm having. I'm not quite sure how to do this,
> as my environment is a bit convoluted (see next paragraph).
>
> My environment is a bit convoluted, so it may take some time. I have a
> local Nexus 3 repository (currently only running Maven, soon to run
> Docker and NPM). On that, I proxy both my work Nexus repository as well
> as Central. I also host some of my own local artifacts that shouldn't
> really see the light of day (except for my use).
>
> I'll also look a bit more closely at disk use and network traffic while
> doing this.
>
> In addition, I'll do the same set of tests on Ubuntu 22.04. It's still
> running NetBeans 13 (snap has not updated things yet).
>
> settings.xml are identical (with the exception of local repository
> placement) on both machines. All components exist in the local (on disk)
> repositories.
>
> This may take a bit of time, since I have other issues in the fire.
>
> Again, I apologize for coming off as disparaging NetBeans. That is
> neither my intention, nor is it my sentiment.
>
> Mark
> /mde/
>
> On 6/15/2022 12:41 PM, Matthias Bläsing wrote:
>> Hi,
>>
>> Am Mittwoch, dem 15.06.2022 um 12:32 -0700 schrieb Mark Eggers:
>>> Every time I open a project with a parent pom (with or without
>>> <relativePath>), NetBeans re-indexes my remote repository. This even
>>> happens on sub-projects within a Maven multi-module project (and the
>>> parent specified as the parent project).
>>
>> before blaming NetBeans, try to track it down to the origin. I used my
>> clone of dbus-java, which is a multi-module setup:
>>
>> https://github.com/matthiasblaesing/dbus-java
>>
>> I opened dbus-client and apart from normal background scanning of
>> source code nothing happend. With you description a reindexing of maven
>> central would have been triggered and you notice, that that happens.
>>
>> This is current NetBeans master, so should be pretty close to 14.
>>
>> So what you need to do is create a _minimal_ producer, that is not
>> dependend on thing you only have locally available, then get someone
>> here to verify.
>>
>> Greetings
>>
>> Matthias
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: dev-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: Maven relativePath issue with NetBeans 14
Posted by Mark Eggers <it...@yahoo.com.INVALID>.
Hi,
Matthias, I apologize if I sounded like I was disparaging NetBeans. That
is not my intention, and I think that NetBeans is an awesome IDE.
I will try to construct a set of projects that will help facilitate
understanding the issue I'm having. I'm not quite sure how to do this,
as my environment is a bit convoluted (see next paragraph).
My environment is a bit convoluted, so it may take some time. I have a
local Nexus 3 repository (currently only running Maven, soon to run
Docker and NPM). On that, I proxy both my work Nexus repository as well
as Central. I also host some of my own local artifacts that shouldn't
really see the light of day (except for my use).
I'll also look a bit more closely at disk use and network traffic while
doing this.
In addition, I'll do the same set of tests on Ubuntu 22.04. It's still
running NetBeans 13 (snap has not updated things yet).
settings.xml are identical (with the exception of local repository
placement) on both machines. All components exist in the local (on disk)
repositories.
This may take a bit of time, since I have other issues in the fire.
Again, I apologize for coming off as disparaging NetBeans. That is
neither my intention, nor is it my sentiment.
Mark
/mde/
On 6/15/2022 12:41 PM, Matthias Bläsing wrote:
> Hi,
>
> Am Mittwoch, dem 15.06.2022 um 12:32 -0700 schrieb Mark Eggers:
>> Every time I open a project with a parent pom (with or without
>> <relativePath>), NetBeans re-indexes my remote repository. This even
>> happens on sub-projects within a Maven multi-module project (and the
>> parent specified as the parent project).
>
> before blaming NetBeans, try to track it down to the origin. I used my
> clone of dbus-java, which is a multi-module setup:
>
> https://github.com/matthiasblaesing/dbus-java
>
> I opened dbus-client and apart from normal background scanning of
> source code nothing happend. With you description a reindexing of maven
> central would have been triggered and you notice, that that happens.
>
> This is current NetBeans master, so should be pretty close to 14.
>
> So what you need to do is create a _minimal_ producer, that is not
> dependend on thing you only have locally available, then get someone
> here to verify.
>
> Greetings
>
> Matthias
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: Maven relativePath issue with NetBeans 14
Posted by Matthias Bläsing <mb...@doppel-helix.eu>.
Hi,
Am Mittwoch, dem 15.06.2022 um 12:32 -0700 schrieb Mark Eggers:
> Every time I open a project with a parent pom (with or without
> <relativePath>), NetBeans re-indexes my remote repository. This even
> happens on sub-projects within a Maven multi-module project (and the
> parent specified as the parent project).
before blaming NetBeans, try to track it down to the origin. I used my
clone of dbus-java, which is a multi-module setup:
https://github.com/matthiasblaesing/dbus-java
I opened dbus-client and apart from normal background scanning of
source code nothing happend. With you description a reindexing of maven
central would have been triggered and you notice, that that happens.
This is current NetBeans master, so should be pretty close to 14.
So what you need to do is create a _minimal_ producer, that is not
dependend on thing you only have locally available, then get someone
here to verify.
Greetings
Matthias
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: Maven relativePath issue with NetBeans 14
Posted by Mark Eggers <it...@yahoo.com.INVALID>.
Another addendum:
Every time I open a project with a parent pom (with or without
<relativePath>), NetBeans re-indexes my remote repository. This even
happens on sub-projects within a Maven multi-module project (and the
parent specified as the parent project).
The only time it does not seem to happen is when no parent project is
specified.
I will go through typical developer tasks and note each time that the
remote repository is indexed.
This is making using NetBeans 14 a difficult challenge to use. I wonder
what might happen if I'm running remotely and don't have a network
connection? Would NetBeans just hang?
. . . just my two cents
/mde/
On 6/15/2022 12:06 PM, Mark Eggers wrote:
> Addendum:
>
> Even with <relativePath></relativePath> removed from the <parent> node,
> NetBeans insists on re-indexing the remote repository.
>
> This happens after every clean or build as long as pom.xml is open in
> the IDE.
>
> If pom.xml is not open in the editor, then no re-index occurs.
>
> This definitely feels like a bug.
>
> . . . just my two cents
> /mde/
>
> On 6/15/2022 11:24 AM, Mark Eggers wrote:
>> Folks,
>>
>> First of all, I apologize for not testing for the last two rounds (my
>> bad).
>>
>> Second of all, is anyone else seeing this?
>>
>> Environment:
>>
>> Windows 10 Professional - latest updates
>> NetBeans 14 installed from zip file
>> Running under javac 17.0.3 (adoptium.net)
>> Maven 3.8.6
>>
>> Maven projects (Java EE 6 Web, single module) that opened cleanly
>> under NetBeans 12.4 (JDK 11) and NetBeans 13 (JDK 17) (on Ubuntu), now
>> have the following warning in pom.xml:
>>
>> parent.relativePath of (current project) points at (artifact of
>> current project) rather than (parent pom)
>>
>> It's annoying, however the project still builds correctly.
>>
>> I've tried working around this by doing the following:
>>
>> 1. Add <relativePath></relativePath> child to <parent> node per Maven
>> specs
>> 2. Shut down NetBeans
>> 3. Delete cache
>> 4. Restart NetBeans
>> 5. Re-index local repository
>> 6. Fetch and re-index corporate repository
>> 7. open project
>> 8. (error is gone)
>>
>> Without shutting down and deleting the cache, the warning would still
>> persist.
>>
>> However, now every time I open pom.xml, NetBeans goes out to the
>> corporate (actually my local Nexus installation) repository, transfers
>> the index, unpacks, and then rebuilds the index.
>>
>> At the end of the WAR build (Project->Clean and Build, NetBeans pulls
>> the remote index down again, and rebuilds that index.
>>
>> I might be able to solve the problem by placing the parent pom.xml in
>> the parent directory (per Maven specs), but I would think that once
>> the parent pom is in
>> C:\Users\[username]\.m2\repository, this wouldn't happen.
>>
>> This seems less than optimal.
>>
>> I tried the above with Maven 3.8.5. I have not tried this with the
>> bundled Maven.
>>
>> Thoughts on what I might be doing wrong?
>>
>> . . . just my two cents
>> /mde/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: Maven relativePath issue with NetBeans 14
Posted by Mark Eggers <it...@yahoo.com.INVALID>.
Addendum:
Even with <relativePath></relativePath> removed from the <parent> node,
NetBeans insists on re-indexing the remote repository.
This happens after every clean or build as long as pom.xml is open in
the IDE.
If pom.xml is not open in the editor, then no re-index occurs.
This definitely feels like a bug.
. . . just my two cents
/mde/
On 6/15/2022 11:24 AM, Mark Eggers wrote:
> Folks,
>
> First of all, I apologize for not testing for the last two rounds (my bad).
>
> Second of all, is anyone else seeing this?
>
> Environment:
>
> Windows 10 Professional - latest updates
> NetBeans 14 installed from zip file
> Running under javac 17.0.3 (adoptium.net)
> Maven 3.8.6
>
> Maven projects (Java EE 6 Web, single module) that opened cleanly under
> NetBeans 12.4 (JDK 11) and NetBeans 13 (JDK 17) (on Ubuntu), now have
> the following warning in pom.xml:
>
> parent.relativePath of (current project) points at (artifact of current
> project) rather than (parent pom)
>
> It's annoying, however the project still builds correctly.
>
> I've tried working around this by doing the following:
>
> 1. Add <relativePath></relativePath> child to <parent> node per Maven specs
> 2. Shut down NetBeans
> 3. Delete cache
> 4. Restart NetBeans
> 5. Re-index local repository
> 6. Fetch and re-index corporate repository
> 7. open project
> 8. (error is gone)
>
> Without shutting down and deleting the cache, the warning would still
> persist.
>
> However, now every time I open pom.xml, NetBeans goes out to the
> corporate (actually my local Nexus installation) repository, transfers
> the index, unpacks, and then rebuilds the index.
>
> At the end of the WAR build (Project->Clean and Build, NetBeans pulls
> the remote index down again, and rebuilds that index.
>
> I might be able to solve the problem by placing the parent pom.xml in
> the parent directory (per Maven specs), but I would think that once the
> parent pom is in
> C:\Users\[username]\.m2\repository, this wouldn't happen.
>
> This seems less than optimal.
>
> I tried the above with Maven 3.8.5. I have not tried this with the
> bundled Maven.
>
> Thoughts on what I might be doing wrong?
>
> . . . just my two cents
> /mde/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists