Author: ptahchiev Date: Tue Feb 12 14:58:37 2008 New Revision: 627168 URL: http://svn.apache.org/viewvc?rev=627168&view=rev Log: changes on the jetty integration
Modified: jakarta/cactus/branches/CACTUS_TRUNK_MAMOUTH/integration/eclipse/org.apache.cactus.eclipse.runner/src/main/java/org/apache/cactus/eclipse/runner/common/LibraryHelper.java jakarta/cactus/branches/CACTUS_TRUNK_MAMOUTH/integration/eclipse/org.apache.cactus.eclipse.runner/src/main/java/org/apache/cactus/eclipse/runner/launcher/JettyCactusLaunchConfiguration.java Modified: jakarta/cactus/branches/CACTUS_TRUNK_MAMOUTH/integration/eclipse/org.apache.cactus.eclipse.runner/src/main/java/org/apache/cactus/eclipse/runner/common/LibraryHelper.java URL: http://svn.apache.org/viewvc/jakarta/cactus/branches/CACTUS_TRUNK_MAMOUTH/integration/eclipse/org.apache.cactus.eclipse.runner/src/main/java/org/apache/cactus/eclipse/runner/common/LibraryHelper.java?rev=627168&r1=627167&r2=627168&view=diff ============================================================================== --- jakarta/cactus/branches/CACTUS_TRUNK_MAMOUTH/integration/eclipse/org.apache.cactus.eclipse.runner/src/main/java/org/apache/cactus/eclipse/runner/common/LibraryHelper.java (original) +++ jakarta/cactus/branches/CACTUS_TRUNK_MAMOUTH/integration/eclipse/org.apache.cactus.eclipse.runner/src/main/java/org/apache/cactus/eclipse/runner/common/LibraryHelper.java Tue Feb 12 14:58:37 2008 @@ -133,7 +133,7 @@ /** * @return the path to the library directory */ - private static IPath getLibPath() + public static IPath getLibPath() { CactusPlugin thePlugin = CactusPlugin.getDefault(); String plPath = ""; @@ -170,7 +170,7 @@ * @param thePath path to convert to an IClasspathEntry * @return the IClasspathEntry built from the given path */ - private static IClasspathEntry getIClasspathEntry(IPath thePath) + public static IClasspathEntry getIClasspathEntry(IPath thePath) { return JavaCore.newLibraryEntry(thePath, null, null); } Modified: jakarta/cactus/branches/CACTUS_TRUNK_MAMOUTH/integration/eclipse/org.apache.cactus.eclipse.runner/src/main/java/org/apache/cactus/eclipse/runner/launcher/JettyCactusLaunchConfiguration.java URL: http://svn.apache.org/viewvc/jakarta/cactus/branches/CACTUS_TRUNK_MAMOUTH/integration/eclipse/org.apache.cactus.eclipse.runner/src/main/java/org/apache/cactus/eclipse/runner/launcher/JettyCactusLaunchConfiguration.java?rev=627168&r1=627167&r2=627168&view=diff ============================================================================== --- jakarta/cactus/branches/CACTUS_TRUNK_MAMOUTH/integration/eclipse/org.apache.cactus.eclipse.runner/src/main/java/org/apache/cactus/eclipse/runner/launcher/JettyCactusLaunchConfiguration.java (original) +++ jakarta/cactus/branches/CACTUS_TRUNK_MAMOUTH/integration/eclipse/org.apache.cactus.eclipse.runner/src/main/java/org/apache/cactus/eclipse/runner/launcher/JettyCactusLaunchConfiguration.java Tue Feb 12 14:58:37 2008 @@ -86,15 +86,20 @@ private IClasspathEntry[] getJettyClasspath() throws CoreException { CactusPlugin thePlugin = CactusPlugin.getDefault(); - URL libURL = thePlugin.find(new Path(JETTY_LIBRARY_PATH)); + //CactusPlugin.log("Just here:"+LibraryHelper.getLibPath().toString()); + + //URL libURL = thePlugin.find(LibraryHelper.getLibPath()); + + IPath libURL = LibraryHelper.getLibPath(); + if (libURL == null) { throw CactusPlugin.createCoreException( "CactusLaunch.message.prepare.error.plugin.file", - " : " + libURL.getPath(), + " : " + libURL.toString(), null); } - File libDir = new File(libURL.getPath()); + File libDir = new File(libURL.toString()); IClasspathEntry[] jettyJarPaths = getJarPaths(libDir); IClasspathEntry[] apacheJarPaths = new IClasspathEntry[0]; Plugin tomcatPlugin = Platform.getPlugin("org.eclipse.tomcat"); @@ -158,12 +163,15 @@ private IClasspathEntry[] getLibrariesPaths( IPluginDescriptor theDescriptor, String thePackagePrefix) { + CactusPlugin.log("PPrefix"+thePackagePrefix); Vector result = new Vector(); URL root = theDescriptor.getInstallURL(); ILibrary[] libraries = theDescriptor.getRuntimeLibraries(); for (int i = 0; i < libraries.length; i++) { + ILibrary currentLib = libraries[i]; + CactusPlugin.log("Current library"+currentLib.getPath().toString()); if (thePackagePrefix == null || isContained(thePackagePrefix, currentLib)) { @@ -193,7 +201,14 @@ */ private boolean isContained(String thePackagePrefix, ILibrary theCurrentLib) { - String[] prefixes = theCurrentLib.getPackagePrefixes(); + + CactusPlugin.log("Path of the lib:"+theCurrentLib.getPath().toString()); + + String[] prefixes = theCurrentLib.getPackagePrefixes(); + if(prefixes==null || prefixes.length==0) { + CactusPlugin.log("lib: "+theCurrentLib.getPath().toString()+" is not"); + return false; + } for (int i = 0; i < prefixes.length; i++) { if (prefixes[i].equals(thePackagePrefix)) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]