forge / thorntail-addon

Thorntail Forge Addon
http://thorntail.io/
Eclipse Public License 1.0
14 stars 14 forks source link

Addon crashes Netbeans when installing with JBoss Forge plugin #51

Closed nureyev closed 7 years ago

nureyev commented 7 years ago

On Netbeans 8.2, the addon freezes and crashes the IDE when attempting to install with the newest JBoss Forge plugin. The result is the same whether the addon is installed using the "Install an addon from Git" or "Install an addon from the catalog".

This is the only trace I was able to get after several IDE restarts:

java.lang.NullPointerException
   at org.jboss.forge.netbeans.ui.context.NbUIContext.getSelectedResources(NbUIContext.java:124)
   at org.jboss.forge.netbeans.ui.context.NbUIContext.<init>(NbUIContext.java:45)
   at org.jboss.forge.netbeans.ui.quicksearch.ForgeSearchProvider.evaluate(ForgeSearchProvider.java:30)
   at org.netbeans.modules.quicksearch.CommandEvaluator$3.run(CommandEvaluator.java:265)
   at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1443)
   at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:68)

Thanks.

gastaldi commented 7 years ago

Thanks for the feedback. Will try to reproduce locally. I have also pushed some changes to the netbeans plugin, could you build locally and try it with the master version meanwhile? https://github.com/forge/netbeans-plugin

nureyev commented 7 years ago

I spent about 4 hours waiting for Maven to download dependencies for the plugin today. There were also a number of dependency conflicts that needed to be individually resolved, likely caused by my prior Wildfly Swarm project builds. I'll try again when I have some time later.

gastaldi commented 7 years ago

I just tried with Netbeans and it works great for me. Can you try deleting your ~/.forge directory before starting Netbeans and trying again?

nureyev commented 7 years ago

Firstly, it does install successfully now. Thanks for all your work, I really appreciate it.

A few notes, which might be useful to someone else trying to build the Forge plugin:

1) In Netbeans, in Projects view, open the JBoss Forge Parent Project. Expand the 'Modules' node. Open each sub-project. For each project (Forge, Application, Branding, Runtime), right-click on Dependencies, and Runtime Dependencies and then Download Declared Dependencies. This should download Maven artifacts to the local repository and stop most build errors.

forge1

2) There seems to be a conflict with Wildfly Swarm, in particular with Swarm's Shrinkwrap artifact. This is the type of error that will occur:

Reactor Summary:

JBoss Forge Parent Project ......................... SUCCESS [  1.375 s]
JBoss Forge Branding ............................... SUCCESS [  2.829 s]
JBoss Forge Runtime ................................ FAILURE [ 31.267 s]
JBoss Forge ........................................ SKIPPED
JBoss Forge Application ............................ SKIPPED
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 37.111 s
Finished at: 2017-08-26T17:04:28+02:00
Final Memory: 43M/747M
------------------------------------------------------------------------
Failed to execute goal org.jboss.forge.furnace:furnace-maven-plugin:2.26.2.Final:addon-install (deploy-addons) on project runtime: Execution deploy-addons of goal org.jboss.forge.furnace:furnace-maven-plugin:2.26.2.Final:addon-install failed: org.eclipse.aether.resolution.DependencyResolutionException: Failed to collect dependencies at org.jboss.forge.addon:bean-validation:jar:forge-addon:3.7.2.Final -> org.jboss.forge.addon:bean-validation-api:jar:3.7.2.Final -> org.hibernate:hibernate-validator:jar:5.4.0.Final: Failed to read artifact descriptor for org.hibernate:hibernate-validator:jar:5.4.0.Final: Failure to transfer org.jboss.shrinkwrap:shrinkwrap-bom:pom:1.2.3 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.jboss.shrinkwrap:shrinkwrap-bom:pom:1.2.3 from/to central (https://repo.maven.apache.org/maven2): Error transferring file: Connection timed out: connect -> [Help 1]

To resolve, remove the /jboss/shrinkwrap folder from the local .m2 repository. If necessary, remove /jboss/forge as well. Rebuild with mvn install -U

gastaldi commented 7 years ago

Thank you! Would you mind providing a PR with this content to the netbeans-plugin's README?

Closing this issue now