I have a situation, I'm developing a plugin with version 6 of pentaho, some me things work and others do not and this is because not myplugin-require-js-cfg.js file is, I was researching in case I made a plugin configuration in the xml:
plugin.xml
and in the myplugin-require-js-cfg.js file:
(function() {
requireCfg['paths']['search'] = CONTEXT_PATH + 'content/idplugin/folderresource/js';
})();
but still gives me the same error:
ERROR [GenericServlet] GenericServlet.ERROR_0004 - Resource /idplugin/folderresource/myplugin-require-js-cfg.js not found in plugin myplugin
I have tried several things but still gives the same problem,
someone can give me an idea ?, would greatly appreciate it, thanks in advance
Related
The process for writing multiple windows tests described in TestCafe documentation seems pretty straightforward:
await t.openWindow('https://url.com/addnewproperty')
or even
const initialWindow = await t.getCurrentWindow()
should do it. However, every time I use any of the Window Management methods I get the errors:
TypeError: t.openWindow is not a function and cannot do anything about it.
Does anyone know what am I doing wrong and how to solve the issue?
TestCafe version 1.9.4
The problem was in different versions of Test Cafe used between main codebase and one of the underlying packages. Alex Kamaev answer was a correct one
I was trying to run a ballerina program on IntelliJ Idea. Then, Edit configuration appears and it says
Error: Main run kind is selected, but the file does not contain a main function.
What should I do ? And what should I select in Program Arguments.
source code:
import ballerina.net.http;
import ballerina.lang.messages;
#http:BasePath {value:"/helloservice"}
service helloService {
#http:GET {}
#http:PATH {value:"/hello?name={name}"}
resource hello (message m, #http:QueryParam {value:"name"} string name) {
string respStr = "Hello, World " + name + "!\n";
message responce = {};
messages:setStringPayload(response, respStr);
reply response;
}
}
Seems like the issue here is, you have manually created a main run configuration and trying to run a service using that. Please select the service run kind in configuration as shown below.
Also, you don't have to manually create a run configurations. IntelliJ IDEA plugin can automatically detect the run kind when you run a main function or services using gutter run icon like below.
Run configuration is automatically created.
If you first run a main and then run a service, the run configuration will be automatically changed according to that as well. So no manual intervention is needed.
On the side notes, the code seems to have much older Ballerina syntax and I would advice using the latest Ballerina syntax to avoid any issues with the latest IntelliJ IDEA plugin. Please refer Ballerina examples for latest syntax.
I am trying to build my .net solution using cake build file. I am trying to use the documentation on the website here
My current msbuild task looks like this:
MSBuild("./solution.sln", new MSBuildSettings()
.SetConfiguration(environmentSetting)
.SetMSBuildPlatform(MSBuildPlatform.Automatic)
.SetVerbosity(Verbosity.Minimal)
.SetMaxCpuCount(System.Environment.ProcessorCount)
.SetNodeReuse(false)
.WithConsoleLoggerParameter("ErrorsOnly"));
It keeps throwing error for the parameter .WithConsoleLoggerParameter. I am not sure what am I doing wrong here.
The Microsoft documentation shows here the same thing and I tried running it in powershell with the same parameters and it ran just file.
Actually I figured it out. I am not sure how the argument customization works so any explanation for that would be great!
I changed the code to
MSBuild("./solution.sln", new MSBuildSettings(){
ArgumentCustomization = args=>args.Append("/consoleloggerparameters:ErrorsOnly")
}
.SetConfiguration(environmentSetting)
.SetMSBuildPlatform(MSBuildPlatform.Automatic)
.SetVerbosity(Verbosity.Minimal)
.SetMaxCpuCount(System.Environment.ProcessorCount)
.SetNodeReuse(false));
Seems to work. Hope this helps someone!
I am relatively new to gradle and we use both JUnit and testNG unit tests in our project. With google help I figured out how to make both testNG and JUnit tests running. Below is how I ended up by achieving it
build.gradle
....
task testNG(type: Test) {
useTestNG {}
}
test {
dependsOn testNG
}
However only the JUnit reports are produced. Google again helped me with this link https://discuss.gradle.org/t/using-junit-and-testng-together-steps-on-testng-html-file/5484 which shows how to solve a problem that looks exactly like mine by configuring two separate test reports folders like below:
testng.testReportDir = file("$buildDir/reports/testng")
test.testReportDir = file("$buildDir/reports/testjunit")
However it does not exactly say where to put those two entries and I feel like I am going to get crazy trying to look at gradle books, gradle examples and API without figuring out how to. According with the API test task has a reports property where you can configure TestTaskReports instance but whatever I tried failed.
Can you please help me with this. It must be something so obvious that I am missing it.
Thank you in advance
Take a look at the DSL reference for Test. There you can find a reports property at https://docs.gradle.org/current/dsl/org.gradle.api.tasks.testing.Test.html#org.gradle.api.tasks.testing.Test:reports
This gives you a TestTaskReports. Following this route in the DSL leads you to:
task testNG(type: Test) {
useTestNG {}
reports.html.destination = file("$buildDir/reports/testng")
}
test {
reports.html.destination = file("$buildDir/reports/test")
dependsOn testNG
}
I've been looking at using Aloha for a project but I'm completely stumped by the documentation. I'm trying to create a repository following the documentation and I have this so far:
requirejs.config({
paths: {
'jquery': "http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min",
'aloha': "http://cdn.aloha-editor.org/latest/lib/aloha",
},
});
define(
['jquery'],
function($) {
"use strict";
require(['aloha'], function(localAloha) {
console.debug(localAloha);
console.debug(Aloha.AbstractRepository);
});
return {};
}
);
Now. This tries to pull Aloha and jQuery from an appropriate CDN, and it works fine. However, despite what the Aloha documentation tells me, localAloha is not defined (it appears Aloha doesn't return itself) but that's not a problem since my that point it's in the global namespace anyway.
More frustrating when trying to define a repository is the fact that Aloha.AbstractRepository is undefined, despite all the examples, and code from live projects like the Drupal Aloha plugin, telling that all I need to do is extend Aloha.AbstractRepository.
Does anyone have any idea what's going on here? Aloha looks great, and is perfect for what I have in mind, but it's proven to be very difficult to actually get it working.
here is some code which should help you.
a php script is reading files from direcotries (eg. upload dir) and generates a json file with that information. that json is in the format which can be used by a js file (repository api) to tell aloha editor what's in your repository: http://ge.tt/1VJqium/v/0?c