Java Doc for SignJar.java in  » Build » ANT » org » apache » tools » ant » taskdefs » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Build » ANT » org.apache.tools.ant.taskdefs 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.tools.ant.taskdefs.AbstractJarSignerTask
   org.apache.tools.ant.taskdefs.SignJar

SignJar
public class SignJar extends AbstractJarSignerTask (Code)
Signs JAR or ZIP files with the javasign command line tool. The tool detailed dependency checking: files are only signed if they are not signed. The signjar attribute can point to the file to generate; if this file exists then its modification date is used as a cue as to whether to resign any JAR file. Timestamp driven signing is based on the unstable and inadequately documented information in the Java1.5 docs
See Also:    * beta documentation
since:
   Ant 1.1


Field Summary
final public static  StringERROR_BAD_MAP
    
final public static  StringERROR_MAPPER_WITHOUT_DEST
    
final public static  StringERROR_NO_ALIAS
    
final public static  StringERROR_NO_STOREPASS
    
final public static  StringERROR_SIGNEDJAR_AND_PATHS
    
final public static  StringERROR_TODIR_AND_SIGNEDJAR
    
final public static  StringERROR_TOO_MANY_MAPPERS
    
protected  FiledestDir
     the output directory when using paths.
protected  booleaninternalsf
    
protected  booleanlazy
     Whether to assume a jar which has an appropriate .SF file in is already signed.
protected  booleansectionsonly
    
protected  Stringsigfile
    
protected  Filesignedjar
    
protected  Stringtsacert
    
protected  Stringtsaurl
    


Method Summary
public  voidadd(FileNameMapper newMapper)
     add a mapper to determine file naming policy.
public  voidexecute()
    
public  FileNameMappergetMapper()
    
public  StringgetTsacert()
    
public  StringgetTsaurl()
    
protected  booleanisSigned(File file)
     test for a file being signed, by looking for a signature in the META-INF directory with our alias.
protected  booleanisUpToDate(File jarFile, File signedjarFile)
     Compare a jar file with its corresponding signed jar.
public  voidsetDestDir(File destDir)
     Optionally sets the output directory to be used.
public  voidsetInternalsf(boolean internalsf)
    
public  voidsetLazy(boolean lazy)
    
public  voidsetPreserveLastModified(boolean preserveLastModified)
     true to indicate that the signed jar modification date remains the same as the original.
public  voidsetSectionsonly(boolean sectionsonly)
    
public  voidsetSigfile(String sigfile)
    
public  voidsetSignedjar(File signedjar)
    
public  voidsetTsacert(String tsacert)
    
public  voidsetTsaurl(String tsaurl)
    

Field Detail
ERROR_BAD_MAP
final public static String ERROR_BAD_MAP(Code)
error string for unit test verification:



ERROR_MAPPER_WITHOUT_DEST
final public static String ERROR_MAPPER_WITHOUT_DEST(Code)
error string for unit test verification:



ERROR_NO_ALIAS
final public static String ERROR_NO_ALIAS(Code)
error string for unit test verification:



ERROR_NO_STOREPASS
final public static String ERROR_NO_STOREPASS(Code)
error string for unit test verification:



ERROR_SIGNEDJAR_AND_PATHS
final public static String ERROR_SIGNEDJAR_AND_PATHS(Code)
error string for unit test verification



ERROR_TODIR_AND_SIGNEDJAR
final public static String ERROR_TODIR_AND_SIGNEDJAR(Code)
error string for unit test verification:



ERROR_TOO_MANY_MAPPERS
final public static String ERROR_TOO_MANY_MAPPERS(Code)
error string for unit test verification:



destDir
protected File destDir(Code)
the output directory when using paths.



internalsf
protected boolean internalsf(Code)
flag for internal sf signing



lazy
protected boolean lazy(Code)
Whether to assume a jar which has an appropriate .SF file in is already signed.



sectionsonly
protected boolean sectionsonly(Code)
sign sections only?



sigfile
protected String sigfile(Code)
name to a signature file



signedjar
protected File signedjar(Code)
name of a single jar



tsacert
protected String tsacert(Code)
alias for the TSA in the keystore



tsaurl
protected String tsaurl(Code)
URL for a tsa; null implies no tsa support





Method Detail
add
public void add(FileNameMapper newMapper)(Code)
add a mapper to determine file naming policy. Only used with toDir processing.
Parameters:
  newMapper - the mapper to add.
since:
   Ant 1.7



execute
public void execute() throws BuildException(Code)
sign the jar(s)
throws:
  BuildException - on errors



getMapper
public FileNameMapper getMapper()(Code)
get the active mapper; may be null mapper or null
since:
   Ant 1.7



getTsacert
public String getTsacert()(Code)
get the -tsacert option
since:
   Ant 1.7 a certificate alias or null



