Friday, August 31, 2007

Problem with maven-javadoc-plugin

I tried to run Maven 2.07 and maven-javadoc-plugin 2.3. Suddenly on "mvn site" I got the following error:


Failed to configure plugin parameters for: org.apache.maven.plugins:maven-javadoc-plugin:2.3

Not a number: ''


After analyzing parameters of this plugin I found only one parameter that is a number:


<parameter>
  <name>proxyPort</name>
  <type>int</type>
  ...
</parameter>


It seems that when you are not behind firewall (and, as result, have proxy port represented as empty string: ""), plugin has a bug.

Simple problem fix could be done in this way:


<reporting>
  <plugins>
    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-javadoc-plugin</artifactId>

      <configuration>
        <proxyPort>0</proxyPort>
      </configuration>
    </plugin>
  </plugins>
</reporting>

Wednesday, August 29, 2007

ANNOUNCEMENT: JLaunchPad - next generation of java launcher

I'm pleased to announce the release of new project: JLaunchPad, version 1.0.0.

This program (Java launcher) is the set of Java classes and shell scripts (Windows and Unix) for simplifying installation/launching of Java applications. Once the launcher is installed, it can be reused for starting different Java applications.

For your application you have to specify required dependencies on other Java libraries (in maven-like fashion). When application is getting executed first time, all dependencies will be downloaded and installed automatically into your local repository. For all consequent executions of the application download process is not required and the only one responsibility of the launcher is to build correct "classpath" and launch the application.

How it works? It could be explained in the following steps:

1. On the dedicated server we have Central Repository (sponsored, non-profit, for everybody in the community/ IT industry) of Java components represented in binary format. It could be a separate Java library, some convenient tool or even GUI program.

2. Each component is provided with the group name, artifact name and the version. Classifier also could be used for specifying Java version of the component (e.g. jdk15, jdk16 etc.).

3. Each component has binary artifact and could also contain (optional) sources, javadocs or other artifacts.

4. Each component describes dependencies to other components in the form of Dependencies File. As the result, we have Dependencies Tree (or Transitive Dependencies).

5. Launcher program connects to the remote Central Repositories and downloads required components to the client's computer. Then the launcher builds correct CLASSPATH and then starts up the programs.

6. All downloaded components are stored in the Local Repository - it is the mirror of
Central Repositories and it contains only required components with their dependencies.

7. If somebody wants to introduce new program, s(he) describes it in the form of dependencies,then s(he) writes the code. As the result, it is required to distribute new code only - all dependencies will be downloaded later and only "on-demand" - when it is really required.

8. "Smart" start-up program reads Dependencies File, installs all the required dependencies and then starts the original program.

This is real separation of new code from related dependencies. If your application
is, say, dependent on "jdom" library, your distribution does not have to include this file. Instead, you provide dependencies for the project and they will be downloaded automatically.

For the implementation the following projects were reused:

- classworlds project (http://dist.codehaus.org/classworlds)
- bootstrap-mini project (http://svn.apache.org/repos/asf/maven/components/tags/maven-2.0.7/bootstrap)
- Java App Launcher (https://java-app-launcher.dev.java.net)

The project has plenty of examples that explain how to use this launcher for existing applications. The benefit is that all application deliveries will be built by same
unified scenario and do not contain dependencies - they will be downloaded/reused automatically. Among examples you can see such programs as Ant, Maven 2, Tomcat, JRuby, Groovy, Intellij IDEA, Glean and some other.

Initially this idea was implemented in another project. During last few moths I was able to separate the code and represent it as standalone project.

Thursday, August 09, 2007

New version of google-translate plugin for Intellij IDEA

Update: it works now with the latest version of Intellij IDEA 7 (Selena; build 7118).

How to use it in side IDEA editor:

1. In editor select the part to be translated;
2. Select "Translate" item from the editor popup menu;
3. (hidden) "translate.google.com" web site (service) will perform actual translation;
4. Response from the service will be inserted in place of your selection.