As not all our development machines have internet access, we want to cache the API docs of various libraries in our local network. I was thinking of a webapp that handles caching and listing the available Javadocs after someone uploads them (in jar format). Ideally, the source jars would be automatically pulled from our maven repository (artifactory).
I have not been successful in finding anything like this on google, so I'm trying my luck here.
EDIT
I have found a site that does exactly what I am looking for: http://www.jarvana.com The problem is that this site does not fulfill my #1 requirement - offline availability. So I rephrase my question to: Is there a webapp that works like jarvana but that can be deployed to a local server?
It seems like what I'm looking for really doesn't exist, so I've rolled my own really simple webapp that serves JavaDocs from a local maven repository (transparently extracting jar files). It's far from perfect, but it works for my requirements. If anyone is interested, I shared it on github:
https://github.com/planbnet/JavaDoc-Browser
Why not just use mvn site?
Hm, I'd better add something more useful than that :-)
mvn site will build and deploy a bunch of site reports including the javadoc (assuming you configure that plugin). Everytime your CI server builds the code from trunk/branch/tag/whereever, the latest Javadocs will be generated and stored on the file system (accessible via HTTP)!
There's even a cool report that ties the javadoc into the source code.
You can give wwwoffle a try. A caching proxy which enables to access sites while you're offline.
I wrote a python script some time ago to serve the javadoc from my local maven repo:
http://blog.robotninjas.org/2013/04/17/accessing-your-cached-javadoc-offline/
python javadoc.py
It's crude, but hitting http://localhost:8080/m2 will list all of the projects in your local maven repository with downloaded docs.
You can download all the javadoc jars for a maven project with:
mvn dependency:resolve -Dclassifier=javadoc
Related
I am an enthusiast attempting to play around and add things to an app that I have been using for the past year which the source codes are available in GitHub. Problem is when I clone or download the repository and open it in Eclipse, I get a ton of error codes whenever I try to 'run as' Java app (in particular I am unable to find the 'main class/starting point' there's way too many files to chose from to find it and most don't work) and when I try to extract the files to an executable jar it gives me a JAR exe that is unusable :-(. I know that the files are workable since I do use the executable jar that is available from the developer and others have also toyed around with the source codes.
Can anyone assist me with this? Maybe I am using the wrong Java manipulator/application. The program I am using for opening these files is Eclipse IDE for Java Developers and my operating system is 64bit Windows 10.
Also, here is the GitHub URL for the repository, in case anyone asks: https://github.com/DraqueT/PolyGlot.
I thank anyone who can be of some assistance as I have been working on this forever and can't seem to find a solution.
The github project looks a lot like a utility library than a full application. But the following could help:
Try to study the README file attached to the github project. (There is one in the source code according to the author). This would help you to setup the project.
Make sure to download all the dependencies for that project. Again, the author has provided some of them in the github project (I could see some Apache POI libraries in there somewhere), but getting the required jars on the maven repository isn't that difficult.
It would also help to know what type of project it is. For example, having a main method in a web application doesn't do much for you, but a Java SE project would need a main method to run. So try to find out what kind of project it is.
If all else fails, you could try to contact the owner of the repository or one of its contributors to assist you.
Cheers!
I am at my wit's end and this should not be so difficult. Youtube v2 APIs are deprecated rendering my application useless. So, based on this website (https://developers.google.com/youtube/v3/code_samples/java#search_by_keyword), I am trying to run the sample. I downloaded google v3 client libraries from this location (https://code.google.com/p/google-api-java-client/). Now in the code sample there are multiple imports for com.google.api.services.*. But this jar is not included in the client libraries and I have spent more than 2 hours to figure out where to get this jar. I am going around circular references not finding anything. Is there some obvious stuff that I am missing. I am not familiar with maven, so if it is straightforward maven stuff, please just point me to the google site where I can download latest jar.
Thanks in advance.
I found it at http://mirrors.ibiblio.org/maven2/com/google/apis/google-api-services-youtube/v3-rev136-1.20.0/.
Though it solved my problem for now, can someone explain me the rationale behind having jars in such hidden locations. I am not full time into jave for the past few years, so I am not sure if I missed anything.
Go to this maven central repository link.
You can either download the jar directly or get maven/gradle dependency.
You can get all the google libraries in the maven central repository's google group
Note: Always use a build system, it will make your job easy. You don't need to manually download the file, extract to the right folder blah,blah,blah... Just include the dependency in the maven/gradle file and it will take care of the rest
I am trying to set up a Jenkins Server to build my IntelliJ-project (using BitBucketfor VCS (git)).
I have been able to set up IntelliJ to build correctly locally, and I am pushing it to bitbucket. I have also managed to set up Jenkins to get the code from BitBucket.
The problems to actually doing the build process itself, my problem being that I can't seem to figure out how to set it up with Ant / Maven, which I have never used before.
Any good suggestions?
PS: I am still searching for tutorials or anything that gives some help towards achieving this, and will be updating if I find something that helps.
Jenkins can fetch the code from the repository to its workspace, but it cannot build it for you. You need to give him the tool to do that. Popular choices are Maven/Ant/Gradle to handle project building for you.
You need to refer to the proper documentation for either Maven or Ant. The process is too broad and project-specific for me to go into details here, but Jenkins provides nice integration for both. If you know neither of them, I think I'd suggest Maven, but it's up to personal preferences and project needs.
You should first try to build project locally. Once you acomplish that, doing that with Jenkins shouldn't be a problem.
I'm currently doing a plugin for TeamCity 8.1.4 to support our tool. The latter generates some JSON and HTML/CSS/JS files I would like to include in TeamCity UI through respectively a graph and some kind of frame I guess.
Our tool is supposed to generate these files in the directory of the project after each build is finished. I read in the docs that I could create "build artifacts", which are basically files kept on the server side. I figured I could then access them with getArtifactsDirectory() method from SBuild interface. The thing is, I have no idea how to instruct TeamCity to create a build artifact programmatically. Or maybe I'm thinking this backwards and there's another way to do this... I'd appreciate some pointers since the Plugin community forum looks dead.
If you are looking to adding an HTML content to build results or projects, please check out this documentation page: 'Including third-party reports in build results'
Configuratoin described in this doc can be done using Java API:
see jetbrains.buildServer.web.reportTabs.ReportTabManager docs to configure tab settings on server side.
see jetbrains.buildServer.agent.artifacts.ArtifactsWatcher to publish files from build agent. This one is used to publish files as build artifacts.
UPD The abovementioned components can be used by plugin to configure 'third party report tab' (without any manual configuration). This way, plugin can provide html report from build without need to access uploaded artifacts.
In my current project we use Java and Coq. We have a continuous integration set up, using maven. We want to check coq files as part of it. I.e. we need:
Download and install coq locally if it isn't installed (like maven does with frameworks like gwt, etc)
Check that coq files are correct
Did anybody try setting up this? How can this be done?
I don't recommend automate that from your CI Build. Instead, it looks more like a Machine Configuration Dependency.
In cases like this, it is worth it to rely in tools like Puppet and Vagrant in order to ensure your Development Environment conforms to a given context, so your code needs to deal with this as either a premise or - better yet - ensure it is available in your PATH.
I know this is a really old question, but I have a different answer.
I have a similar CI setup that needs to install build tools. In some cases, such as on bitbucket, I pre-build a docker image containing the tools and update the build configuration each time I update the tools. In bitbucket, this works well because the source code of the package being built points to the particular docker image version to use to build it, which ensures that older builds can still be built, assuming the older docker images are retained.
Otherwise, I just script the installation of the tools using wget or curl to download as necessary.