1. What Is This?
There could be features of WildFly, that may be useful for some people but they will never make it into the official distribution. It would be pity to discourage people implementing them though. That is why we created a special repository, that can host such extensions. You can find the repository here, but if you want to add a dependency on any WildFly Extras artifact in your project, it is better to use https://repository.jboss.org/nexus/content/groups/public/ instead. This repository group contains not just every WildFly Extras artifact, but also a zillion of other JBoss and other artifacts, that may be handy in your build.
If you are a person, that just needs to use the artifact, you can stop reading this article, however if you have something yours what you would like to share with others, please, go on reading.
2. Deploying Wildfly Extras Artifacts
2.1 Have Something of a Value
Create whatever functionality you want and if you think it may be useful for other people, contact ctomc in order to obtain a permission to deploy your artifact. You must have a valid jboss.org account and you need to tell him your user name. If you are not sure what it is, go to https://developer.jboss.org and try to log in. If you are successful, you have the right user credentials for the deployment.
Your artifact must have group id "org.wildfly.extras", a unique artifact ID and version number. You can only deploy "release" artifacts, so for example version 1.0-snapshot will not be accepted.
Also keep in mind, that it does not matter how good your code is if you do not describe somewhere what it does and how to use it. That is why do not forget to use Javadoc to document your classes and ideally create a web page, a thread in some forum or a blog with general guidelines. We do not require you to do it, but we check for the existence of javadoc in your project - read further to learn more.
2.2 Valid pom.xml
We validate your pom.xml to contain information about you (developer section), license and other things. To make it easy for you, I created a project in GitHub, that contains a pom.xml file, that has everything necessary to be deployed into Wildfly Extras repository. Feel free to use it to compare your pom.xml or use it as a template.
dhladky/wildflyextras · GitHub
2.3 Proper User Credentials in Maven
Here is a very nice article about encrypting your password in Maven.
Ideally use the same approach. Even if you feel safe in your computer a malicious program may try to steal your password and because Maven has a well defined placement of the user credentials finding unencrypted password is very easy to be stolen.
Please make sure you use proper repository ID (it must match the one in your pom.xml). And remember you must have the permission to publish your artifact (see above).
2.4 Use Maven to Deploy Your Artifact
If you properly set up your Maven user credentials and have a valid pom.xml (see 2.2 and 2.3), deployment is quite easy. Simply go to the directory with main pom.xml file and type
mvn clean deploy
If the build fails, but
mvn clean package
succeeds, you probably have wrong user credentials or you do not have permissions to deploy the artifact.
2.5 Nexus Staging Suite
Let us suppose everything was OK so far and Maven told you it successfully deployed your artifact into the server. You are not done yet. We use Sonatype Nexus Professional for handling the Maven repositories and we use its staging suite, because it allows us to do some quality checks of the deployed artifacts. Also some of the bigger community projects have quality assurance teams, that use the staging suite for testing.
You will most likely not have a team of testers, but the staging suite will do some automatic testing for you as well. If you are interested, here is a complete description of the staging suite feature:
OK, now back to your cause. You deployed your org.wildfly.extras artifact into Nexus staging suite and Nexus created a new staging repository. This repository can be found here https://repository.jboss.org/nexus/index.html#stagingRepositories
If you go to the page, you will see something like
If you click on your profile you will see details about it in the lower part of the screen. Make sure you check "Owner" field. It is possible there will be more people doing deployment and you do not want to release anyone else's bits.
First thing, what you must do is to close the repository (a button above the repository list) so no further changes can be made in it. Nexus validates your project. The repository must fulfill following:
- it must be unique in the system (you can not release already released artifact)
- it must contain source code
- it must contain Javadoc
- it must have valid pom.xml
- checksums must be OK
After closing process, refresh the list and you will see, if the repository was closed or not. Whatever happened can be found in Activity tab, where you can search for problems why your repository was not closed. Successfully closed repository looks like
Now you have the last chance to investigate the content of your repository and also now is the last chance when you can decide, whether you want to release your artifacts to the general public or drop the repository (buttons above the list).
If you click on "Release", your artifacts will be merged into Wildfly Extras repository and they will become available for everyone. Now the genie is out of the bottle and your artifacts can not be taken back. Let us hope you will now get a nice feedback from the community and lots of people will start using your code.