Often as developers, we need to add unit testing to legacy code while being unable to make non-trivial changes to the code under test. In legacy code, logging and other resources are often set up in a static initializer. That code won’t execute nicely in a unit testing environment (could be using JNDI or something […]
Tag: TIL
dependencyManagement tag in Maven
One very peculiar issue I’ve run into during development is an issue where I have a parent pom.xml file and a child pom.xml file. The child pom.xml file imports the parent artifact as a dependency. Now, when we make changes to dependencies in the parent pom.xml file, we don’t see them reflected when building the […]
package.json scripts
When using npm (commonly with nodejs), we can pre-define command line commands in the package.json file, using the scripts option. Use Case: Pre-Standardized Commands Per Organization Description: Allow teams to standardize commands to allow easy cross-project development and collaboration. In our example, we will standardize a command extended-test that should be run by all developers […]