Netbeans won't let me change a project's Netbeans platform - netbeans

I've downloaded the VisualVM source and am trying to compile the Glassfish plugin using Netbeans 7.01. Doing so results in the following error:
C:\source\visualvm\trunk\plugins\glassfish\nbproject\build-impl.xml:48: You must define 'nbplatform.VisualVM_100609-dd12ae64a19c.harness.dir'
That lead me to the project settings which shows the platform as "Netbeans IDE...". The drop down box is grayed out so I can't select the correct platform.
Yet, on my hello world VisualVM plugin I can set the platform to the appropriate platform and it runs great.
To try and resolve this I've tried creating platform.properties file and putting it in the nbproject folder with the following entries. However, this doesn't seem to be working
harness.dir=mypath/visualvm/visualvm_13
and
nbplatform.VisualVM_100609-dd12ae64a19c.harness.dir=mypath/visualvm/visualvm_13
Any suggestions.

Glassfish plugin is part of 'plugins' NetBeans modules suite. All modules from a Modules suite has to be build against the same version of NetBeans platform application (in our case VisualVM). This means that you can change the NetBeans Platform for the whole suite, go to the properties of the 'plugins' suite a change the platform there.

In order to build the VisualVM and it's associated plugins you must download the NetBeans platform and profiler binaries that are available on the VisualVM website's build guide section.
For example, to build the 1.3.2 release you would go to this section and download the NetBeans 6.9.1 platform and profiler binaries available through the link located on that page. The link I've provided also gives you instructions for obtaining the proper VisualVM sources from the repository and building VisualVM and it's plugins. For example, the sources for the 1.3.2 release can be checked out using the following url:
https://svn.java.net/svn/visualvm~svn/branches/release132
And once you've completed the checkout and extracted the NetBeans platform binaries (downloaded from the above link) into the
release132/visualvm directory, you can build the entire application and it's plugins by running ant build from the release32/plugins directory.
I successfully completed this entire process and can verify that the instructions work for 1.3.2. However, the instructions for building the trunk did not result in a successful build due to at least one missing dependency.
What the error that you were seeing was telling you was that the NetBeans platform's build harness could not be located. The harness is included in the downloadable binary and once you've extracted it into the release32/visualvm directory the values that are in the project.properties file will once again be valid. This is of course a good example of why you should keep everything needed to successfully reproduce a build in your repository!

Related

Eclipse with WAS fast deployment setup

Which version of Eclipse should I use for WAS9?
What are the steps to enable development with WAS9 on Eclipse?
What configuration should I have to see changes taking effect as I save the files?
1. WebSphere Developer Tools only works on Eclipse versions up to (and including) 2020-06
2. Only the before mentioned plugin has to be installed to enable Eclipse to add WAS9 server and to enable publishing to/debugging it from Eclipse.
The plugin's official page: https://marketplace.eclipse.org/content/ibm-websphere-application-server-v9x-developer-tools
I installed by: Help, Install software, Add: http://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/updates/wdt/2020-03_comp/
If you downloaded the WebSphere development tools from the marketplace, then added a server, it should be enough, setting WebSphere JRE is not needed but WDT works best with the JRE that is shipped with WAS (located in /java)
3. To achieve fast deployment, for test driven development I use the following setup:
WAS server options
Publishing: Never Publish
Publishing settings...
Run server with resources within the workspace
Minimize and Auto publish options checked.
Project/Build automatically: checked
This way as I save a java or FE file, it is immediately served by the WAS server.
Official, full details for the WAS publishing settings are here: https://www.ibm.com/docs/en/wasdtfe?topic=server-publishing-settings-websphere-application-traditional
Misc
If there are bigger modifications that would require a publish then my project usually fails to start and I have to do a stop server, full clean build and then start again. Because of this I chose not to do any automatic publishing as the resources updated in Eclipse are already provided from the server and a publish event would trigger the reinstallation of the application that takes a lot of time and in my case fails without full clean install.
Probably you won't need these additional settings in eclipse.ini to load Eclipse with some exta jars that I do load libEclipse directory {com.ibm.ws.orb.jar, com.ibm.msg.client.provider.jar, com.ibm.msg.client.jms.jar, com.ibm.msg.client.jms.internal.jar}
-Djava.endorsed.dirs=C:\DEV\libEclipse\
-Dcom.ibm.websphere.thinclient=true

Process of install the Junit library in Eclipse

