Maven Project - github - maven-2

Is it possible to publish your site reports to github? For instance, I run Checkstyle, Findbugs, Cross Reference, and other plugins and would like to have that publicly available. Since my project is already there, I'd like to just keep it there.

With the state of the plugins that exist now, you'd have to do some shimming. The site command (per your comments: wanting to use mvn:site) has a mechanism (stage) for pushing the resulting site somewhere, but it's all mostly predicated on SCP'ing it around to some final destination. For github, I don't think there's any obvious place to land things like that.
The solution would be to write something that extended the site plugin to check in the results to Github using the github pages functionality. Details on the github pages bits are available at http://pages.github.com/. To get there, you'll be writing something that checks in your resulting site to a root branch "gh-pages" and going from there.

There are maven github plugins wich works fine for me.
feature:
deploy artifacts
download artifacts
deploy site to gh-pages
See: https://github.com/github/maven-plugins and fork the example project at https://github.com/kevinsawicki/github-maven-example to try out.

The Maven way to publish your reports would be to build the Maven site and to deploy it using FTP, SCP or DAV.
I don't know if GitHub provides hosting space and supports any of this protocol. If it does, then the following resources will help:
Deploying a Site in the site plugin Usage page
10.6. Deploying Your Project Website
Maven 2: Getting "mvn site:deploy" to work
Releasing Maven projects to Github
Site Distribution in the POM Reference
If it doesn't, better look for another place to host your site.

I'm using this plugin for that: http://synergian.github.com/wagon-git/

Related

How to ensure eclipse plugin has required bundles available?

I'm just starting to develop a new eclipse plugin where I want a web application server running in Eclipse. I found a nice blog, OSGi as a Web Application Server, that describes how to do this. The author suggests creating a target environment for my bundle requirements, and some of those bundles get pulled in from the Equinox Project SDK (now called Equinox Target Components in Juno). I notice that the tutorial project runs fine when my target platform is the platform I created in the tutorial, but fails to start when it is the default platform. So, now for my question...
If I need bundles that are not part of the default, how will my plugin project get access to those bundles? Will I need to deploy them along with my plugin? How would I know if the user's eclipse does or does not already have those required bundles?
You was not much clear about what kind of application you are developing. Running a web server in an Eclipse IDE as a plugin don't make any sense to me. This kind of server application is best just running on top of Equinox.
Anyway, the right path is to create a "Product Configuration" file and add categories that contains the needed bundles (go to File/Plug-in Development/Product Configuration).
With this file you can run an instance of the product (inside the IDE) and can export it (create a zip containing all needed bundles)
And if you want to able your user to install plugin inside his IDE you must create a P2 repository (using a Target Definition File) and expose the exported directory within a Http server. You could research about Tycho to build this kind of components in a maven style.
Well, I'm not sure if re-inventing the wheel again is really sufficient.
You might take a look at Pax-Web for inspiration on how to do it, or take a look Apache Karaf as a OSGi-Container (using Pax-Web). Or even better start contributing to one of the two :-)

Using Maven with JBoss soa platform

