[weld-dev] Should you allow starting of an external container from mvn test?

Pete Muir pmuir at redhat.com
Tue Jan 5 11:58:04 EST 2010


On 28 Dec 2009, at 20:35, Steven Boscarine wrote:

> I like your suggestion of making it a POM option.  I'd advocate that it only be started via a specific non-default profile.  
> 
> For our projects, we usually define projects with non-Maven dependencies, like a partner web service or SMTP server, in a specific TestNG group which is excluded in the default profile.  
> 
> Sorry if this is repetitive, but...
> The big and central concern that I want to express to people is that you can unintentionally trigger code that doesn't belong to your project using commands that are typically assumed to be innocuous, like "mvn install."
> 
> This is a classic scenario where you're giving the developer a really, really, really sharp tool.  Individuals obviously need to take responsibility for their projects and decide what's appropriate.  
> 
> For my team (at CHB...my day job), I'd obviously have to make sure that they don't put anything where mvn test can run any code that's not part of its project.  I'd have no issues with a team member starting an embedded container because they would only be running their own code, defined in their project, but if someone started up an installed container from mvn test, I'd have no choice but to put a stop to it.

This is an interesting point, and one I guess that isn't really an issue in places I've worked. I can see that it would make sense to ensure that this runs in the "correct" (often a clean) container.

The exact way you would specify that you want to use a particular "installed" container is to enable the container in your POM, by adding a dependency to the connector, and then specifying the path to the container in the connectors properties. This seems pretty explicit to me - but is it enough?

Pete


More information about the weld-dev mailing list