changeset 9351:d51c071707da

6595663: Manifest on jars contain JavaBeans entries Reviewed-by: alanb, mchung
author ohair
date Fri, 22 Apr 2011 10:21:37 -0700
parents 799e0bb89242
children 0912f60e7694
files jdk/make/common/Demo.gmk jdk/make/common/Release-embedded.gmk jdk/make/common/Release.gmk jdk/make/javax/crypto/Defs-jce.gmk jdk/make/tools/manifest.mf
diffstat 5 files changed, 29 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/jdk/make/common/Demo.gmk	Thu Apr 21 18:26:04 2011 -0700
+++ b/jdk/make/common/Demo.gmk	Fri Apr 22 10:21:37 2011 -0700
@@ -211,9 +211,13 @@
 endif
 
 # Jar manifest file
-$(DEMO_MANIFEST): 
+MAINMANIFEST  = $(JDK_TOPDIR)/make/tools/manifest.mf
+$(DEMO_MANIFEST): $(MAINMANIFEST)
 	@$(prep-target)
-	$(ECHO) "Main-Class: $(DEMO_MAINCLASS)" > $@
+	$(SED) -e "s#@@RELEASE@@#$(RELEASE)#"           \
+               -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" \
+               $(MAINMANIFEST) >> $@
+	$(ECHO) "Main-Class: $(DEMO_MAINCLASS)" >> $@
 ifdef DEMO_MANIFEST_ATTR
 	$(ECHO) "$(DEMO_MANIFEST_ATTR)" >> $@
 endif
--- a/jdk/make/common/Release-embedded.gmk	Thu Apr 21 18:26:04 2011 -0700
+++ b/jdk/make/common/Release-embedded.gmk	Fri Apr 22 10:21:37 2011 -0700
@@ -84,10 +84,10 @@
 
 # Create headless rt.jar
 HL_RT_JAR=$(ABS_TEMPDIR)/rt-hl-orig.jar
-$(HL_RT_JAR): MakeHeadlessJarFileList $(JAR_MANIFEST_FILE)
+$(HL_RT_JAR): MakeHeadlessJarFileList $(RT_JAR_MANIFEST_FILE)
 	$(prep-target)
 	$(CD) $(CLASSBINDIR) ; \
-		$(BOOT_JAR_CMD) $(CREATE_JAR_OPTS) $(JAR_MANIFEST_FILE) $@ @$(HEADLESS_RT_JAR_FILELIST) \
+		$(BOOT_JAR_CMD) $(CREATE_JAR_OPTS) $(RT_JAR_MANIFEST_FILE) $@ @$(HEADLESS_RT_JAR_FILELIST) \
 		 $(JAR_JFLAGS)
 	@$(CD) $(CLASSBINDIR); $(java-vm-cleanup)
 
--- a/jdk/make/common/Release.gmk	Thu Apr 21 18:26:04 2011 -0700
+++ b/jdk/make/common/Release.gmk	Fri Apr 22 10:21:37 2011 -0700
@@ -609,8 +609,8 @@
 	@$(java-vm-cleanup)
 
 # Create the manifest file.
-JAR_MANIFEST_FILE=$(ABS_TEMPDIR)/manifest.tmp
-$(JAR_MANIFEST_FILE): $(MAINMANIFEST) $(BEANMANIFEST)
+RT_JAR_MANIFEST_FILE=$(ABS_TEMPDIR)/rt_manifest.tmp
+$(RT_JAR_MANIFEST_FILE): $(MAINMANIFEST) $(BEANMANIFEST)
 	$(prep-target)
 	$(SED) -e "s#@@RELEASE@@#$(RELEASE)#" 		\
 	       -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" \
@@ -618,21 +618,28 @@
 	$(ECHO) >> $@
 	$(CAT) $(BEANMANIFEST) >> $@
 
+OTHER_JAR_MANIFEST_FILE=$(ABS_TEMPDIR)/other_manifest.tmp
+$(OTHER_JAR_MANIFEST_FILE): $(MAINMANIFEST)
+	$(prep-target)
+	$(SED) -e "s#@@RELEASE@@#$(RELEASE)#" 		\
+	       -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" \
+	       $(MAINMANIFEST) >> $@
+
 # Create resources.jar containing non-class files
 RESOURCES_JAR=$(ABS_TEMPDIR)/resources-orig.jar
