Maven 3 support

Request new features and improvements you want to see in WebLaF.
I will answer any request so don't hesitate and post it!

Maven 3 support

Postby Ghyz » Mon Oct 07, 2013 9:34 pm

The new trend for big projects is to use Maven 3.

The way it works, we just add a tag in our project configuration file and it automatically download the dependencies from the maven repository.
For instance, if I want to use weblaf, I have to dowload the jar and then add it to our local repository. Then I can add it to a project using the following:
<dependency>
<groupId>com.weblookandfeel</groupId>
<artifactId>web-look-and-feel</artifactId>
<version>1.21</version>
</dependency>
Maven 3 is automatically managing transitive dependencies. Which means that if weblaf depends on other libraries, I would automatically download the other libraries.
Presently, I have to add the new jar myself to our local repository every time there is an update. Moreover, I'm downloading the jar that already contains the dependency, which is a sin on a Maven 3 point of view, but it saves me some time.

I'm not a Maven 3 expert (one of my teammate is usually doing all the Maven stuff), but what I think would be great is if weblaf would be hosted on a maven 3 repository so we could simply change the version number in our configuration file and it would automatically update the dependency without manually downloading anything.
Ghyz
 
Posts: 2
Joined: Wed Sep 25, 2013 7:08 pm

Re: Maven 3 support

Postby mgarin » Mon Oct 07, 2013 9:51 pm

I'am not an expert either, but i already had a few suggestions about Maven.

Though i don't want to change my project structure to Maven one because that will cause a lot of fuss and will waste a lot of precious development time. Also i don't really like Maven projects structure for a few reasons.

As i know there is an option to simply upload release artifacts into Maven storage so that anyone could use them by simply adding the dependency like in your example, though i was not able to find any complete description about how that could be done - only some separate notes and information. A few guides which i have tried didn't help as well, so i have delayed that task to avoid wasting even more time.

So i would really appreciate if anyone could point me to proper description of how that could be done. In that case i will be able to place artifacts into Maven pretty fast and keep them up-to-date as well.
User avatar
mgarin
Site Admin
 
Posts: 223
Joined: Mon Apr 16, 2012 1:01 pm
Location: Russia, Saint-Petersburg

Re: Maven 3 support

Postby Ghyz » Tue Oct 08, 2013 9:49 pm

If your project is open source and built with maven it can be published on Maven Central. But it seems to me that it will evolve a lot of work on your part. That would be the long term goal.

In the meantime we can do the following to make a great step forward:

1) Install Nexus on your web site. It is simply a WAR file. You can add it to Tomcat or it can run standalone also. The installation instructions are here: (Crazy URL)
https://support.sonatype.com/entries/20 ... k=41690657

2) When you make a release, you manually update the jar to your Nexus using the web page and you specify the right groupid (com.weblookandfeel), artifactid (web-look-and-feel) and the version of course (1.23).

So instead of downloading your jar and uploading it to my private nexus. I can just directly link to your nexus in my projects. We just need the URL of your nexus. When you make an update, I can simply change the version number in my dependencies and the jar will be downloaded automatically. (In fact, we would not link directly to your nexus in our projects, instead our nexus would point on yours so that even if Internet is down for some reason we can still build our projects using the cache of our nexus.)

Once you have your own nexus installed, we can provide you with more help for uploading the jar if you need.
Ghyz
 
Posts: 2
Joined: Wed Sep 25, 2013 7:08 pm

Re: Maven 3 support

Postby mgarin » Wed Oct 09, 2013 12:36 pm

Thanks for the tips, i will try to setup my own Nexus and will report if succeed.
Probably i will have some time to do this on the next week, so stay tuned :)
User avatar
mgarin
Site Admin
 
Posts: 223
Joined: Mon Apr 16, 2012 1:01 pm
Location: Russia, Saint-Petersburg


Return to Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest

cron