![]() This.low_risk_icon = new ImageIcon(getClass().getResource("/low-icon.png")) dium_risk_icon = new ImageIcon(getClass().getResource("/medium-icon.png")) This.high_risk_icon = new ImageIcon(getClass().getResource("/high-icon.png")) This.critical_risk_icon = new ImageIcon(getClass().getResource("/critical-icon.png")) Adding this to the “pom.xml” file resulted in a self-contained single jar file with all resources: ![]() The simplest route I found was to use the “maven-assembly-plugin”. To fix the wonky icons I needed to ensure the resources were included inside the Jar file or otherwise copied during the build. Bundling the app and dependencies into a single Jar I wrapped the code loading these icons in a “try catch” statement to see a more verbose error message and to ensure the app loaded despite the wonky icons. The only thing that did not seem to work was the resources folder including the risk icons. Vectors survive for now.īy the end of this my application compiled and executed. Some day the rug will be pulled but for now we are golden. I did not massively feel the need to redo the code for that since it has Vectors in pretty much every single area of the application. Given the age of ReportCompiler there were a few deprecation warnings around the use of Vectors etc. Repeat until all the red underlines have vacated your project. After adding each dependency build the app again and watch that import statement fix itself.Then copy and paste the “” tag into your projects “pom.xml”. Notice that in this example the latest version was newer as highlighted.Clicking on the top result will show you the information about the relevant maven package:.This will find the package that you need to import. For each import error copy the package name for example “” and google it with the word “maven”.Each underline here points to a dependency we will need to include using maven now. They will be highlighted in red at the top of every class file. Deal with any package renaming because of this movement.Copy the source code from your previous project into the source folder.Open up netbeans (I originally designed the GUI in this so it kind of needs to be netbeans unless another GUI editor works just as well?).I do not use it every day like I used to and so the project is only lightly supported by me. I have a love affair with it in particular though because it has saved me an unbelievable amount of time over the years even accounting for the initial intense development time. I use it mostly as a Nessus viewer since my gripes with the UI experience in browser are legion. It will import “.nessus” XML files and various other vulnerability scanners too. It is in no way complete and has adorable missing or half implemented thoughts throughout it. I made ReportCompiler a long time ago (long enough that Java was a sane choice). ![]() Source Code – for contributors or the curious.In this blog post I discuss how I migrated an old Netbeans project (Specifically ReportCompiler) to retrofit Maven and to integrate OWASP’s dependency check into the build process. ![]()
0 Comments
Leave a Reply. |