Problem getting JavaDoc to resolve Java 6 - ant

I'm having problems getting Ant to relatively refer to Java 6 API in my javaDoc task. Instead of having, say "File", I am getitng the whole package reference first. It is very annoying!
Here is my code. Could anyone advise?
<javadoc sourcepath="${src.dir}"
destdir="${packaging.dir}/docs/javadoc"
packagenames="org.*"
link="http://download.oracle.com/javase/6/docs/api/"
doctitle="my API Documentation"
bottom="my API Documentation - Copyright 2010 to me. All Rights Reserved."
/>
I would also like to add link information for log4j and also hibernate. Is it a simple case of adding more link rows?
Thanks. Ben.

To process multiple external links, use nested link elements of the Ant javadoc task. Something like:
<javadoc sourcepath="${src.dir}"
destdir="${packaging.dir}/docs/javadoc"
packagenames="org.*"
doctitle="my API Docs"
bottom="my API Docs - Copyright 2010 to me. All Rights Reserved.">
<link href="http://download.oracle.com/javase/6/docs/api/" />
<link href="http://logging.apache.org/log4j/1.2/apidocs/" />
<link href="http://docs.jboss.org/hibernate/core/3.5/api/"/>
</javadoc>

Related

Adding configuration options to a basic JIRA gadget

This line in the Atlassian documentation leads me to believe that simply including a UserPref element should be sufficient to automatically generate the UI for updating the configuration of a gadget:
The container handles generation of the configuration UI, saves the settings and provides an API to access the settings in JavaScript.
But it doesn't seem to actually work when I create a test gadget with the following - I don't see any options when I click the "Edit" link on the gadget:
<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs
title="Test"
author="Test Test"
author_email="test#example.com"
directory_title="JIRA Tests"
>
<Require feature="setprefs" />
</ModulePrefs>
<UserPref name="show_summ" display_name="Show Summaries?" datatype="bool" default_value="true"/>
<Content type="html">
<![CDATA[
<div id="main">Test Stuff</div>
]]>
</Content>
</Module>
Is there more to do to make that happen? I've seen a few examples that hard-code configuration options, but the above documentation suggest that you don't have to.
Is that something that's only available if you're packaging it as a plugin, or if you include some other js resource? So far I've been doing a bare plugin so I don't have access to stuff like #requireResource, but I'm fine with hard-coding some script elements if that's what's necessary (for now).
Sincerely stumped.
Unfortunatly that neer worked for me eighter. I think it broke in JIRA 6..
Solution: take the javascript approach and you will be just fine. it is also way more powerful.
it works for me, just add this script
<![CDATA[
<script type="text/javascript">
window.onload = function(){
var edit = window.parent.document.getElementById(window.frameElement.id + '-edit');
edit.classList.remove('hidden');
edit.style.display = 'none';
}
</script>
]]>

How do I query (via url) the solr.admin.LukeRequestHandler to get collection index data

I want to use the luke handler as suggested in Solr schema, how to get dynamic fields in a collection, which is http://solr:8983/solr/admin/luke?numTerms=0
but the 4.10.3 solrconfig.xml has the following entry which indicates luke has been rolled into /admin/ and I should be able to use the http://localhost:8983/solr/admin path, which give me a 404 error.
<requestHandler name="/admin/"
class="solr.admin.AdminHandlers" />
<!-- This single handler is equivalent to the following... -->
<!--
<requestHandler name="/admin/luke" class="solr.admin.LukeRequestHandler" />
<requestHandler name="/admin/system" class="solr.admin.SystemInfoHandler" />
<requestHandler name="/admin/plugins" class="solr.admin.PluginInfoHandler" />
<requestHandler name="/admin/threads" class="solr.admin.ThreadDumpHandler" />
<requestHandler name="/admin/properties" class="solr.admin.PropertiesRequestHandler" />
<requestHandler name="/admin/file" class="solr.admin.ShowFileRequestHandler" >
-->
When I look for LukeRequestHandler documentation I find http://lucene.apache.org/solr/4_4_0/solr-core/org/apache/solr/handler/admin/LukeRequestHandler.html which expects I am building a java app, which I am not.
I attempt to use several methods found there in a url, all of which 404.
In addition to "how do I query the luke handler to get index data",
"is this the correct documentation for what I am trying to figure out?".
Any help in understanding how (these) java docs relate to me trying to understand how Solr works from url would be greatly appreciated.
I spent some days scratching my head with the same issue. Apparently, you need to include the name of your core into every request.
Testing with the "gettingstarted" core:
http://localhost:8983/solr/admin/luke/ gives 404.
http://localhost:8983/solr/gettingstarted/admin/luke/ gives an XML with the information of the index.
Check if this solves your problem.