-$(RESOURCES_JAR): $(RES_JAR_FILELIST) $(JAR_MANIFEST_FILE)
+$(RESOURCES_JAR): $(RES_JAR_FILELIST) $(OTHER_JAR_MANIFEST_FILE)
 	$(prep-target)
 	$(CD) $(CLASSBINDIR) && \
-	    $(BOOT_JAR_CMD) $(CREATE_JAR_OPTS) $(JAR_MANIFEST_FILE) $@ \
+	    $(BOOT_JAR_CMD) $(CREATE_JAR_OPTS) $(OTHER_JAR_MANIFEST_FILE) $@ \
 	        @$(RES_JAR_FILELIST) $(BOOT_JAR_JFLAGS)
 	@$(CD) $(CLASSBINDIR) && $(java-vm-cleanup)
 
 # Create jsse.jar containing SunJSSE implementation classes
 JSSE_JAR=$(ABS_TEMPDIR)/jsse-orig.jar
-$(JSSE_JAR): $(JAR_MANIFEST_FILE)
+$(JSSE_JAR): $(OTHER_JAR_MANIFEST_FILE)
 	$(prep-target)
 	$(CD) $(CLASSBINDIR) && \
-	    $(BOOT_JAR_CMD) $(CREATE_JAR_OPTS) $(JAR_MANIFEST_FILE) $@ \
+	    $(BOOT_JAR_CMD) $(CREATE_JAR_OPTS) $(OTHER_JAR_MANIFEST_FILE) $@ \
 		$(JSSE_CLASSES_DIRS) $(BOOT_JAR_JFLAGS)
 	@$(CD) $(CLASSBINDIR) && $(java-vm-cleanup)
 
@@ -676,10 +683,10 @@
 
 # Create rt.jar
 RT_JAR=$(ABS_TEMPDIR)/rt-orig.jar
-$(RT_JAR): $(RT_JAR_FILELIST) $(JAR_MANIFEST_FILE)
+$(RT_JAR): $(RT_JAR_FILELIST) $(RT_JAR_MANIFEST_FILE)
 	$(prep-target)
 	$(CD) $(CLASSBINDIR) && \
-	    $(BOOT_JAR_CMD) $(CREATE_JAR_OPTS) $(JAR_MANIFEST_FILE) $@ \
+	    $(BOOT_JAR_CMD) $(CREATE_JAR_OPTS) $(RT_JAR_MANIFEST_FILE) $@ \
 	        @$(RT_JAR_FILELIST) $(BOOT_JAR_JFLAGS)
 	@$(CD) $(CLASSBINDIR) && $(java-vm-cleanup)
 
--- a/jdk/make/javax/crypto/Defs-jce.gmk	Thu Apr 21 18:26:04 2011 -0700
+++ b/jdk/make/javax/crypto/Defs-jce.gmk	Fri Apr 22 10:21:37 2011 -0700
@@ -31,9 +31,11 @@
 JCE_MANIFEST_FILE    = $(TEMPDIR)/manifest.mf
 $(JCE_MANIFEST_FILE): $(MAINMANIFEST)
 	$(prep-target)
-	( $(SED) "s/@@RELEASE@@/$(RELEASE)/" $<; \
-	    $(ECHO) "Extension-Name: javax.crypto"; \
-	    $(ECHO) "Implementation-Vendor-Id: com.sun"; ) > $@
+	$(SED) -e "s#@@RELEASE@@#$(RELEASE)#"           \
+               -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" \
+               $(MAINMANIFEST) >> $@
+	$(ECHO) "Extension-Name: javax.crypto" >> $@
+	$(ECHO) "Implementation-Vendor-Id: com.sun" >> $@
 
 README-MAKEFILE_WARNING = \
     "\nPlease read make/javax/crypto/Makefile for further build instructions."
--- a/jdk/make/tools/manifest.mf	Thu Apr 21 18:26:04 2011 -0700
+++ b/jdk/make/tools/manifest.mf	Fri Apr 22 10:21:37 2011 -0700
@@ -1,7 +1,7 @@
 Manifest-Version: 1.0
 Specification-Title: Java Platform API Specification
 Specification-Version: 1.7
-Specification-Vendor: Oracle
+Specification-Vendor: Oracle Corporation
 Implementation-Title: Java Runtime Environment
 Implementation-Version: @@RELEASE@@
 Implementation-Vendor: @@COMPANY_NAME@@