Time for action – serving an update site

Now that the update site has been developed, tested, and automatically built, the final stage is to upload the contents of the update site (under com.packtpub.e4.update/target/repository) and make it available on a website or ftp server so that others can install it. If Python 2.7 or higher is installed, run a simple web server as follows:

  1. Change to the directory com.packtpub.e4.update/target/repository.
  2. Run Python's SimpleHTTPServer:
    python -m SimpleHTTPServer 8080
    Serving HTTP on 0.0.0.0 port 8080 ...
  3. Verify the update site by adding http://localhost:8080/ as a remote update site in Eclipse.

If you don't have Python installed, then some operating systems have a means to serve web-based content already, or another web server can be used. OS X has Web Sharing where files in ~/Sites are served from; Linux systems typically have Apache configured to allow per-user web sharing in ~/public_html, and Microsoft Windows has IIS where the default location is c:intepubwwwroot. See the operating system's documentation for details.

What just happened?

An update site is simply an HTTP server that serves the contents of the content.jar and artifacts.jar files, along with their plugins and features directories.

If Python 2.7 is installed, a module called SimpleHTTPServer exists that can be run from the update/target/repository directory to allow the update site to be installed from http://localhost:8080/. Uploading the contents of the repository to a remote website is left as an exercise for the reader. For Python 3, the command is python3 -m http.server.

Finally, once published to a publicly visible website, it's possible to register the location of the update site at the Eclipse marketplace at http://marketplace.eclipse.org, so that other Eclipse users can find the update site from the Marketplace client.

Pop quiz – understanding automated builds and update sites

Q1. What is a GroupId, ArtifactId, and Version (GAV)?

Q2. What are the four types of packaging types needed to build plug-ins, features, products, and update sites?

Q3. How can the version numbers of plug-ins and features be updated in Maven?

Q4. Why and how are JAR files signed?

Q5. How can a simple HTTP server be run in Python?

Q6. Where are Eclipse features typically registered for others to find?

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset