Skip to content
Snippets Groups Projects
Commit 3d4a057d authored by Daniel Stonier's avatar Daniel Stonier
Browse files

use ROS_MAVEN_REPOSITORY

parent 45e39096
Branches
Tags
No related merge requests found
......@@ -8,3 +8,4 @@ SCRIPT=@(CMAKE_INSTALL_PREFIX)/share/rosjava_build_tools/generate_environment_va
export ROS_MAVEN_PATH=`python ${SCRIPT} --maven-path`
export ROS_MAVEN_DEPLOYMENT_REPOSITORY=`python ${SCRIPT} --maven-deployment-repository`
export ROS_MAVEN_REPOSITORY=`python ${SCRIPT} --maven-repository`
......@@ -8,3 +8,4 @@ SCRIPT=@(CMAKE_INSTALL_PREFIX)/share/rosjava_build_tools/generate_environment_va
export ROS_MAVEN_PATH=`python ${SCRIPT} --maven-path`
export ROS_MAVEN_DEPLOYMENT_REPOSITORY=`python ${SCRIPT} --maven-deployment-repository`
export ROS_MAVEN_REPOSITORY=`python ${SCRIPT} --maven-repository`
......@@ -9,6 +9,7 @@ def parse_arguments():
parser = argparse.ArgumentParser(description='Generate environment variables for the rosjava maven environment.')
cmd_group = parser.add_mutually_exclusive_group()
cmd_group.add_argument('-d', '--maven-deployment-repository', action='store_true', help='Return the current devel workspace maven directory.')
cmd_group.add_argument('-r', '--maven-repository', action='store_true', help='The url to the external ros maven repository.')
cmd_group.add_argument('-m', '--maven-path', action='store_true', help='Generate maven path across all chained workspcaes.')
cmd_group.add_argument('-g', '--gradle-user-home', action='store_true', help='Generate the local gradle user home in the current devel workspace (share/gradle).')
args = parser.parse_args()
......@@ -48,6 +49,11 @@ if __name__ == '__main__':
if repo in [os.path.join(w, 'share', 'maven') for w in workspaces]:
repo = os.path.join(workspaces[0], 'share', 'maven')
print repo
elif args.maven_repository:
repo = get_environment_variable(environment_variables, 'ROS_MAVEN_REPOSITORY')
if repo is None:
repo = 'https://github.com/rosjava/rosjava_mvn_repo/raw/master'
print repo
elif args.maven_path:
new_maven_paths = [os.path.join(path, 'share', 'maven') for path in workspaces]
maven_paths = get_environment_variable(environment_variables, 'ROS_MAVEN_PATH')
......
......@@ -20,6 +20,7 @@ task wrapper(type: Wrapper) {
buildscript {
def rosMavenPath = "$System.env.ROS_MAVEN_PATH".split(':').collect { 'file://' + it }
def rosMavenRepository = "$System.env.ROS_MAVEN_REPOSITORY"
repositories {
rosMavenPath.each { p ->
maven {
......@@ -28,11 +29,11 @@ buildscript {
}
mavenLocal()
maven {
url 'https://github.com/rosjava/rosjava_mvn_repo/raw/master'
url rosMavenRepository
}
}
dependencies {
classpath group: 'org.ros.rosjava_bootstrap', name: 'gradle_plugins', version: '[0.1,)'
classpath group: 'org.ros.rosjava_bootstrap', name: 'gradle_plugins', version: '[0.1,0.2)'
}
}
......
......@@ -17,17 +17,17 @@
/*
Examples of
1) dependencies from another project in this gradle stack.
2,3) dependency from a maven repository.
2,3) open ranged dependencies from a maven repository.
It's a good idea to use + on the patch version dependency to
save continually updating these references, but avoid applying
the same principle to api breaking minor changes in the version.
It's a good idea to restrict the open ranged dependency to
the patch version to avoid breakages due to api changes
which usually occur on minor and major version numbers.
*/
/*
dependencies {
compile project(':local_android_library_dependency')
compile 'org.ros.android_core:android_gingerbread_mr1:[0.1,)'
compile 'com.github.ros_java.android_extras:gingerbread:[0.1,)'
compile 'com.github.rosjava.android_extras:gingerbread:[0.1,0.2)'
}
*/
......
......@@ -20,6 +20,7 @@ task wrapper(type: Wrapper) {
buildscript {
def rosMavenPath = "$System.env.ROS_MAVEN_PATH".split(':').collect { 'file://' + it }
def rosMavenRepository = "$System.env.ROS_MAVEN_REPOSITORY"
repositories {
rosMavenPath.each { p ->
maven {
......@@ -28,11 +29,11 @@ buildscript {
}
mavenLocal()
maven {
url 'https://github.com/rosjava/rosjava_mvn_repo/raw/master'
url rosMavenRepository
}
}
dependencies {
classpath group: 'org.ros.rosjava_bootstrap', name: 'gradle_plugins', version: '[0.1,)'
classpath group: 'org.ros.rosjava_bootstrap', name: 'gradle_plugins', version: '[0.1,0.2)'
}
}
......
......@@ -17,17 +17,17 @@
/*
Examples of
1) dependencies from another project in this gradle stack.
2,3) dependency from a maven repository.
2,3) open ranged dependencies from a maven repository.
It's a good idea to use + on the patch version dependency to
save continually updating these references, but avoid applying
the same principle to api breaking minor changes in the version.
It's a good idea to restrict the open ranged dependency to
the patch version to avoid breakages due to api changes
which usually occur on minor and major version numbers.
*/
/*
dependencies {
compile project(':local_android_library_dependency')
compile 'org.ros.android_core:android_gingerbread_mr1:[0.1,)'
compile 'com.github.ros_java.android_extras:gingerbread:[0.1,)'
compile 'org.ros.rosjava_core:rosjava:[0.1,)'
compile 'com.github.rosjava.rosjava_extras:hokuyo:[0.1,0.2)'
}
*/
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment