Index: autoupdate/src/org/netbeans/modules/autoupdate/DummyModuleInfo.java =================================================================== RCS file: /cvs/autoupdate/src/org/netbeans/modules/autoupdate/DummyModuleInfo.java,v retrieving revision 1.5 diff -u -r1.5 DummyModuleInfo.java --- autoupdate/src/org/netbeans/modules/autoupdate/DummyModuleInfo.java 29 Jan 2002 14:38:13 -0000 1.5 +++ autoupdate/src/org/netbeans/modules/autoupdate/DummyModuleInfo.java 3 Jun 2002 22:32:05 -0000 @@ -13,8 +13,7 @@ package org.netbeans.modules.autoupdate; -import java.util.Set; -import java.util.HashSet; +import java.util.*; import java.util.StringTokenizer; import java.util.jar.Attributes; @@ -111,6 +110,47 @@ s.addAll(Dependency.create(Dependency.TYPE_IDE, attr.getValue("OpenIDE-Module-IDE-Dependencies"))); // NOI18N s.addAll(Dependency.create(Dependency.TYPE_JAVA, attr.getValue("OpenIDE-Module-Java-Dependencies"))); // NOI18N s.addAll(Dependency.create(Dependency.TYPE_REQUIRES, attr.getValue("OpenIDE-Module-Requires"))); // NOI18N + // #24143: treat API dependencies as dependencies on pseudomodule org.openide + Iterator it = s.iterator(); + SpecificationVersion api = null; + String impl = null; + String major = null; + while (it.hasNext()) { + Dependency dep = (Dependency)it.next(); + if (dep.getType() == Dependency.TYPE_IDE) { + if (dep.getComparison() == Dependency.COMPARE_SPEC) { + if (api != null) { + throw new IllegalArgumentException("Duplicate OpenIDE-Module-IDE-Dependencies found!"); // NOI18N + } + api = new SpecificationVersion(dep.getVersion()); + } else { + // Must be impl comparison. + if (impl != null) { + throw new IllegalArgumentException("Duplicate OpenIDE-Module-IDE-Dependencies found!"); // NOI18N + } + impl = dep.getVersion(); + } + String name = dep.getName(); + int index = name.lastIndexOf('/'); + String newmajor; + if (index == -1) { + newmajor = ""; // NOI18N + } else { + newmajor = name.substring(index); + } + if (major != null && !major.equals(newmajor)) { + throw new IllegalArgumentException("Clashing OpenIDE-Module-IDE-Dependencies found!"); // NOI18N + } + major = newmajor; + it.remove(); + } + } + if (api != null) { + s.addAll(Dependency.create(Dependency.TYPE_MODULE, "org.openide" + major + " > " + api)); // NOI18N + } + if (impl != null) { + s.addAll(Dependency.create(Dependency.TYPE_MODULE, "org.openide" + major + " = " + impl)); // NOI18N + } return s; } Index: core/.cvsignore =================================================================== RCS file: /cvs/core/.cvsignore,v retrieving revision 1.6 diff -u -r1.6 .cvsignore --- core/.cvsignore 25 Feb 2002 12:16:28 -0000 1.6 +++ core/.cvsignore 3 Jun 2002 22:32:05 -0000 @@ -1,3 +1,5 @@ netbeans modules-lib manifest-subst.mf +core.nbm +Info Index: core/apache-license.txt =================================================================== RCS file: core/apache-license.txt diff -N core/apache-license.txt --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ core/apache-license.txt 3 Jun 2002 22:32:05 -0000 @@ -0,0 +1,58 @@ +/* ==================================================================== + * The Apache Software License, Version 1.1 + * + * Copyright (c) 2000 The Apache Software Foundation. All rights + * reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by the + * Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowledgment may appear in the software itself, + * if and wherever such third-party acknowledgments normally appear. + * + * 4. The names "Apache" and "Apache Software Foundation" must + * not be used to endorse or promote products derived from this + * software without prior written permission. For written + * permission, please contact apache@apache.org. + * + * 5. Products derived from this software may not be called "Apache", + * nor may "Apache" appear in their name, without prior written + * permission of the Apache Software Foundation. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * . + * + * Portions of this software are based upon public domain software + * originally written at the National Center for Supercomputing Applications, + * University of Illinois, Urbana-Champaign. + */ + Index: core/build.xml =================================================================== RCS file: /cvs/core/build.xml,v retrieving revision 1.51 diff -u -r1.51 build.xml --- core/build.xml 13 May 2002 15:31:08 -0000 1.51 +++ core/build.xml 3 Jun 2002 22:32:05 -0000 @@ -1,4 +1,4 @@ - + + + - + + + + + + + + + + @@ -837,7 +853,8 @@ - + + @@ -895,67 +912,4 @@