I'm struggling with our Jenkins configuration.
I've defined a jenkins-job with multiple SVN-Modules, because i want to checkout from different locations from the same svn-repository.
I need to define a optional module-directory for each checkout, because if i don't set one, Jenkins will checkout all my modules in the same directory and will always overwrite my .svn-directory (and consequent delete all files, i've checked out before).
So i set a optional directory for each checkout. And from this point, it's different to my folder-structure i use, when i checkout all my packages in my eclipse-workspace for exmaple. Because there is a flat-hierarchie.
So i can't use the same relativePath in my pom.xml to define the parent, when the relativePath is different between jenkins and development.
Example:
Jenkins (Tree-hierarchie): <relativePath>../<optionalModuleDir>/pom.xml</relativePath>
Eclipse-Workspace(Flat hierarchie): <relativePath>../pom.xml</relativePath>
I tried to use profiles, but i only can set modules in profiles, not the parent relativePath.
How can i use the same pom.xml with two different parent relativePath? Or what should i do instead to solve the problem?
as a workaround modify your maven build as follows:
when your build starts, after the checkout the sources will be brought into the required structure and then the build itself performs.