We have a jboss soa platform license and want to start using Maven for our projects and services. We started working on samples and were able to create simple multi module projects successfully. But I see that every time Maven connects to a central repo and my understanding from the docs is that the dependent jars are by default downloaded to the .m2/repository. But, the problem is we want our projects to use the jars that comes with our jboss soa platform. I see the Maven website page that shows how to add 3rd party jars, but adding all the jars that comes with a distribution would be time consuming and cumbersome.(especially finding the groupId and artifactIds for every single one of them) 1.) Is there an easy way to do this? 2.) I think we still have to go to the Maven central repo to get all other plugins(like maven-war-plugin, jar-plugin etc..), right?(because our JBoss platform doesn't come with those).
Appreciate the suggestions. It will help us greatly in starting off in the right direction.
I am no expert on Maven but this should be possible by using the scope and set it to provided.
See the Maven Doc on the scope for more info.
It is meant to indicate that the dependency is provided by a container.

How to write an IntelliJ IDEA Plugin?

IDEA has many plugins to use. I.e. IDEtalk is one of them which I use. How can I code a simple plugin that just connects to Internet and shows a web page? (no need for an address bar but it is not a problem to be). I want my plugin's shortcut's button locate at my IDE as like IDEtalk, Commander, Maven Projects etc.
Any ideas?
Check the documentation and the source code of the other plug-ins available in the public git repository of the Community Edition.
There is a Creating Your First Plugin guide on JetBrains web site. It covers all the needed steps from plugin creation to deployment to the plugin repository.
You might also want take a look in the source code of a simple plugin like Twitter Integration Plugin which I recently implemented. Or check a more complex one like this one.

Is there any free online maven repository?

Is there any free online private maven2 or maven3 repository? So that team can access the repository from various region.
If you use github, you could use a private github project as your maven repository. There are instruction on how to publish your maven artifacts to github here: https://stackoverflow.com/a/14013645/82156
we can use dropbox for online maven repository. But it is not completely private. you can use it if it gives you enough privacy.
This is the instruction to create free maven online maven repository on dropbox
Create an account on dropbox
Download and install dropbox client
After you install dropbox client, A folder called "Dropbox" will create in Users folder. There is a public folder in it. Create a sub folder in public folder and copy the url of that sub folder(ex: C:\Users\Lakshman\Dropbox\Public\repository)
Execute the following command to deploy the project artifacts to this path
mvn deploy -DskipTests=true -DaltDeploymentRepository=dropbox::default::file:///C:/Users/Lakshman/Dropbox/Public/repository
you can use this in your pom file to the above task
<distributionManagement>
<repository>
<id>dropbox.repo</id>
<url>file:///C:/Users/Lakshman/Dropbox/Public/repository</url>
</repository>
</distributionManagement>
if you have sync your local folder with dropbox it will automatically upload artifacts to online repository. you can get the link by login to Dropbox and go to public folder and click copy public link.
This solution got from here and referenced this also.
I just found a free repo for personal projects. Might not be suitable for team work and/or professional use though. Note that it seems to be from Russia. I am not connected in any kind to that project so I have no idea about the privacy of the data posted there. But it seems to work ok.
https://mymavenrepo.com
I have not tried but there is also
https://bintray.com/
This one might have a better reputation :)
We use https://repsy.io in one of our project. It's straight simple and convenient with 1GB free limit.
Update: GitHub launches the Package feature in Beta which supports the Maven: https://github.com/features/package-registry
Update: the Deveo has been acquired by Perforce, see this link
As of September 12, Deveo is now Helix TeamHub. The new name and branding represent our new, integrated solution from Deveo and Perforce.
Helix TeamHub can be hosted in our cloud or on your own servers with Helix TeamHub Enterprise, powered by Helix4Git.
Have you tried Deveo, I am using this cloud service and has 1G storage for free. You can deploy the Maven repository on it.
New features in Deveo 3.17
Pull requests between repositories
Maven and Ivy repositories
Deadlines for issues
Emojis
I recently wrote a lightweight Google App-Engine application to host my private repositories, backed by Google Cloud Storage (which is multi-regional per default):
https://github.com/renaudcerrato/appengine-maven-repository
Thanks to Google App-Engine free quotas, and depending on the scale needed, you won't have to pay anything.
For this purpose you could use a SVN repository. Some of them are available for private usage for free. Take a look on Maven: Commit single artifact to svn repository

Publish a library to maven repositories

I have a stable opensource library and was wondering how (and if) I can publish my lib to maven official repositories so people can include it in their pom.xml files and get the dependency downloaded automatically.
The process to get your library in the central repostiory is documented in the Guide to uploading artifacts to the Central Repository. In short, the new process is to get your project hosted by one of the approved Forges that will be synced with central, the Maven folks don't rsync personal repository anymore. In your case, your best bet would be to use the Sonatype Forge (open to any OSS Project). Check the given link (and also this document).
If you want reliable access for everyone out there, you need to stick with central. Due to the tendency of people at dev.java.net to break rules about the immutability of released artifacts, some people don't trust it. Further, it can be Very Slow.
To get your project into central, you need have your code in some public repo that they can sync from.
Central repository
A bit less bureaucratic dev.java.net Maven2 repository - allows completely automatic deployment.