How to use Bitbucket as a maven remote repository?

前端 未结 4 995
心在旅途
心在旅途 2021-01-31 03:29

We are planning to use bitbucket as source code repository as well remote repository for our maven based projects. I have created a repository on bitbucket something like below:

4条回答
  •  再見小時候
    2021-01-31 04:34

    Install jars in a local maven repository.

    Make a directory e.g. maven-repo/repository

    cd into maven-repo

    execute the following (replacing the arguments by the ones that are relevant to your jar):

    mvn install:install-file -DgroupId=com.rapid_i -DartifactId=rapidminer -Dversion=5.3.006 -Dfile=/path/to/artifact/rapidminer.jar -Dpackaging=jar -DgeneratePom=true -DlocalRepositoryPath=./repository  -DcreateChecksum=true
    

    Share the folder to a BitBucket public repository.

    Create a repository in your pom.xml pointing to you bitbucket folder.(you must use /raw/master in the path https://bitbucket.org/your-user-or-group/your_maven-repo/raw/master/ !!)

    
    4.0.0
    
    org.activeintel
    rapidminer-proj
    0.0.1 
    
    
    
        
            com.rapid_i
            rapidminer
            5.3.006
        
    
    
    
    
    
        neil_rubens-repository
        https://bitbucket.org/your-user-or-group/your_maven-repo/raw/master/repository/
    
    
    
    
    

    Source: Hosting Maven Repository for third-party jars on Git (Bitbucket/Github)

提交回复
热议问题