Coder Social home page Coder Social logo

mvn-repos's Introduction

mvn-repos

使用方法

1 在pom.xml中添加repository

<repositories>
	<repository>
        <id>maven-repo-public-releases</id>
        <url>https://raw.github.com/sxyx2008/maven-repo/master/releases</url>
    </repository>
    <repository>
        <id>maven-repo-public-snapshots</id>
        <url>https://raw.github.com/sxyx2008/maven-repo/master/snapshots</url>
    </repository>
</repositories>

2 在pom.xml添加distributionManagement

<distributionManagement>
	<repository>
		<id>maven-repo-public-releases</id>
		<url>https://raw.github.com/sxyx2008/maven-repo/master/releases</url>
		</repository>
	<snapshotRepository>
		<id>maven-repo-public-snapshots</id>
		<url>https://raw.github.com/sxyx2008/maven-repo/master/snapshots</url>
	</snapshotRepository>
	<!-- 
	<repository>
		<id>nexus-releases</id>
		<url>http://localhost:8081/nexus/content/repositories/releases</url>
		<name>Nexus Releases Repository</name>
	</repository>
	<snapshotRepository>
		<id>nexus-snapshots</id>
		<url>http://localhost:8081/nexus/content/repositories/snapshots</url>
		<name>Nexus Snapshots Repository</name>
	</snapshotRepository>
	-->
</distributionManagement>

snapshots/pom-usage.jpg

3 将maven工程发布到maven-repo/releases/仓库目录下

  • 执行mvn-Dmaven.test.skip=true -DaltDeploymentRepository=maven-repo-public-releases::default::file:E:/developer/maven-repo/releases/ clean deploy

4 将maven工程发布到maven-repo/snapshots/仓库目录下

  • 执行mvn-Dmaven.test.skip=true -DaltDeploymentRepository=maven-repo-public-releases::default::file:E:/developer/maven-repo/snapshots/ clean deploy

snapshots/mvn-deploy.jpg

5 提交

$> git commit -m "MESSAGE"
$> git push origin master

注:

1 mvn-Dmaven.test.skip=true 为执行时跳过单元测试

2 -DaltDeploymentRepository=maven-repo-public-releases maven-repo-public-releases为pom中配置的repository的id

  • maven-repo-public-releases为github上maven-repo仓库releases目录的id

  • maven-repo-public-snapshots为github上maven-repo仓库snapshots目录的id

参考

Bitdeli Badge

mvn-repos's People

Contributors

einsteinstudio avatar

Watchers

James Cloos avatar

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.