This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
import org.netbeans.modules.websvc.rest.spi.RestSupport;
import org.netbeans.spi.project.support.ant.EditableProperties;
RestSupport.COMMAND_TEST_RESTBEANS,
commands.put(RestSupport.COMMAND_TEST_RESTBEANS, new String[] {"test-restbeans"}); // NOI18N
} else if ( command.equals( RestSupport.COMMAND_TEST_RESTBEANS ) ) {
setupTestRestBeans(p);
private void setupTestRestBeans(Properties p) {
p.setProperty(RestSupport.PROP_BASE_URL_TOKEN, RestSupport.BASE_URL_TOKEN);
RestSupport rs = project.getLookup().lookup(RestSupport.class);
AntProjectHelper helper = project.getAntProjectHelper();
EditableProperties projectProps = helper.getProperties(helper.PROJECT_PROPERTIES_PATH);
String path = projectProps.getProperty(RestSupport.PROP_RESTBEANS_TEST_DIR);
if (path == null) {
path = RestSupport.RESTBEANS_TEST_DIR;
}
File testdir = helper.resolveFile(path);
try {
FileObject testFO = rs.generateTestClient(testdir);
p.setProperty(RestSupport.PROP_RESTBEANS_TEST_URL, testFO.getURL().toString());
p.setProperty(RestSupport.PROP_RESTBEANS_TEST_FILE, testFO.getPath());
} catch(Exception ex) {
ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, ex);
else if ( command.equals( RestSupport.COMMAND_TEST_RESTBEANS ) ) {
return project.getLookup().lookup(RestSupport.class).isReady();