Maven artifacts for XML Graphics projects
Prerequesites
- Apache Account
- Maven 2 installed on a local machine (with method 2)
First action
Open the pom template xmlgraphics-commons-pom-template.pom in your editor, and check and correct the versions of the dependencies, and the dependencies themselves. The version of the release itself (
Method 1. Using ant and uploading the bundle
Note: This method is theoretical. It has yet not been tested by the author.
The xmlgraphics commons (XGC) build file contains a target 'maven-artifacts'. This target builds the four maven artifacts xmlgraphics-commons-version.jar, xmlgraphics-commons-versionsources.jar, xmlgraphics-commonsversionjavadoc.jar and pom.xml. It also builds the md5 and sha1 checksum files, and calls gpg to sign the artifacts. These artifacts and auxiliary files are bundled in the bundle file xmlgraphics-commonsversion-bundle.jar.
Log into the ASF maven repository at http://repository.apache.org/ with your ASF account, select 'Staging upload', and upload the bundle. See section 9.5 of the Nexus book, http://www.sonatype.com/books/nexus-book/reference/staging-sect-uploading-staged.html. Proceed as described in the section 'Closing the repository and promote' below.
Method 2. Uploading using maven
Generate the four maven artifacts xmlgraphics-commons-version.jar, xmlgraphics-commons-versionsources.jar, xmlgraphics-commonsversion-javadoc.jar and pom.xml in an empty working directory. The XGC build file does not contain a build target that does just this. You may build the target 'maven-artifacts' and extract the artifacts from the created bundle. If you do not use ant, copy the pom template xmlgraphics-commons-pom-template.pom to pom.xml in your working directory and insert the version of the release itself (
Settings
Edit your .m2/settings.xml to contain:
- <settings xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
- http://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers> - <server>
- <id>apache</id> <username>YOURUSERID</username> <privateKey>YOURLOCALHOMEDIR/.ssh/id_dsa</privateKey> <filePermissions>664</filePermissions> <directoryPermissions>775</directoryPermissions>
</server>
- <id>apache</id> <username>YOURUSERID</username> <privateKey>YOURLOCALHOMEDIR/.ssh/id_dsa</privateKey> <filePermissions>664</filePermissions> <directoryPermissions>775</directoryPermissions>
- </servers>
</settings>
.
- http://maven.apache.org/xsd/settings-1.0.0.xsd">
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
Note: It is not clear that the SSH method is still used for log in.
Copy the pom file sign-and-deploy.pom.xml to your working directory and use it as a template. The description section in the file gives an explanation.Then upload the artifacts:
- mvn f sign-and-deploy.pom.xml -Ppublish -Dfile=xmlgraphics-commonsversion. .
Then log into the ASF maven repository at http://repository.apache.org/, with your ASF account, select 'Repositories', select the repository called 'staging', and check the staging repository for the new version that was just created. Then proceed as described in the following section.
Close the staging repository and promote
Close the staging repository and check the messages. If you are satisfied, report the release on the dev mailing list and ask committers to check. If they are satisfied, the repository can be promoted. See section 9.7 of the Nexus book, http://www.sonatype.com/books/nexus-book/reference/staging-sect-managing-staging.html.
FOP
Same as XML Graphics Commons, except for the base name, which is fop-version. The target 'maven-artifacts' in the fop build file does not yet do checksum calculation and signing. This can be added once method 1 is confirmed as correct.
Snapshot releases
TBD
Further Information
Log into people.apache.org and check the www/people.apache.org/repo/m2-ibiblio-rsync-repository/org/apache/xmlgraphics/ directories for errors. Delete errors ASAP, as this directory is synced with the main repository!
see also: