Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "WTP/Releng/Tools/addRepoProperties"
(→Getting or installing) |
(→Installing from releng repo) |
||
Line 34: | Line 34: | ||
-installIUs \ | -installIUs \ | ||
org.eclipse.wtp.releng.tools.feature.feature.group | org.eclipse.wtp.releng.tools.feature.feature.group | ||
+ | </nowiki></pre> | ||
+ | |||
+ | ==General Usage and Examples== | ||
+ | |||
+ | In general, this tool operates directly on the artifacts repository, typically the "leaf" version (i.e. simple repository, not composite) where your "artifacts.jar" file is. You must have write access to that repository and use the absolute file path (i.e. not accessed over http or anything). | ||
+ | |||
+ | The repository location is the only parameter that required. For most of the rest, if not specified at all, then any existing values are not changed. If specified with an empty string, this is taken as an indication to remove the property (i.e. doesn't just change the value to an empty string). | ||
+ | |||
+ | ===General Setup=== | ||
+ | |||
+ | After actually installing the tools into Eclipse SDK, the tool is typically invoked with a script such as the following ... though you should be able to run it from your IDE for local testing. I give this example script here, just for illustration, then we'll focus on the properties and different examples. | ||
+ | |||
+ | <pre><nowiki> | ||
+ | #!/usr/bin/env bash | ||
+ | BUILD_HOME=${HOME}/testbuildhome | ||
+ | JAVA_6_HOME=${HOME}/jdks/ibm-java-x86_64-60 | ||
+ | APP_NAME=org.eclipse.wtp.releng.tools.addRepoProperties | ||
+ | devworkspace="${BUILD_HOME}"/addRepoPropertiesWorkspace | ||
+ | devJRE=${JAVA_6_HOME}/jre/bin/java | ||
+ | # remember, the '&' should NOT be unescaped here ... the p2 api (or underlying xml) will escape it. | ||
+ | devArgs=" -DartifactRepoDirectory=/tmp/testartifactrepo/ \ | ||
+ | -Dp2ArtifactRepositoryName=ServiceRelease2Artifacts \ | ||
+ | -Dp2MirrorsURL=http://www.eclipse.org/downloads/download.php?format=xml&file=/project/releases/repository/ \ | ||
+ | " | ||
+ | |||
+ | echo " cmd: " $0 | ||
+ | echo " APP_NAME: " $APP_NAME | ||
+ | echo " devworkspace: " $devworkspace | ||
+ | echo " devJRE: " $devJRE | ||
+ | echo " devArgs: " $devArgs | ||
+ | echo | ||
+ | $devJRE -version | ||
+ | echo | ||
+ | |||
+ | eclipse/eclipse -debug -nosplash -consolelog -console \ | ||
+ | -data $devworkspace --launcher.suppressErrors -application ${APP_NAME} \ | ||
+ | -vm $devJRE -vmargs $devArgs | ||
+ | |||
</nowiki></pre> | </nowiki></pre> |
Revision as of 20:57, 1 March 2012
Contents
addRepoProperties
Introduction and Overview
There is a tool in wtp releng that can modify p2 repository properties. This is especially useful for modifying these properties "after the fact", such as to give a final name to a repo, change or remove the p2.mirrorsURL value after a repository has been moved, etc.
While it is in the WTP code repository, it has been used for various things in Orbit and the yearly Simultaneous Release as well, so moderately reliable.
The tool can be used (or copied) by any project, but if you do, test well, on local test repos first, and early in dev cycle, and "use at your own risk" as it is not a fully supported API or tool with unit tests, etc. It uses only p2 APIs so should work with about any version of Eclipse SDK.
Getting or installing
Getting Source
The source code itself is in the cvs repository /cvsroot/webtools in a module under webtools.releng/plugins/, the module is named org.eclipse.wtp.releng.tools (that is, that's what you would check out as your Eclipse IDE project).
The feature used when building it is similar, but under webtools.releng/features/, and named org.eclipse.wtp.releng.tools.feature.
Installing from releng repo
To install an already built version into your IDE or SDK, you can use the repository at
http://download.eclipse.org/webtools/releng/repository/
And install the "Releng Tools Feature", its ID is org.eclipse.wtp.releng.tools.feature and at the time of this writing at the 1.2.0 level.
In install with p2 Director, you could use something similar to
eclipse/eclipse \ -application org.eclipse.equinox.p2.director \ -noSplash -consolelog -debug -console \ -repository \ http://download.eclipse.org/webtools/releng/repository/ \ -installIUs \ org.eclipse.wtp.releng.tools.feature.feature.group
General Usage and Examples
In general, this tool operates directly on the artifacts repository, typically the "leaf" version (i.e. simple repository, not composite) where your "artifacts.jar" file is. You must have write access to that repository and use the absolute file path (i.e. not accessed over http or anything).
The repository location is the only parameter that required. For most of the rest, if not specified at all, then any existing values are not changed. If specified with an empty string, this is taken as an indication to remove the property (i.e. doesn't just change the value to an empty string).
General Setup
After actually installing the tools into Eclipse SDK, the tool is typically invoked with a script such as the following ... though you should be able to run it from your IDE for local testing. I give this example script here, just for illustration, then we'll focus on the properties and different examples.
#!/usr/bin/env bash BUILD_HOME=${HOME}/testbuildhome JAVA_6_HOME=${HOME}/jdks/ibm-java-x86_64-60 APP_NAME=org.eclipse.wtp.releng.tools.addRepoProperties devworkspace="${BUILD_HOME}"/addRepoPropertiesWorkspace devJRE=${JAVA_6_HOME}/jre/bin/java # remember, the '&' should NOT be unescaped here ... the p2 api (or underlying xml) will escape it. devArgs=" -DartifactRepoDirectory=/tmp/testartifactrepo/ \ -Dp2ArtifactRepositoryName=ServiceRelease2Artifacts \ -Dp2MirrorsURL=http://www.eclipse.org/downloads/download.php?format=xml&file=/project/releases/repository/ \ " echo " cmd: " $0 echo " APP_NAME: " $APP_NAME echo " devworkspace: " $devworkspace echo " devJRE: " $devJRE echo " devArgs: " $devArgs echo $devJRE -version echo eclipse/eclipse -debug -nosplash -consolelog -console \ -data $devworkspace --launcher.suppressErrors -application ${APP_NAME} \ -vm $devJRE -vmargs $devArgs