简体   繁体   English

Netbeans不会让我改变项目的Netbeans平台

[英]Netbeans won't let me change a project's Netbeans platform

I've downloaded the VisualVM source and am trying to compile the Glassfish plugin using Netbeans 7.01. 我已经下载了VisualVM源代码,并尝试使用Netbeans 7.01编译Glassfish插件。 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' C:\\ source \\ visualvm \\ trunk \\ plugins \\ glassfish \\ nbproject \\ build-impl.xml:48:您必须定义'nbplatform.VisualVM_100609-dd12ae64a19c.harness.dir'

That lead me to the project settings which shows the platform as "Netbeans IDE...". 这导致我进入项目设置,将平台显示为“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. 然而,在我的hello world VisualVM插件中,我可以将平台设置为适当的平台并且运行良好。 在此输入图像描述

To try and resolve this I've tried creating platform.properties file and putting it in the nbproject folder with the following entries. 为了尝试解决这个问题,我尝试创建platform.properties文件并将其放在nbproject文件夹中,其中包含以下条目。 However, this doesn't seem to be working 但是,这似乎不起作用

harness.dir=mypath/visualvm/visualvm_13 harness.dir = mypath中/ VisualVM的/ visualvm_13

and

nbplatform.VisualVM_100609-dd12ae64a19c.harness.dir=mypath/visualvm/visualvm_13 nbplatform.VisualVM_100609-dd12ae64a19c.harness.dir = mypath中/ VisualVM的/ visualvm_13

Any suggestions. 有什么建议么。

Glassfish plugin is part of 'plugins' NetBeans modules suite. Glassfish插件是“插件”NetBeans模块套件的一部分。 All modules from a Modules suite has to be build against the same version of NetBeans platform application (in our case VisualVM). 模块套件中的所有模块都必须针对相同版本的NetBeans平台应用程序(在我们的示例中为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. 这意味着您可以更改整个套件的NetBeans平台,转到“插件”套件的属性,更改平台。

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 . 要构建VisualVM及其关联的插件,必须下载VisualVM网站的构建指南部分中提供的NetBeans平台和分析器二进制文件。

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. 例如,要构建1.3.2版本,您将转到本节并通过该页面上的链接下载NetBeans 6.9.1平台和分析器二进制文件。 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. 我提供的链接还为您提供了从存储库中获取正确的VisualVM源并构建VisualVM及其插件的说明。 For example, the sources for the 1.3.2 release can be checked out using the following url: 例如,可以使用以下URL检出1.3.2版本的源:

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. 一旦完成检出并将NetBeans平台二进制文件(从上面的链接下载)解release132/visualvmrelease132/visualvm目录中,就可以通过从release32/plugins目录运行ant build来构建整个应用程序及其release32/plugins

I successfully completed this entire process and can verify that the instructions work for 1.3.2 . 我成功地完成了整个过程,并且可以验证说明适用于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. 您所看到的错误告诉您,无法找到NetBeans平台的构建工具。 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. 线束包含在可下载的二进制文件中,一旦将其release32/visualvm压缩到release32/visualvm目录中, project.properties文件中的值将再次有效。 This is of course a good example of why you should keep everything needed to successfully reproduce a build in your repository! 这当然是一个很好的例子,说明为什么你应该保留在存储库中成功重现构建所需的一切!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM