Personal tools
     DOCUMENTATION

Conary:Java App Template

From rPath Wiki

Jump to: navigation, search
Conary --> Packaging --> Recipe --> Recipe Templates --> Java App Template

Conary packagers can write a package recipe that inherits from the JavaPackageRecipe class in Conary, designed to package a pre-compiled Java application.

Use the following template to start the recipe, and make the changes suggested:

loadSuperClass('javapackage=conary.rpath.com@rpl:1')
class ExampleApp(JavaPackageRecipe):
    name = 'myapp'
    version = '1.0'
 
    buildRequires = []
 
    def upstreamUnpack(r):
        r.addArchive('http://www.example.com/archive/')

Suggested changes:

  • Change the class name to a CamelCase representation of the application name
  • Change the value for name to the application name as packaged
  • Change the value for version to the application version
  • After cooking (with cvc) or building (with rMake), add items to the buildRequires section as instructed by the build messages (see Conary Recipe Structure for more information)
  • Change the URL to reflect the location of the application

The JavaPackageRecipe class from which this template inherits is defined in the javapackage package located in the Conary repository. To learn more about the class, check out the package in a Conary build environment and examine its recipe file:

$> cvc co javapackage=conary.rpath.com@rpl:devel



From here you may wish to:

Participate in the rPath Community | Contribute to rPath Wiki | Report an issue to rPath