Is there any plans to have JXLayer released to a maven repository? The reason I am asking is that everytime there is a new version of JXLayer I have to manually go install it to our internal repository.
I would be more than happy to help with this.
Here you are:
Sorry for delay
(the vacation wasn't that long :-))
Sorry to resurrect this elderly thread, but ... is the 3.0.4 release in the maven repos what's elsewhere referred to as "4.0"? I'm concerned that I'll be targeting an old API by sticking with 3.0.3, and 3.0.4 seems to be a completely compatible change (for my simple users) ... is it 4.0, or just a bugfix release of the 3.x line as the name would suggest?
Anyway, I'd like to take this chance to thank alexfromsun and everyone else involved in JXLayer (and the related LockableUI code from swingx) for such an incredibly handy too. Hopefully once the Oracle kerfuffle settles out it'll move toward mainline Java, as with the increasing use of "fancy" UIs (and the lack of any good built-in input blocker + feedback mechanism in Swing) it's getting really important.
BTW, http://download.java.net/maven/2/org/swinglabs/jxlayer/ doesn't contain the 3.0.4 or 4.0 release, only the 3.0.3 release. It seems like 3.0.4 only got pushed to master.
Message was edited by: ringerc
I agree, none of the latest versions have been pushed to the official maven repositories.
A bit sad, as making them readily available to the general public would increase the chance of new folks starting to use them.
Yes, you can manually download the jars, put them in your local repository, and hope you see new versions so you can down them too, and manually set up your POM files.
Or you can jump through hoops and add alternate custom repositories, making administration more complicated, and then depend on the (also out of date) sun repository.
Maybe one day...
I'm also interested by maven integration into JXLayer.
Please, note it's not a best practice to set the repository into the pom file.
It's better to set it into your settings.
Without widening me on the subject, know simply that it raises many problems when you are in an environment where you have no full access to the net (it is case in most of the big companies).
See upload rules on central repository (http://maven.apache.org/guides/mini/guide-central-repository-upload.html):
[i]FAQ and common mistakes
I have other repositories or pluginRepositories listed in my POM, is that a problem?
Yes, the central repository must be self contained, which means that all your dependencies must already be in the central repository. You need to remove the repositories and pluginRepositories entries and make sure your project still builds when your local repository cache is empty.[/i]
There is 2 solutions
1/ move repository section into your settigns
2/ move repository section into a profile section which is not enabled by default.
Java.net Repository for Maven
after you can deploy with this command:
[b]mvn -Dupload deploy[/b]
Message was edited by: ctof
Thanks for the information,
I'll let SwignLabs team know about that
Are there any plans to put version 4 into maven?
Until it gets released, I have had to change my pom and add a local system scope jar (which is less than ideal)
Good point, I'll take care of it
sorry to bug you but both:
are still out of date.
repo2.maven.org (which is what the vast majority of users will use as it is the default for Maven) shows:
Thanks for letting me know,
I'll ask to update it
With best regards
Well, I made a small mistake (wrong packaging). I fixed that and modified the dependencies (removed the dependency to swingx and the filter). Those dependencies are added within the test scope now.
I think it is possible to deploy a jar not build by maven. But I don't know how - never tried it. And I think it is the easiest way to just let maven create the jar and deploy it.
Just call "mvn deploy" from your ant script and everything should work as expected.
I do not suggest to upload the demo jar. Just offer them to download.
Here the modified pom:
Maven Central Repository
Java.net Repository for Maven
ok, I added this to my pom and got errors at first while trying the maven repository but then eventually resolved from the 2ndary repository. Not sure why my old version did not, something must be different that I didn't see. I thought the repositories should be the settings.xml but this seems to work for now
Maven Central Repository
Java.net Repository for Maven
I still would prefer using just the main repository eventually but at least my code compiles now :)
It is the better way to upload all artifacts to the central maven repository. I don't know why those java.net projects prefer their own repository.
But it is much better than nothing - so I accept it.
The failed downloads you have seen seem to be ok. Maven doesn't know in which repository the artifacts can be found. So it just tries all repositories...
> It is the better way to upload all artifacts to the
> central maven repository. I don't know why those
> java.net projects prefer their own repository.
> But it is much better than nothing - so I accept it.
I was about to respond to your problems, but I'm glad to see you guys made it work in between :)
To sync something with maven central repo in long term you need to provide rsync (or similar) access, there is no way for projects on java.net to do so (in difference to sf.net for example), unless project has its own server. So all of the projects are by default stuck to java.net repo. It should be pretty simple to sync whole java.net to central repo, but you would have to ask at maven2-repository.dev.java.net mailing list why it is not done. One possible reason is that central repo is much more strict in what goes there and who can upload the code.
Long term plan for swinglabs projects is to do both, keep uploading artifacts to java.net repo and setup auto upload via rsync to central repo as well, but we have to make some configuration changes first.
hope that answers your question.
Thanks for your comment.
I hope the situation will improve in the near future. I am sure it is a great benefit for every project to be in the central maven repository.
But adding one additional repository is ok for me. Just begging for more ;-).
> But adding one additional repository is ok for me. Just begging for more ;-).
for more ... repos or for more projects in it? It there is any swinglabs sub project that you would like to see in repo, just let me know.
I am very impressed with your detailed instruction,
"Maven Publisher" role is received and "pom.xml" is committed to the JXLayer root directory
Could you help me with a couple of questions?
I already use the ant script to compile and create JXLayer jar,
so I prefer just to deploy that jar to the Maven rep
I suspect that I don't need to do "mvn compile" etc... in this case
and just need to download the maven ant tasks and add a maven deploy task
to my build.xml, is that correct?
I also need to deploy two jars:
- jxlayer.jar (doesn't have any dependencies) and
- jxlayer-demo.jar (depends on swingx and filters)
any hints of how to do it are welcome
By the way, is it possible to ask Maven to download the latest swingx and filters jars?
Thank you very much!
jxlayer incl sources and javadoc is in the java net repo, see http://download.java.net/maven/2/org/swinglabs/jxlayer/3.0/
as for your question - I would not upload demos to the maven. It is used/meant for maintaining dependencies rather then general broadcasting tool for all the jars you produce.
BTW sorry it took so long, you need to keep nagging me more often. ;)
so, what do we need to put into our local POMs to be able to grab the latest jxlayer.jar?
the usual ... :)
and since java.net repo is not synced with central, you need to make sure you have it in the list of repositories in your configuration.
> the usual ... :)
> and since java.net repo is not synced with central,
> you need to make sure you have it in the list of
> repositories in your configuration.
That last part is what I was getting at...
Many folks who are new to Maven are used to adding a jar dependency to their POM but do not know much about configuring repositories.
I assume what you are asking for us to do is to add something like the following to our maven settings.xml configuration file
Java Net Releases
I did that and am getting errors downloading it. I suspect my repository is not configured properly in my settings file or something.
The bigger question is: (when) will you start syncing the jars with the main maven repository?
I understand that the you do not have to do that, and clearly the choice is yours.
Having said that, if you do keep the jars only in your own repository, the wider maven community will never know about them, as most maven users will not have your repository defined.
So if you want a wide user-base to start having access to your jars, the easiest way is to follow the normal maven guidelines and replicate the jars to their main repository. It would certainly make life easier for folks like me, as we would just have to add the pom dependency and bingo, everything would work.
This might also be helpful:
Thank you so much for this wonderful library.
Has there been any progress in putting JXLayer into a Maven repository?
Unfortunately I didn't have time to study Maven and set it up
I really love maven. This is so usefull when trying out new libs. Adding a dependency is just a matter of seconds instead of spending several minutes until all dependencies are downloaded and configured successfully (think of all those questions regarding filters.jar).
Upgrading to a new version is also very easy.
So I have created a pom.xml that can be used without touching anything else. I also added all necessary things into the pom so that you should be able to upload the artifacts to the java.net maven repository.
Just copy the attached content to a file named "pom.xml" within the root directory of the jxlayer project and call
"mvn compile" to compile the sources.
"mvn install" will create a jar and install it into your local maven repository.
"mvn deploy" will upload the created jar to the java.net maven repository (see below).
There are a few steps left (can't do that since I don't have the necessary project permissions). But I added links to the
relevant URLs - just follow the instructions there.
Instructions are from https://maven2-repository.dev.java.net/
I have prepared anything, so you just have to do those two steps:
- (Request a "Maven Publisher" role so that you can get the write access to the repository) at https://maven2-repository.dev.java.net/servlets/ProjectMembershipRequest.
- Follow this (https://javanettasks.dev.java.net/nonav/maven/config.html) instruction and create your ~/.java.net file. This is used to authenticate yourself during the deployment.
I declared two dependencies: One to swingx - I chose version 0.93 since this is the latest version within the repository.
The other one is the dependency to "com.jhlabs:filters:2.0.235". This dependency is located in the central maven repository. So there are no addition steps needed.
I hope this gives you the help you need to be able to deploy your great lib to the maven repository.
Here comes the pom.xml:
Great work cedarsoft! :)
From my netbeans / maven machinery, I can't see JXLayer 4. I see JXLayer 3.
My maven repos are :
Maven Central Repository
Java.net Repository for Maven
In what repo is JXLayer 4 ?
Sorry for delay, the guy who supports SwingLabs Maven repo is on vacation now,
so it will take some time to update the repo
You can always find the latest bits of jxlayer on jxlayer.dev.java.net
How long are the vacation in the Sun Company ?
Most Americans get 2-3 weeks.
I think if we are patient we will get it soon :-)
If you need to, you can download it and add it as a local jar
Message was edited by: dingfelder
SwingX library is already in teh java.net repository :
SwingX 0.9.3 does not include JXlayer.
There is still no answer from the SwingX team (vacation time?)
So if I would be glad if you consult me with Maven.
What should I do to set it up on the jxlayer project site?
You can find a small example on: http://www.tyken.net/jxlayer-src.zip
Im guessing you have ant scripts which already creates all the appropriate zip (src, doc, all ++) so doing a total port to maven is not recommended.
What I suggest is that you just add a pom.xml to the source repository and move the source packages to src/main/java (maven requires this). The pom.xml needs to include a reference to a maven repository where all releases will be published. After this is setup properly doing a new release should be as simple as doing these two commands:
1. mvn release:prepare
2. mvn release:perform
This will tag the release in subversion and upload the released files to the maven repository.
I'll check out the whole source three for JXLayer and port it to maven later this week. I'll create a zip for you as I did above with the whole port. Sounds ok?
Maven has reporting plugins which will run e.g. checkstyle, findbugs, pmd, jdepend and so on. Any interest in having these reports?
> and move the source packages to src/main/java (maven requires this)
Unfortunately, it is not so easy, the SwingLabs scripts rely on the current directory structure.
I wonder, is it possible to maven it without touching the sources?
After reading some maven docs it seems that it is possible to override the default directory structure.
If you tell me how to quickly install Maven
and make it work with existing file structure
I'll do it much faster
To override the position of the source folder you have to put the following inside the pom.xml:
The maven repository that you will be using also needs to be setup in pom.xml.
As far as I can see the demo klasses requires som libraries. These has to be added as maven dependencies or simply filtered out when building with maven.
After all of the above is done, scm is added to the pom.xml and the maven-release-plugin is configured doing a release should be just the matter of typing:
Maven is hard to get if you never have used it before. Let me know if there is anything I can help you with.
Since JXLayer is a part of SwingLabs project, I asked SwingLabs guys to set up the repository on swinglabs.org
just like they have it for swingx, timing framework etc...
I'll ask them if they have a special maven repository and let you know
I too would love to have it available via maven.
I currently have to get lucky and discover that there is a new release, and then go find it, download it manually, and add it to my local repository. If it were in the maven central repository, all I would have to do is change my version number and push the build button.
The suggested (maven) way to make your jar available is to add it to the central apache maven repository. This process is described fully at:
Note: you can also sync your own repository to the central repository automatically.
Hope this helps.
also... is there a mailing list where we can get notified of updates?
I want to be consistent with other projects so
I am still waiting an answer from SwingLabs team about Maven
The mailing lists are described here:
the firstname.lastname@example.org is what you are looking for,
I think it is the only useful list because all other issues I prefer to discuss in this forum
Your use of this web site or any of its content or software indicates your agreement to be bound by these Terms of Participation.
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.