What is the best way to integrate FindBugs with Jdeveloper? - oracle-adf

I am a Find bugs fan and have used it before with Intellij Idea . It has a very nice plugin for Intellij Idea. Now I am using JDeveloper as it has the best support for Oracle ADF framework and my application is built on top of ADF . I want to find out what is the best possible way to integrate JDeveloper directly with FindBugs ? Are there any plugins ?
Edit: I have been through this blog which describes how to integrate FindBugs into a build script for Ant but when I followed the steps mentioned there I see the following :
Buildfile: D:\Software\findbugs-2.0.2\findbugs.xml
init:
findbugs:
[findbugs] Executing findbugs from ant task
[findbugs] Running FindBugs...
[findbugs] edu.umd.cs.findbugs.NoClassesFoundToAnalyzeException: No classes found to analyze in *C:\Oracle\Middleware\jdk160_24\jre\lib\resources.jar *C:\Oracle\Middleware\jdk160_24\jre\lib\rt.jar *C:\Oracle\Middleware\jdk160_24\jre\lib\jsse.jar *C:\Oracle\Middleware\jdk160_24\jre\lib\jce.jar *C:\Oracle\Middleware\jdk160_24\jre\lib\charsets.jar *C:\Oracle\Middleware\jdk160_24\jre\lib\ext\dnsns.jar *C:\Oracle\Middleware\jdk160_24\jre\lib\ext\localedata.jar *C:\Oracle\Middleware\jdk160_24\jre\lib\ext\sunjce_provider.jar *C:\Oracle\Middleware\jdk160_24\jre\lib\ext\sunmscapi.jar *C:\Oracle\Middleware\jdk160_24\jre\lib\ext\sunpkcs11.jar *D:\Software\findbugs-2.0.2\lib\annotations.jar *D:\Software\findbugs-2.0.2\lib\jsr305.jar
[findbugs] at edu.umd.cs.findbugs.FindBugs2.execute(FindBugs2.java:273)
[findbugs] at edu.umd.cs.findbugs.FindBugs.runMain(FindBugs.java:391)
[findbugs] at edu.umd.cs.findbugs.FindBugs2.main(FindBugs2.java:1298)
[findbugs] Java Result: 4
BUILD SUCCESSFUL
Total time: 4 seconds
I think it is not finding any files to analyze . But I have set the value of basedir2 as the following :
${project.classpath}${java.path}${project.dir}${project.sourcepath}${target.class}${workspace.path}

You know that you can debug ant scripts in jdev?
You can step into each target, set breakpoints on targets and definitions.
This would help you find out which parameters are passed to a target. You can even see the values of each variable like in a normal Java code.

Note that in the blog the value set for basedir2 is ${project.dir}
Also make sure that before your run the findbugs you actually compile your project so the class files will be created in the right directory.

Related

The Angular Universal (SSR) cannot integrate with the external libraries like puppeteer, bulljs

This is just for describing the issue and sharing my solution, I got stuck a lot of time on it.
This issue happened after I upgraded the Angular 10 -> 11 and changed the builder from udk:udk-runner to #angular-devkit
The issue I was facing is when I set the field bundleDependencies in angular.json to true . The Puppeteer cannot start with the error cannot launch the browser
Then I found it also happened on the other external libraries I'm using at the Server side like BullJS Bull-Board Puppeteer-Cluster with the below error
Github source for demo the issue: https://github.com/phattranky/angular-ssr-error-with-pupepteer
The solution is quite simple you just need to add externalDependencies below the field bundleDependencies, which are the libraries we are using.
"externalDependencies": ["puppeteer", "puppeteer-cluster", "bull", "bull-board"]
Sample:
What is the externalDependencies ?
https://github.com/angular/angular-cli/blob/master/packages/angular_devkit/build_angular/src/builders/server/schema.json
If you have the better solution and any feedbacks, please share for me. Thanks

Integrating Android .aar lib

