Skip to content

MavenInDocker: Does not work when pom is in subfolder #49

@sklein94

Description

@sklein94

I had a problem building a maven project which was using the maven scm plugin. I was using the MavenInDocker-class to build the project.

The maven project is inside of a subfolder in the main project. So i was using the dir block in my Jenkinsfile. The problem is, that in this case only the current dir was mounted into the maven-docker-container which caused the build to fail because the .git-folder in the parent folder is required when using the scm-plugin.

To bypass this i executed the maven build in the base directory (to make sure everything is mounted inside docker) and passed the path to the pom.xml into the additionalArgs of the maven object.

Can you please make sure that the whole project is mounted into the maven-in-docker-container?
Maybe there is also another way, but i dont have an idea.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions