I was given an assignment to Migrate a project to Maven given the condition that there should be no source code modifications.First it seemed easy as I thought the only challenge was to use a custom folder structure rather than the predefined structure of maven
But soon I have hit a road block the project contains many XML files which are placed along with the java code within the java package and are loaded using getResourceAsStream("path to package")
When I run mvn:compile, maven ignores these xmls and as a result the deployment fails I cant move them to resources directory as there will be a lot of code changes
Is there a way to specify to take xml and java files from the same package in Maven
People who try to overrule Maven's built-in directory assumptions tend to have very unhappy lives.
I don't say I really love some of the things they do myself, but one of Maven's main selling point is the fact that you know where to look for stuff because Maven rams it down everyone's throat impartially.
On the other hand, there must be something really odd about your project if the mere act of relocating your source and resource directories requires Java code changes.
Customer surveys are for companies who didn't pay proper attention to begin with.
I agree with Tim - When using Maven, you'll make your life a lot easier if you follow the Maven source code structure. Although, Maven does allow configuring a different structure for your project, it can really turn out to be messy in the long run, especially with all those plugin configurations. That would then defeat the purpose of switching to Maven.