Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Include file from another subversion repository in my maven assembly

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

I want to include in the assembly a file from another Subversion repository.

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

like image 738
Paul McKenzie Avatar asked Jan 22 '23 10:01

Paul McKenzie


2 Answers

      <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>
like image 122
Farid Avatar answered Jan 24 '23 01:01

Farid


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

like image 23
pmod Avatar answered Jan 24 '23 01:01

pmod