10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 8201528
27 * @summary The test will create JAR file(s) with the manifest file
28 * that customized package versioning information (different info for
29 * same package if multiple jars). Then verify package versioning info
30 * @library /lib/testlibrary
31 * @library /test/lib
32 * @modules jdk.compiler
33 * @run main PackageFromManifest setup test
34 * @run main PackageFromManifest runJar test1.jar
35 * @run main PackageFromManifest runJar test1.jar test2.jar foo.Foo1
36 * @run main PackageFromManifest runJar test1.jar test2.jar foo.Foo2
37 * @run main/othervm PackageFromManifest runUrlLoader test1.jar
38 * @run main/othervm PackageFromManifest runUrlLoader test1.jar test2.jar foo.Foo1
39 * @run main/othervm PackageFromManifest runUrlLoader test1.jar test2.jar foo.Foo2
40 */
41
42 import jdk.test.lib.compiler.CompilerUtils;
43 import jdk.test.lib.process.ProcessTools;
44 import jdk.test.lib.util.FileUtils;
45
46 import java.io.File;
47 import java.io.IOException;
48 import java.io.InputStream;
49 import java.net.MalformedURLException;
50 import java.net.URL;
51 import java.net.URLClassLoader;
52 import java.nio.file.Files;
53 import java.nio.file.Path;
54 import java.nio.file.Paths;
55 import java.util.ArrayList;
56 import java.util.Arrays;
57 import java.util.List;
58 import java.util.jar.Manifest;
59 import java.util.stream.Collectors;
60 import java.util.stream.Stream;
61
62 /**
63 * This test accept at least two input parameters, first one is run type like
64 * 'setup', 'runJar', 'runTest', 'runUrlLoader', the rest parameters are options
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 8201528
27 * @summary The test will create JAR file(s) with the manifest file
28 * that customized package versioning information (different info for
29 * same package if multiple jars). Then verify package versioning info
30 * @library /test/lib
31 * @modules jdk.compiler
32 * @run main PackageFromManifest setup test
33 * @run main PackageFromManifest runJar test1.jar
34 * @run main PackageFromManifest runJar test1.jar test2.jar foo.Foo1
35 * @run main PackageFromManifest runJar test1.jar test2.jar foo.Foo2
36 * @run main/othervm PackageFromManifest runUrlLoader test1.jar
37 * @run main/othervm PackageFromManifest runUrlLoader test1.jar test2.jar foo.Foo1
38 * @run main/othervm PackageFromManifest runUrlLoader test1.jar test2.jar foo.Foo2
39 */
40
41 import jdk.test.lib.compiler.CompilerUtils;
42 import jdk.test.lib.process.ProcessTools;
43 import jdk.test.lib.util.FileUtils;
44 import jdk.test.lib.util.JarUtils;
45
46 import java.io.File;
47 import java.io.IOException;
48 import java.io.InputStream;
49 import java.net.MalformedURLException;
50 import java.net.URL;
51 import java.net.URLClassLoader;
52 import java.nio.file.Files;
53 import java.nio.file.Path;
54 import java.nio.file.Paths;
55 import java.util.ArrayList;
56 import java.util.Arrays;
57 import java.util.List;
58 import java.util.jar.Manifest;
59 import java.util.stream.Collectors;
60 import java.util.stream.Stream;
61
62 /**
63 * This test accept at least two input parameters, first one is run type like
64 * 'setup', 'runJar', 'runTest', 'runUrlLoader', the rest parameters are options
|