开发者

Handling large resource dependencies with maven

I have a resource that is quite large (over 100 MB).开发者_如何学Go I would rather not check this into the SVN because then users who do not depend on this project still need to download 100 MB. I am using maven for the build system/dependency management. How can I handle these resources using maven?


If your ressource is a jar or something similar, you can add it to your repository :

mvn install:install-file
  -Dfile=<path-to-file>
  -DgroupId=<group-id>
  -DartifactId=<artifact-id>
  -Dversion=<version>
  -Dpackaging=<packaging>
  -DgeneratePom=true

Where: <path-to-file>  the path to the file to load
       <group-id>      the group that the file should be registered under
       <artifact-id>   the artifact name for the file
       <version>       the version of the file
       <packaging>     the packaging of the file e.g. jar

If not, you have to find an other way in database for example, or in a shared directory, you're right not to put it in SVN.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