开发者

Include file from another subversion repository in my maven assembly

开发者 https://www.devze.com 2023-01-16 15:40 出处:网络
I am using maven-assembly-plugin to construct an assembly. I want to include in the 开发者_Python百科assembly a file from another Subversion repository.

I am using maven-assembly-plugin to construct an assembly.

I want to include in the 开发者_Python百科assembly a file from another Subversion repository.

How? Is there another plugin that will do a subversion export?


      <plugin>
            <artifactId>maven-scm-plugin</artifactId>
            <version>1.2</version>
            <executions>
                <execution>
                    <id>get-assembly-files</id>
                    <phase>prepare-package</phase>
                    <goals>
                        <goal>export</goal>
                    </goals>
                    <configuration>
                        <connectionUrl>scm:svn:http://foo/bar/baz.txt</connectionUrl>
                        <exportDirectory>${project.build.directory}</exportDirectory>
                    </configuration>
                </execution>
            </executions>
        </plugin>


It can be done by setting subversion property svn:externals

svn propset svn:externals "[local name] [external location]" .

where [external location] in case of another repository will look like: http://svn_server_name/svn_repo/project. Or you may use a file with "[local name] [external location]" pairs (with each pair on a new line) if you have to set several externals.

svn propset svn:externals -F <file_with_externals_list> .

Then, you have to apply changes:

svn commit -m "Changed external property"

and update local copy; the files from external path will be downloaded to [local_name]

svn update

Take a look at this

0

精彩评论

暂无评论...
验证码 换一张
取 消