Senhores,
conforme isso:
http://www.dpml.net/api/ant/1.6.5/org/apache/tools/ant/taskdefs/Manifest.Section.html
Colaborado com isso aqui:
http://java.sun.com/developer/Books/javaprogramming/JAR/basics/manifest.html#versioning
E o Netbeans está gerando isso aqui:
[quote]Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.0
Created-By: 1.6.0_02-b06 (Sun Microsystems Inc.)
Main-Class: br.ufpr.et.sibila.Server
Class-Path:
Name: br/ufpr/et/sibila/
Specification-Title: xxxxxx
Specification-Version: 0.1.73
Specification-Vendor: xx
Implementation-Title: br.ufpr.et.sibila
Implementation-Version: 0.1.73
Implementation-Vendor: xxxx[/quote]
Que também é apresentado no exemplo do ant em http://ant.apache.org/manual/index.html
E quando eu faço isso retorna null:
String implVersion = Server.class.getPackage().getImplementationVersion();
System.out.println( implVersion );
Quando eu altero o manifest (manualmente) e gero o novo jar, ele faz correto, ou seja:
[quote]Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.0
Created-By: 1.6.0_02-b06 (Sun Microsystems Inc.)
Main-Class: br.ufpr.et.sibila.Server
Class-Path:
Name: br/ufpr/et/sibila/
Specification-Title: xxxxxx
Specification-Version: 0.1.73
Specification-Vendor: xx
Implementation-Title: br.ufpr.et.sibila
Implementation-Version: 0.1.73
Implementation-Vendor: xxxx[/quote]
Sem o a linha em branco entre o Class-Path e o Name.
o resultado agora é:
0.1.73
Alguém já fez isso funcionar corretamente, conforme a especificação do ant, as sections devem ser separadas por espaço, mas ai p ClassLoad não está carrregando as informações corretamente. Será um bug da versão build 1.6.0_02-b06?
fw