Introduction ============ This is the sandbox project 'org.apache.ace.cli'. The idea is to create an easy way to work with external repositories, resources (in the ACE OBR) and artifacts (in the ACE Client Repository). The implementation is build around BND repositories and work with the ACE OBR REST enpoint as well as the ACE Client REST endpoint using Amdatu ACE Client. Example ============ Say you have a set of bundles with namespace 'my.project' on your build server and you want to deploy them to ACE by uploading them to the ACE OBR and creating artifacts for them.. * Turn the build bundles into a source repository (eg. using bindex) /path/to/build$ java -jar /path/to/org.osgi.impl.bundle.repoindex.cli.jar -n "Source Repository" *.jar * Configure the new source repository endpoint in 'repositories.properties' /path/to/cli$ vim repositories.properties source.class=aQute.bnd.deployer.repository.FixedIndexedRepo source.type=R5 source.locations=file:/path/to/build/index.xml.gz * Copy the source repository to the target ACE OBR /path/to/cli$ java -jar org.apache.ace.cli.jar -c repository.properties -f "(osgi.identity=my.project.*)" copy-resources * Create artifacts based on the uploaded artifacts. /path/to/cli$ java -jar org.apache.ace.cli.jar -c repository.properties -f "(osgi.identity=my.project.*)" create-artifacts * Check the ACE webui to confirm that the artiaacts are there. TODO/NOTES ============ * Support for defining features/distributions based on filter. * Support delete of feature/distribution. * The filter argument is very powerful, but may also be a little confusing as it has subtle differences in usage. For an OSGi Repository it is clear and specified by the spec, but for the artifacts, features and distributions it is determined by the actual/magical internal properties and tags Usage ============ usage: java -jar org.apache.ace.obr.client [options] --assign-attrs assign attributes <[,] --assign-name assign name to feature --assign-tags assign tags <[,] -c,--config repositories configuration file -f,--filter <[:]>, default namespace is osgi.identity -h,--help print this message -r,--repository , default is target -v,--verbose verbose logging commands: list-resources - list filtered resources from a repository delete-resources - delete filtered resources from the repository (ACE repository only) copy-resources - copy filtered resources from the source repository to the target repository list-artifacts - list filtered artifacts from the target repository (ACE repository only) create-artifacts - create artifacts in the target repository based on filtered resources (ACE repository only) delete-artifacts - delete artifacts from the target repository based on filter (ACE repository only) create-artifacts - create artifacts in the target repository based on filtered resources (ACE repository only) create-feature - create feature in the target repository based on filtered artifacts (ACE repository only) create-distribution - create distribution in the target repository create-target - create target in the target repository list-features - create feature in the target repository based on filtered artifacts (ACE repository only) list-distributions - list distibutions in the client repository list-targets - list targets in the client repository config: source.class=aQute.bnd.deployer.repository.FixedIndexedRepo source.type=R5 source.locations=http://repository.amdatu.org/release/index.xml target.class=org.apache.ace.obr.repository.AceObrRepository target.type=OBR target.locations=http://localhost:8080/obr/repository.xml examples: java -jar org.apache.ace.cli.jar -c repository.properties -f "(osgi.identity=org.apache.ace.*)" list-resources