Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
ROS Java Build Tools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CeTI
ROS
ROS Java Packages
ROS Java Build Tools
Commits
cbd02f4b
Commit
cbd02f4b
authored
Sep 5, 2013
by
Daniel Stonier
Browse files
Options
Downloads
Patches
Plain Diff
enviroment hooks to generate a ros maven path.
parent
c831c466
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMakeLists.txt
+1
-0
1 addition, 0 deletions
CMakeLists.txt
env-hooks/15.rosjava.bash.em
+9
-0
9 additions, 0 deletions
env-hooks/15.rosjava.bash.em
generate_ros_maven_path.py
+22
-0
22 additions, 0 deletions
generate_ros_maven_path.py
with
32 additions
and
0 deletions
CMakeLists.txt
+
1
−
0
View file @
cbd02f4b
...
...
@@ -13,6 +13,7 @@ find_package(catkin REQUIRED)
catkin_package
(
CFG_EXTRAS rosjava.cmake
)
catkin_python_setup
()
catkin_add_env_hooks
(
15.rosjava SHELLS bash DIRECTORY
${
CMAKE_CURRENT_SOURCE_DIR
}
/env-hooks
)
##############################################################################
# Project Settings
...
...
This diff is collapsed.
Click to expand it.
env-hooks/15.rosjava.bash.em
0 → 100644
+
9
−
0
View file @
cbd02f4b
#!/bin/bash
@[if DEVELSPACE]@
export
ROS_MAVEN_PATH
=
`
python @
(
CMAKE_CURRENT_SOURCE_DIR
)
/generate_ros_maven_path.py
`
@[else]@
export
ROS_MAVEN_PATH
=
`
python @
(
CMAKE_INSTALL_PREFIX
)
/share/rosjava_tools/generate_ros_maven_path.py
`
@[end
if
]
@
This diff is collapsed.
Click to expand it.
generate_ros_maven_path.py
0 → 100755
+
22
−
0
View file @
cbd02f4b
#!/usr/bin/env python
import
os
CATKIN_MARKER_FILE
=
'
.catkin
'
def
get_workspaces
(
environ
):
'''
Based on CMAKE_PREFIX_PATH return all catkin workspaces.
'''
# get all cmake prefix paths
env_name
=
'
CMAKE_PREFIX_PATH
'
value
=
environ
[
env_name
]
if
env_name
in
environ
else
''
paths
=
[
path
for
path
in
value
.
split
(
os
.
pathsep
)
if
path
]
# remove non-workspace paths
workspaces
=
[
path
for
path
in
paths
if
os
.
path
.
isfile
(
os
.
path
.
join
(
path
,
CATKIN_MARKER_FILE
))
or
(
include_fuerte
and
path
.
startswith
(
'
/opt/ros/fuerte
'
))]
return
workspaces
if
__name__
==
'
__main__
'
:
workspaces
=
get_workspaces
(
dict
(
os
.
environ
))
maven_repository_paths
=
[
os
.
path
.
join
(
path
,
'
maven
'
)
for
path
in
workspaces
]
print
os
.
pathsep
.
join
(
maven_repository_paths
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment