Skip to content

Commit

Permalink
Changing the readme file
Browse files Browse the repository at this point in the history
  • Loading branch information
shaybagants committed Nov 4, 2015
1 parent b1775d4 commit 4c2f18d
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions build-info-java-example/README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
# build-info-java-example
This example project demonstrate the ability to create an Artifactory [build-info OSS project](https://github.com/JFrogDev/build-info)
, deploy it to Artifactory and deploy the build artifact from a filesystem directory to Artifactory by using the build-info OSS project, similarly to what the CI/build tools Artifactory plugins does.
This project is an example that demonstrates the ability to create an Artifactory build-info object, deploy it to Artifactory and deploy the build artifact from a filesystem directory to Artifactory by using the [build-info OSS project](https://github.com/JFrogDev/build-info), similar to what the CI/build tools Artifactory plugins do.


### Motivation
JFrog's Artifactory plugins (CI/build tools plugins) are very popular, and most of the people who are using Artifactory to host and manage their binaries with a common CI server/build tool that has a plugin for Artifactory are using it. Still, there are many users which are not using CI server, or using an internal CI server/build tool that has no Artifactory plugin for it which are interested having the build-info benefits and the ability to promote an entire build entity with a single command. These users can use our OSS build-info object to create and deploy their own build info, as we show in this project example
JFrog's Artifactory plugins for CI/build tools are very popular. Most users who host and manage their binaries in Artifactory together and use a common CI server or build tool that has a corresponding Artifactory plugin use them. Still, there are many users who don’t use a CI server, or use an internal CI server/build tool that does not have an Artifactory plugin. These users would still like to benefit from Artifactory’s comprehensive build-info and the ability to promote an entire build entity with a single command. These users can use our OSS build-info object to create and deploy their own build info, as we demonstrate in this project.

### Notes
This project includes one Java class: 'CreateAndDeploy.java' and uses one dependency: 'build-info-extractor'.
The 'CreateAndDeploy' main method builds an Artifactory build-info object and deploys it to Artifactory. Our example collects the build artifacts information (artifacts name, checksums) from a directory which should be passed to the main method 'String[] args' array. In our example, the build-info object includes one module (but can include more), and the module should have one or more artifacts. Once the information was collected, our script will deploy it to Artifactory (it can also deploy the actual artifact).

The project includes one Java class, ``CreateAndDeploy.java``, and uses one dependency: ``build-info-extractor``. The 'CreateAndDeploy' main method builds an Artifactory build-info object and deploys it to Artifactory. Our example collects information on the build artifacts (artifact names, checksums etc.) from a directory which should be passed to the main method’s 'String[] args' array. In our example, the build-info object includes one module (but can include more) which should have one or more artifacts. Once the information is collected, our script will deploy it to Artifactory (it can also deploy the actual artifact).

## Getting Started
You can either run this from your IDE, or by command line.
In order to run it from your IDE, just import the project, resolve the 'build-info-extractor' dependency with Maven, and run the main method.
Note, you should pass your build artifacts directory path as the first element of the main arguments array ('String[] args'). You will most likely be interested to change the 'buildName', 'buildNumner', 'targetRepository' and 'artifactoryURL' values.
You can either run this from your IDE, or on a command line. To run it from your IDE, just import the project, resolve the 'build-info-extractor' dependency with Maven, and run the main method. Note, you should pass your build artifacts directory path as the first element of the main arguments array ('String[] args'). You will most likely want to change the 'buildName', 'buildNumber', 'targetRepository' and 'artifactoryURL' values.

In order to run it from the command line, please follow the below instructions:
First, clone the code:
Expand All @@ -22,8 +18,10 @@ git clone [email protected]:JFrogDev/project-examples.git
```
Once you have the code on your machine, run:
```mvn install```
Maven will create an uber-jar named 'uber-buildCreatorExample-1.0-SNAPSHOT.jar' under the 'target' directory. Go to the 'target' and run:
```java -jar /path/to/buildArtifactsFolder/```
Maven will create an uber-jar named 'uber-buildCreatorExample-1.0-SNAPSHOT.jar' under the 'target' directory. Go to the 'target' directory and run:
```
java -jar /path/to/buildArtifactsFolder/
```



Expand Down

0 comments on commit 4c2f18d

Please sign in to comment.