bmatthews68/inmemdb-maven-plugin — pull request #10 by gmazza (2013-07-28 01:47:34+00:00)
Title: Adding a new <port> configuration item for Derby

The plugin is presently hardcoded to use Derby's default port 1527. This PR allows for different ports by adding a config item. For opensource projects, some devs may be reluctant to use port 1527 out of concern that a downloader may already be using that port for Derby, so they configure tests to use a nonstandard port instead (but even if not, providing a setting allows an individual dev to change the port if necessary for his machine.) Providing this option is particularly helpful here because even though the plugin will work if 1527 was previously activated by another process, the stop mojo will end up shutting down the Derby at that port, affecting other processes using it. Note: this option will not presently do anything for databases supported by inmemdb other than Derby. I tested this change on Apache Roller, it worked fine, but not the test cases, as I couldn't get them to run for some reason on my machine, change or no change. To test, just set the value and then connect to the database using a URL of jdbc:derby://localhost:PORT#/memory:mydb.