I'm trying to integrate the cwac-cam2 library with codenameone. The lib is in .aar format but when I build it fails whith the following error:
org.gradle.process.internal.ExecException: Process 'command '/home/ec2-user/android-sdk/build-tools/23.0.1/aapt'' finished with non-zero exit value 1
I can not find out what is wrong. Can you help me please?
Lib reference: https://github.com/commonsguy/cwac-cam2
Its a bit difficult for me to say what exactly wrong is, but you can try some general steps that I would follow like
1) Check your .aar lib is residing at appropriate location. Normally for Android it will be at ..\YourProject\native\android\YourLib.aar
(also do 'Refresh cn1lib files' once, because I did so.. lol)
2) check build hint and make sure you have
android.enableProguard = false
3) If you are using any activity from that .aar lib then make sure you have added those activity/ies in build hint as android.xapplication = <activity android:name="com.XX.YY.MyActivity" />
I would further suggest you look at Chen's post on ARR integration here: http://www.codenameone.com/blog/integrating-android-3rd-party-libraries-jni.html
Also notice that gradle builds are often harder to work with in terms of result readability. I would suggest trying to disable gradle first and getting it to work without it then re-enabling it so you can test with android studio if necessary. You can disable gradle with the build hint android.gradle=false.

What kind of output does the "protractor-ng-hint-plugin" generates?

I'm currently researching on "protractor-ng-hint-plugin" on how its used and what output it generates to see if it would be beneficial for my project. But, there is very little to none documentation on this plugin.
Only meaningful doc out there is https://github.com/angular/protractor-ng-hint-plugin .
I've added
plugins: [
{
package: 'protractor-ng-hint-plugin'
}
and I've verified that the plugin is loaded during the test by using --troubleshoot flag.
Has anyone used this plugin? If yes, what output does it generates?
If your app has the angular-hint.js loaded and ng-hint activated, the protractor-ng-hint-plugin would report Angular best practices violations on the command-line. Try to run tests against these sample applications and see warnings on the console:
https://github.com/angular/protractor-ng-hint-plugin/tree/master/testapp
https://github.com/angular/angular-hint/tree/master/examples

Unable to find the features file?

I am running Cucumber JVM for a POC with Selenium 2.37.
The folder structure of my project as follows
src
>> main
> test
>java
>package
>TestRunner.java
>StepfDef.java
>resource
>package
>bdddemo.features
When i run the test runner via Junit, i am getting the following error message.
cucumber.runtime.CucumberException:
No features found at [classpath:test/java/com/package]
I believe the folder structure has some issue.
Can anybody post me where the Cucumber-JVM is actually looking for story files by default ?
By default, when using classpath:, Cucumber starts looking in the root of you classpath.
If you configure Cucumber to search in "classpath:features", you can put your features in src/test/resources/features.

Sencha Cmd v3 build error when implementing Bryntum Scheduler

Using Cmd 3.0.0.141, I have successfully generated a workspace and an Ext app in that workspace. The application builds correctly until I attempt to integrate the Bryntum Scheduler, where I encounter an error when I try to build:
"Failed to resolve dependency Sch.panel.SchedulerTree for file ExtCalendar.view.Tree"
the app is very simple at this point, uses Ext.application and follows the MVC pattern where I have a view defined "ExtCalendar.view.Tree" that extends 'Sch.panel.SchedulerTree". I also have models and stores that extend Bryntum classes as well, so I assume the compiler will trip over those as well, since it can't see the Sch namespace.
I've added a 'js' path to my app.json that points to the bryntum js file where 'Sch.panel.SchedulerTree' comes from. I've tried to run the 'refresh' command with the same results (Failed to resolve...). I've regenerated the bootstrap.js file manually using 'compile', but nothing from the Sch namespace ever gets added to it, despite the Brytum lib file being in the classpath.
What do I need to do in order to successfully run the 'build' command with libs like this?
Or, do I need to take a more granular approach using the 'compile' command?
With the help of the nice folks on the Sencha forums, I was able to resolve my build issues. The solution, for me, involved a shim. I added an external shim.js file to my index with as many //#require and //#define directives as needed in order to resolve the dependency issues.
According to the nice folks at Bryntum, once I upgrade from the free-trial version of the Bryntum Scheduler, I will be able to get rid of the shim and simply rely on the sencha.cfg classpath pointing at the Bryntum src.
Also, as an aside, the app.json file is not used in ExtJS apps, its inclusion in the generated files was a bug in build 141 of Cmd v3.
See this thread for more detail.

Resources