Thomazzz
Thomazzz

Reputation: 203

maven-scm-plugin and git. when downloading files from repository - NullPointerException

I want to download files from git repository (aka clone) to project directory using maven-scm-plugin

I am getting an error

Failed to execute goal org.apache.maven.plugins:maven-scm-plugin:1.12.2:export (myjsp) on project myproject-tomcat-web: Execution myjsp of goal org.apache.maven.plugins:maven-scm-plugin:1.12.2:export failed.: NullPointerException

In pom.xml I use the following construct

            <plugin>
                <artifactId>maven-scm-plugin</artifactId>
                <version>1.12.2</version>
                <executions>
                    <execution>
                        <id>myjsp</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>export</goal>
                        </goals>
                        <configuration>
                            <connectionUrl>scm:git:https://git.myserver.com/myurl.git</connectionUrl>
                            <exportDirectory>target/web-resources/WEB-INF/resource</exportDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

At the same time, everything loads normally from the SVN repository (when setting the url to connectionUrl).

What could be the problem?

Upvotes: 0

Views: 630

Answers (1)

Thomazzz
Thomazzz

Reputation: 203

Resolved, checkoutDirectory should be set instead of exportDirectory

Upvotes: 0

Related Questions