如何从其GitHub仓库添加Java库(库使用Maven作为构建系统)作为我的Maven项目的依赖?如果不下载和编译库,我可以这样做吗?
我想将Travis CI用于我的开源项目.特拉维斯没有提供任何方式来发布制作的文物(但是,他们在未来的计划中有这个问题).
在某处发布/上传工件有哪些变通方法?我被允许在CI机器上执行任何脚本.
简单上传将起作用,但存在安全问题:任何人都可以以与所有来源公开相同的方式上传内容.
有没有免费的在线私人maven2或maven3存储库?这样团队就可以从各个区域访问存储库.
我正在尝试通过Robolectric进行仪器测试和单元测试来运行Espresso(使用Double Espresso).到目前为止我所拥有的主要是基于deckard-gradle的例子.
注意: Gradle 1.10
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.10.4'
classpath 'org.robolectric.gradle:gradle-android-test-plugin:0.10.0'
}
}
apply plugin: 'android'
apply plugin: 'android-test'
android {
compileSdkVersion 19
buildToolsVersion '19.0.3'
defaultConfig {
packageName = 'com.example.app'
minSdkVersion 9
targetSdkVersion 19
versionCode 1
versionName '1.0.0'
testInstrumentationRunner "com.google.android.apps.common.testing.testrunner.GoogleInstrumentationTestRunner"
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
buildTypes {
debug {
debuggable = true
runProguard = false
}
release {
debuggable = false
runProguard = true
}
}
sourceSets {
androidTest {
setRoot('src/test') …
Run Code Online (Sandbox Code Playgroud) 我正在与一些开发人员合作,我们想分享一些罐子,因为我们正在完成项目代码的早期迭代.我们只想弹出一个快速的私有maven存储库服务器来使用一小段时间.在ruby中,打字很简单:
gem server
Run Code Online (Sandbox Code Playgroud)
显然,没有?
mvn server
Run Code Online (Sandbox Code Playgroud)
即使是对github的简单maven依赖也是可行的.显然,没有主流可靠的maven插件吗?
gem 'nokogiri', :git => 'https://github.com/tenderlove/nokogiri.git', :branch => '1.4'
Run Code Online (Sandbox Code Playgroud)
我找到的最简单的答案是:在github上托管一个Maven存储库.
当然,上面的StackOverflow参考文献中的一个答案是" 哦,不要那样做!这非常糟糕! ".好吧没有!我的印象是,人们通常不想这样做,但对于最小的小解决方案,没有更快更简单的选择.
在那儿?
Michael Corleone:就在我以为自己出局的时候......他们又把我拉回来编写Java代码.
我尝试遵循:在 github 上托管 Maven 存储库
我的 POM.xml
<parent>
<artifactId>rf</artifactId>
<groupId>com.zlhades</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>rfcore</artifactId>
<properties>
<java-version>1.7</java-version>
<github.global.server>github</github.global.server>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>${java-version}</source>
<target>${java-version}</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>com.github.github</groupId>
<artifactId>site-maven-plugin</artifactId>
<version>0.12</version>
<configuration>
<message>Maven artifacts for ${project.version}</message> <!-- git commit message -->
<noJekyll>true</noJekyll> <!-- disable webpage processing -->
<outputDirectory>${project.build.directory}/mvn-repo</outputDirectory> <!-- matches distribution management repository url above -->
<branch>refs/heads/mvn-repo</branch> <!-- remote branch name -->
<includes><include>**/*</include></includes>
<repositoryName>RequestForward</repositoryName> <!-- github repo name -->
<repositoryOwner>zlhades</repositoryOwner> <!-- github username -->
</configuration>
<executions> …
Run Code Online (Sandbox Code Playgroud) 我打算在Git hub中托管我的一些API jar作为Maven Repository.
我的罐子里需要一些第三方依赖的罐子.
当用户喜欢拉我的API时,我喜欢第三方依赖的jar也下载到本地存储库.说第三方罐子是5,他们在不同的存储库.
当用户添加一个依赖项作为我的api与我的githum存储库时,url可以自动查找api依赖的jar并从不同的地方获取到本地存储库吗?
我怎样才能做到这一点 ?我们有什么办法吗?
maven ×5
github ×4
java ×4
repository ×3
git ×2
maven-2 ×2
maven-3 ×2
android ×1
artifacts ×1
dependencies ×1
robolectric ×1
server ×1
travis-ci ×1