Ant tasks don't run IN IzPack installer

.
Hello, everyone
I'm studying IzPack as a tool to be used in a future project and I'm really enjoying it. It's as flexible as I need and makes the process much more easy. I have even submmited a silly pull request at github with a modification I needed to my purposes. Who knows?
Although I don't find it particularly complicated, I've been stuck trying to use a resource for some days. I need that certain Ant Tasks to be executed in certain points of the installation process (right before everything is unpacked is the really one that matters) and that is not working, besides all the efford. :(
My current state, that seems right looking at examples, is the following:
[ My current use of this is based on an example I found here (the docs don't clear too much when It cames to these kind of Actions.]
In my definitions xml file, I included some things:
First, the AntActionsSpect.xml and the .jars, followed by the listeners:
<resources>
...
<res id="AntActionsSpec.xml" src="specs/AntActionsSpec.xml" />
...
</resources>
<jar src="libs/ant/ant.jar" stage="both" />
<jar src="libs/ant/ant-launcher.jar" stage="both" />
<listeners>
<listener classname="AntActionInstallerListener" stage="install" />
<listener classname="AntActionUninstallerListener" stage="uninstall" />
</listeners>
<pack name="test_app" required="yes" installGroups="Application Core">
...
In the specs/AntActionsSpec.xml file, I have the following:
<pack name="test_app">
<antcall order="beforepacks" quiet="no" verbose="yes" buildfile="$INSTALL_PATH/ant-tasks.xml">
<property name="INSTALL_PATH" value="$INSTALL_PATH" />
<target name="touch_beforepacks" />
</antcall>
</pack>
And the ant-tasks.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<project>
<target name="touch_beforepacks">
<touch file="$INSTALL_PATH/beforepacks.txt"/>
</target>
</project>
Nothing special here, just creating a dumb file.
The ant-tasks.xml is unpacked right before anyone else. Everything builds with no error, even if I create one "mistake" at AntActionsSpec or ant-tasks.xml, what suggests me that they aren't even been loaded, though if I mess with the path where the definitions file has them, the build will fail.
I would like some help addressing that. I'm probably making some stupid little error and just can't see it by myself. If any of you could provide an example of a running build, that would be sweet.
If I can give any more information, please, let me known so I can update the question.
Thank you very much.
Just found it using a forum on a Google Groups discussion: [izpack-user] Quick question on variable substitution.
Unfortunattly the I will conclude that the docs are misleading. The docs in
"AntActionInstallerListener and AntActionUninstallerListener" until this date are stating that I should use this listener configuration:
<listeners>
<listener classname="AntActionInstallerListener" stage="install" />
<listener classname="AntActionUninstallerListener" stage="uninstall" />
</listeners>
That is what is up there, in the question. Comparing my XML code with the one in the Google Groups discussion, I found a different use of it:
<listeners>
<listener installer="AntActionInstallerListener"
uninstaller="AntActionUninstallerListener" />
</listeners>
In fact, that is the instruction given in the other wiki: Ant Actions (InstallerListener and UninstallerListener), what points out that I something can be wrong under the hood, but that is a story to another episode.
That just works. The Ant tasks are executed properly. :)
I just could not find where freaking Codehaus will allow me to grab a login and edit the docs wiki. >:( . If someone could endorse-me with some testing and then adjust the wiki for future happiness or just give a link to this tired programmer, I'd be happy.

Facing issue while trying to Cache images js files using Combres Nuget Package

Below is my Fidler.
If you pay attention to the above screenshot, js and css files are being downloaded on every refresh. Why?
I have a query about the functionality of Combres. Url.Combress can cache the css files. right? In case you remove the css file from the physical location. I get 404 error? Why? Because this file is cached. So it should not be picked from it's physical location. Instead it should be picked from cache. Correct?
Explanation
I am using MVC3. I have installed Nuget Package combres in Package Manager Console
Install-Package combres.mvc
Below is the proof of my Route Table
I have below two files in my Layout.
<link href=""~/Content/Site.css" type="text/css" />
<script src="~/Scripts/jquery-1.7.1.min.js" type="text/javascript"></script>
Combress.xml setting
<combres xmlns='urn:combres'>
<filters>
<filter type="Combres.Filters.FixUrlsInCssFilter, Combres" />
</filters>
<resourceSets url="~/combres.axd"
defaultDuration="30"
defaultVersion="auto"
defaultDebugEnabled="auto"
defaultIgnorePipelineWhenDebug="true"
localChangeMonitorInterval="30"
remoteChangeMonitorInterval="60"
>
<resourceSet name="siteCss" type="css">
<resource path="~/content/Site.css" />
</resourceSet>
<resourceSet name="siteJs" type="js">
<resource path="~/scripts/jquery-1.7.1.min.js" />
</resourceSet>
</resourceSets>
</combres>
When i execute the below path
http://localhost:2474/Home/About
I think, it is downloading the above files every time. As per my understanding, combress should Cache the images/css/js file which ever files are mentioned in the combres.xml setting.
You need to reference the files differently. Since you are using asp.net-mvc I would recommend you also install this complementary nuget package
Install-Package combres.mvc
And then in your master page, or wherever you want your different resources
#Url.CombresLink("siteCss")
#Url.CombresLink("siteJs")
Note : Before adding the above code lines. Add #using Combres.Mvc; in your layout Page.
This is the standard recommendation as per the documentation.
Note that you probably want to have full source in debug mode and only combine in release mode, which is a setting on your resourceSet: defaultDebugEnabled="auto"
There are other considerations but that should be enough to get started.

How do I get javadoc to link to the Java API using an Ant task?

Right now my ant task looks like.
<javadoc sourcepath="${source}" destdir="${doc}">
<link href="http://java.sun.com/j2se/1.5.0/docs/api/" />
</javadoc>
And I'm getting this warning:
javadoc: warning - Error fetching URL: http://java.sun.com/j2se/1.5.0/docs/api/package-list
How do I get the javadoc to properly link to the API? I am behind a proxy.
You can also pass the arguments inside the ant task
<arg value="-J-Dhttp.proxyHost=your.proxy.here"/>
<arg value="-J-Dhttp.proxyPort=##"/>
If going the offline link route. Download the package list by going to the URL of the Java API (http://java.sun.com/j2se/1.5.0/docs/api/package-list) and saving it as a text file and then using this Ant task.
<javadoc sourcepath="${source}" destdir="${doc}">
<link offline="true" href="http://java.sun.com/j2se/1.5.0/docs/api/" packagelistloc="path-containing-package-list"/>
</javadoc>
You probably need the http.proxyHost and http.proxyPort system properties set. For example, ANT_OPTS="-Dhttp.proxyHost=proxy.y.com" ant doc
Alternatively, you could set the "offline" flag and provide a package list, but that could be a pain for the Java core.
You can also use the "offline" mode that allows you to build (faster!) without accessing the internet. Please see this answer: https://stackoverflow.com/a/24089805/366749

Resources