getTsaurl
public String getTsaurl()(Code)
get the -tsaurl url url or null
since:
   Ant 1.7



isSigned
protected boolean isSigned(File file)(Code)
test for a file being signed, by looking for a signature in the META-INF directory with our alias.
Parameters:
  file - the file to be checked true if the file is signed
See Also:   IsSigned.isSigned(FileString)



isUpToDate
protected boolean isUpToDate(File jarFile, File signedjarFile)(Code)
Compare a jar file with its corresponding signed jar. The logic for this is complex, and best explained in the source itself. Essentially if either file doesnt exist, or the destfile has an out of date timestamp, then the return value is false.

If we are signing ourself, the check SignJar.isSigned(File) is used to trigger the process.
Parameters:
  jarFile - the unsigned jar file
Parameters:
  signedjarFile - the result signed jar file true if the signedjarFile is considered up to date




setDestDir
public void setDestDir(File destDir)(Code)
Optionally sets the output directory to be used.
Parameters:
  destDir - the directory in which to place signed jars
since:
   Ant 1.7



setInternalsf
public void setInternalsf(boolean internalsf)(Code)
Flag to include the .SF file inside the signature; optional; default false
Parameters:
  internalsf - if true include the .SF file inside the signature



setLazy
public void setLazy(boolean lazy)(Code)
flag to control whether the presence of a signature file means a JAR is signed; optional, default false
Parameters:
  lazy - flag to control whether the presence of a signature



setPreserveLastModified
public void setPreserveLastModified(boolean preserveLastModified)(Code)
true to indicate that the signed jar modification date remains the same as the original. Defaults to false
Parameters:
  preserveLastModified - if true preserve the last modified time



setSectionsonly
public void setSectionsonly(boolean sectionsonly)(Code)
flag to compute hash of entire manifest; optional, default false
Parameters:
  sectionsonly - flag to compute hash of entire manifest



setSigfile
public void setSigfile(String sigfile)(Code)
name of .SF/.DSA file; optional
Parameters:
  sigfile - the name of the .SF/.DSA file



setSignedjar
public void setSignedjar(File signedjar)(Code)
name of signed JAR file; optional
Parameters:
  signedjar - the name of the signed jar file



setTsacert
public void setTsacert(String tsacert)(Code)
set the alias in the keystore of the TSA to use;
Parameters:
  tsacert - the cert alias.



setTsaurl
public void setTsaurl(String tsaurl)(Code)

Parameters:
  tsaurl - the tsa url.
since:
   Ant 1.7



Fields inherited from org.apache.tools.ant.taskdefs.AbstractJarSignerTask
final public static String ERROR_NO_SOURCE(Code)(Java Doc)
final protected static String JARSIGNER_COMMAND(Code)(Java Doc)
protected String alias(Code)(Java Doc)
protected Vector filesets(Code)(Java Doc)
protected File jar(Code)(Java Doc)
protected String keypass(Code)(Java Doc)
protected String keystore(Code)(Java Doc)
protected String maxMemory(Code)(Java Doc)
protected String storepass(Code)(Java Doc)
protected String storetype(Code)(Java Doc)
protected boolean verbose(Code)(Java Doc)

Methods inherited from org.apache.tools.ant.taskdefs.AbstractJarSignerTask
public void addFileset(FileSet set)(Code)(Java Doc)
public void addSysproperty(Environment.Variable sysp)(Code)(Java Doc)
protected void addValue(ExecTask cmd, String value)(Code)(Java Doc)
protected void beginExecution()(Code)(Java Doc)
protected void bindToKeystore(ExecTask cmd)(Code)(Java Doc)
protected ExecTask createJarSigner()(Code)(Java Doc)
public Path createPath()(Code)(Java Doc)
protected Path createUnifiedSourcePath()(Code)(Java Doc)
protected Vector createUnifiedSources()(Code)(Java Doc)
protected void declareSysProperty(ExecTask cmd, Environment.Variable property) throws BuildException(Code)(Java Doc)
protected void endExecution()(Code)(Java Doc)
public RedirectorElement getRedirector()(Code)(Java Doc)
protected boolean hasResources()(Code)(Java Doc)
public void setAlias(String alias)(Code)(Java Doc)
protected void setCommonOptions(ExecTask cmd)(Code)(Java Doc)
public void setJar(File jar)(Code)(Java Doc)
public void setKeypass(String keypass)(Code)(Java Doc)
public void setKeystore(String keystore)(Code)(Java Doc)
public void setMaxmemory(String max)(Code)(Java Doc)
public void setStorepass(String storepass)(Code)(Java Doc)
public void setStoretype(String storetype)(Code)(Java Doc)
public void setVerbose(boolean verbose)(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.