You need to log in before you can comment on or make changes to this bug.
I've tried to add a dependency about 4-5 times now using this dialog. I place the cursor to where the next dependency should go in my POM, press alt-insert, select dependency, then fill in the form. group: jasperreports artifact: jasperreports version: 3.5.1 press OK. The window closes, I'm back at the editor, and nothing has changed.
it seems to work for me on a sample project. The pom editing backend (based on a netbeans XAM api) is however somewhat shaky, a previous error could cause the editor updates to fail within the same IDE session (unfortunately the models are cached within XAM and once broken, stay around). 1. does restarting the IDE help? 2. can you attach the messages.log file to the issue? 3. any prior steps performed? 4. maybe related to the soupui module you have installed (guessing by the other bug report you filed?)
*** Issue 166415 has been marked as a duplicate of this issue. ***
I uninstalled SoapUI as suggested by #166428 and problem solved. Thanks
closing as wontfix then, the issue shall be filed against the soupUI codebase
I'm now using NetBeans 6.7 FCS without SoapUI or JasperReports installed. I open my project's pom.xml, put the cursor after <dependencies> then press alt-insert. I search for an artifact that is installed in my local repo only, select the version, and see that the text boxes are filled in above. I press OK, and the window closes. The POM xml editor window scrolls down and places the cursor just before the </dependencies>, but the dependency I just selected was not added into my pom.
anything in the IDE log file? steps to reproduce? I've removed a wrong line (which shoudl not harm anything though) and added some more logging. http://hg.netbeans.org/main/rev/62088a01435a
Integrated into 'main-golden', will be available in build *200907141401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/62088a01435a User: Milos Kleint <mkleint@netbeans.org> Log: #166414 add more logging and remove wrong call to endTransaction
I tried adding a dependency on an artifact that exists only in my local repository (might not matter).. and it worked. It added the dependency just before the </dependencies> even though I had the cursor just after the opening <dependency> when I pressed alt-insert. I pressed ctrl-z to undo and what I saw was confusing.. it looked like major sections of my POM were being removed so I closed the editor and did not save. Sorry I don't remember much detail, I was in a bit of a panic when it was hapening. Next I re-opened and tried to insert the dependency again. It worked. I then manually deleted the dependency and saved. Then I tried to insert it again, and this time it behaved like before. It put the cursor just before the </dependencies> but did not insert the dependency. I tried a few more times and it did not insert the dependency. Next I tried inserting a dependency from the central maven repo (commons-beanutils ?). It did not insert the dependency, and it moved the cursor about 5-10 lines down into the plugins section as if it thought it had inserted some text into the editor.
Created an attachment (id=84736) [details] IDE log
Steps to reproduce: 1) Open a pom.xml file, place the cursor just before </dependency> and press alt-insert. Select "Dependency..." and press enter. 2) Add any dependency, such as ehcache and press OK. The dependency should be added to your pom.xml now. 3) Press save, then close the pom.xml editor. 4) Re-open the pom.xml file, then repeat the steps but select a different dependency. This time it will not insert it into the pom.xml, but will move the cursor down a bunch of lines as if it did insert some new lines.
it seems the model gets written correctly (if you look in the navigator's pom model view, it will contain the 2nd dependency entry. Just the swing document won't. reassigning to xml/xam, please evaluate i'm not sure what I could be possibly doing wrong, it looks like a bug in model->document synchronization. The maven code in question is at main/maven.grammar/src/org/netbeans/modules/maven/codegen/DependencyGenerator.java issue #168281 could also be related to this problem
*** Issue 173643 has been marked as a duplicate of this issue. ***
For me, the situation (Issue 173643) deteriorates as I execute more and more actions on the dependency tree. In my setup, I have <dependency> <groupId>org.jboss.jbossas</groupId> <artifactId>jboss-as-client</artifactId> <type>pom</type> <version>5.1.0.GA</version> <scope>compile</scope> </dependency> from <repository> <id>jboss</id> <name>jboss.org repository</name> <url>http://repository.jboss.org/maven2/</url> <layout>default</layout> </repository> which pulls a large number of dependent artifacts (~170). When I exclude one of these dependent jars, this works well the first time but as I go and exclude more and more, it takes longer for the <exclude> entries to appear in the POM. After about 5..10 excludes it doesn't seem to work any more at all. Therefore, from my point of view, this looks like a performance issue.
I see this problem in 6.8M2, this time with a compact Maven web application.
I just faced another issue which seems related. After excluding a few dependencies from the setup described in (denbo Tue Oct 6 10:41:30 +0000 2009) my pom.xml at some point I cannot exclude more dependencies. The pom is marked unsaved but when I try to save it manually it does not work (it just remains unsaved). What worries me most is that when I close this unsaved file, NB does not warn me. It simply closes the file and discards the changes.
*** Issue 173457 has been marked as a duplicate of this issue. ***
The issue was also reported by NetCAT 6.8 participants.
Reassign back to maven.
slunegov: and ... ? what is the reasoning for reassignment? if it's the ComponentUpdater stuff we discussed offline (or anything else you believe is causing it), please note it here so that we have a good resolution track on the issue. Noone will remember anything when the issue gets reopened a year from now.. thanks reporters: please try out the latest dev builds of 6.8, the issue might have been resolved in trunk.
Hi Milos. Below some notes about how XDM/XAM works. I suppose they can be useful for your team. There are two models 1) XDM is low level model and it is very close to the sources level. And even more, I suppose it will be correct enough to say that XDM is sources... parsed sources. 2) XAM is high level model. It allows to work with XML document it terms of "knowledge domain". XDM is base model, XAM is derived. XAM wraps XDM. Therefore synchronization of models is required. How it works: 1) When you change XAM, XDM is changed in the same time 2) When XDM is changed, XAM is synchronized with XDM by ComponentUpdater. When somebody changes sources of XML document, XDM model is changed first. Than sychronization process is ran and XAM model is updated and ComponentUpdater is used here. Please note that synchronization process is ran when user changes sources code in editor and when undo, redo or rollback happens. Undo, redo works on XDM not on XAM. e.g. If you remove some element in XAM and than invoke undo action, new XAM element object will be instantiated and put on place of removed XAM element. As I understand ComponentUpdater allows to provide custom processing of adding and removing elements in XAM during synchronization process. Why there is no default ComponentUpdater for cases, when custom processing is not needed? I don't know. May be the reason is same as in case of visitor pattern: sometimes it is definitely bad approach to have default visitor implementation with empty methods. Just know that is does not exist, that it should be implemented, and that we never developed XAM/XDM, we just use them and fix critical for SOA modules issues. Bugs in ComponentUpdater is typical cause of XAM-XDM synchronization problems, just remember this and when you see that synchronization is broken look for problems in ComponentUpdater first. One more moment is usage of startTransaction/endTransaction(rollbackTransaction) methods. These methods are intended to group couple of changes, than grouped changed can be rolled back (undo) and forward (redo) together. I suppose that access to XAM/XDM by another threads is blocked when transaction is started. So it is definitely bad idea to start transaction when user opens some wizard or dialog, and finish/rollback transaction when user closes wizard or dialog. Transaction should be as quick as it is possible.
let's assume now that the issue is fixed in trunk trunk by me fixing the ComponentUpdater
v.