Good morning guys,
what I am considering about is to build a standard process of installing a library in a java project in eclipse. I am a niewbie software developer so a prior sorry if this question is a bit stupid.
All what I want to do is to use the junit library. I have followed these septs.
I installed the junit-4.12.jar file from the web.
Inside the project folder I created a new file and I named it "lib".
I put in this folder thae jar file and then in eclipse I click
on project folder -> properties -> Java build path and I click on libraries and add jars. (not external jars).
Is that process ok?
your process isn't good because it doesn't scale: imagine you want to install 40 libraries in your project. and then imaging your team has 5 developers and each of them has to do the same. and what about CI server that must be automatic
in fact your problem was solved years ago and the solution is called 'dependency management tool'. those tools are usually built into something more powerful called 'build tool'. maven or gradle are examples of such tools. you just provide list of your dependencies (like junit) and that program automatically downloads them and build your project. and it's sufficient as long as your project is more less 'typical'
i don't remember if eclipse has build in support for maven (one of the oldest and most common). if not, just install the eclipse plugin and you're ready to go

How to manually download Vaadin versions for Eclipse?

I'm using Eclipse Luna 4.4.2 and installed the Ivy plugin and Vaadin plugin from the market place as instructed by their book, but I'm unable to create a project since every time I try to I get the message:
Failed to list downloaded Vaadin versions
From what I'm reading around, Vaadin uses Ivy for managing the download of their packages but it seems to be blocked by my company's firewall.
Since the available versions cannot be downloaded, the combobox for selecting the version comes empty, stopping the process to create the project.
Is there a way to download the Vaadin version I need separately? Are there any options for me in my situation?
You can go to the Vaadin download page and select the Download as .zip option on the left of the page as in the image below. Please note that only the visual editor plugin is IDE dependent, while Vaadin as a framework can be used regardless of the IDE (you could write your code in notepad and compile it with the jars in the classpath), so there's no such thing as Vaadin versions for Eclipse.
On a sidenote you can also use maven to manage your dependencies and build process besides ivy. If you plan on using other frameworks or other Vaadin addons it may prove difficult to manage all these dependencies manually, so depending on your company's policies and configuration I'd ask whether they can grant access to the repositories or if at least there is an internal repository where one can add/find the necessary dependencies.

Gaelyk eclipse configuration error

I've tried to configure a gaelyk project in eclipse using the gradle script of the template project and always failed.
to do this I use the following command:
gradlew cleanEclipse eclipse
All the packeges seems correctly downloaded, the .project and .classpath files are created but I always fint this error on the project:
The App Engine SDK 'C:\Users\username\.gradle\caches\artifacts\com.google.appengine\appengine-api-1.0-sdk\c12498cf18507aa6433a94eb7d3e77d5\jars\appengine-api-1.0-sdk-1.6.1.jar' on the project's build path is not valid
(SDK location 'C:\Users\username\.gradle\caches\artifacts\com.google.appengine\appengine-api-1.0-sdk\c12498cf18507aa6433a94eb7d3e77d5\jars\appengine-api-1.0-sdk-1.6.1.jar' is not a directory)
It seems that the appengine SDK is specified uncorrectly in the .classpath/.project files.
I've installed eclipse Indigo and the last version of the google plugin for eclipse
How can I fix it?
I am personally not using Eclipse for Gaelyk development. Therefore, I am not sure if the existing Eclipse configuration in the Gradle build script of the template project will work with the Google plugin.
However, a while ago I got a pull request for the Gradle GAE plugin to integrate with the Eclipse plugin. I had turned it down because it's too specific and it would lead to potentially a lot of bugs to the Gradle plugin as the Google configuration might change. The author was planning to creating a separate plugin for it so you can try to ping him.
I also know of another Gradle plugin that might help you here. Also try to post your question the Gaelyk mailing list.

Platform-specific dependency creeping into Eclipse plugin

I have implemented a graph editor with Eclipse EMF and GMF frameworks. After completing my project, I realized that this plugin shows dependencies (not explicitly added by me) on some OS-specific plugins.i.e:org.eclipse.ui.win32, org.eclipse.swt.win32.win32.x86. And whenever I have tried to bypass this dependency at my update site something went wrong with the installation process of the plugin.
As such it is impossible to run my plugin in *nix environment or even win64 machines.This seems a very heavy constraint dependency to me. Am I doing something in a wrong way? Or is there no other way of building Eclipse plugins which are cross-platform other than building the project from scratch at each different OSs?
We created a similar style of plug-in in my project. Under "Plug-in Dependencies" in Package Explorer I can see org.eclipse.swt.win32 listed, but it is not listed in required plug-ins in plugin.xml.
We also successfully created an update site which works for Mac users without issue.
So, yes it is possible to have a cross-platform plug-in.
I would suggest you first try to to use "Export..." -> "Deployable plug-ins and fragments" to create a bunch of jar files for your plug-in. See if these can be successfully installed by copying into the drop-ins folder of a fresh eclipse installation. Do this first on a Win32 install, then try on another platform. Once you have that working, use the new Eclipse installation to create the Update site.