GithubHelp home page GithubHelp logo

maven-repository-php's Introduction

Maven Repository 1.x (PHP)

Head over to the Usage section below.

Requirements

  • XAMPP (Don't use PHP's built-in web server)
  • PHP 8

Usage

  1. Download the project, Extract files into a folder inside the htdocs folder of XAMPP.

  2. Run the server.

  3. Open the build.gradle file.

    Note! We assume that maven-repository is the folder you extracted the files to.

    buildscript {
        repositories {
            maven { url 'http://127.0.0.1/maven-repository/repository/' } // +
    
            google()
            jcenter()
        }
    
        ...
    }

    Scroll down in the same file. (Skip this section if there's no allprojects scope in the file)

    allprojects {
        repositories {
            maven { url 'http://127.0.0.1/maven-repository/repository/' } // +
    
            google()
            mavenCentral()
        }
    }
  4. Open the gradle.properties file and add the following lines.

    ...
    
    systemProp.org.gradle.internal.http.connectionTimeout=500000
    systemProp.org.gradle.internal.http.socketTimeout=500000
  5. Turn on your VPN.
    Optional: Sanctioned Countries

  6. Visit http://127.0.0.1/maven-repository/repository/com/android/tools/build/gradle/4.0.1/gradle-4.0.1.pom, Done!

Add more servers

In the index.php file, you can add as many servers as you want.

$servers = [
    "https://repo1.maven.org/maven2/" => false,
    "https://dl.google.com/dl/android/maven2/" => true // if true, the file will be stored in the local repository
];

maven-repository-php's People

Contributors

hossein-zare avatar

Watchers

 avatar

Forkers

akbarazimifar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.