/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* @author Vivek Pandey
*/
public class WsimportTool {
/**
* Wsimport specific options
*/
}
}
class Listener extends WsimportListener {
ConsoleErrorReporter cer = new ConsoleErrorReporter(out == null ? new PrintStream(new NullStream()) : out);
}
}
}
}
}
}
}
public void enableDebugging(){
}
}
}
}
public void pollAbort() throws AbortException {
if (listener.isCanceled())
throw new AbortException();
}
}
}
};
return true;
}
}
try {
try {
//set auth info
//if(options.authFile != null)
if (forest.isMexMetadata)
return false;
}
}
//generated code
throw new AbortException();
}
} catch(AbortException e){
//error might have been reported
return false;
}catch (IOException e) {
return false;
}catch (XMLStreamException e) {
return false;
}
return false;
}
}
try {
//add all the generated class files to the list of generated files
}
} catch (IOException e) {
return false;
}
} catch (BadCommandLineException e) {
if (e.getMessage() != null) {
}
usage(e.getOptions());
return false;
} finally{
}
return false;
}
return true;
}
private void deleteGeneratedFiles() {
//remove all non-java artifacts as they will packaged in jar.
synchronized (generatedFiles) {
}
}
}
//remove empty package dirs
}
}
}
}
}
for(File f: generatedFiles) {
String relativeDir = DirectoryUtil.getRelativePathfromCommonBase(f.getParentFile(),options.sourceDir);
if(name.equals(className+".class") || (name.startsWith(className+"$") && name.endsWith(".class"))) {
return true;
}
return false;
}
});
}
}
}
for(File f: trackedClassFiles) {
}
}
if(!zipFile.isAbsolute()) {
}
//TODO
}
//exclude packaging the java files in the jar
continue;
}
}
new FileInputStream(f));
int bytesRead;
byte[] buffer = new byte[1024];
}
}
}
/*
private void jarArtifacts() throws IOException {
File zipFile = new File(options.clientjar);
if(!zipFile.isAbsolute()) {
zipFile = new File(options.destDir, options.clientjar);
}
if (zipFile.exists()) {
//TODO
}
FileOutputStream fos = null;
fos = new FileOutputStream(zipFile);
JarOutputStream jos = new JarOutputStream(fos);
addFileToJar(jos, options.destDir, "");
jos.close();
}
private void addFileToJar(JarOutputStream jos, File file, String name) throws IOException {
if(file.isDirectory()) {
for(File f: file.listFiles()) {
String entryName = name.equals("")?f.getName():name+"/"+f.getName();
addFileToJar(jos,f,entryName);
}
} else {
if(name.equals(options.clientjar)) {
return;
}
BufferedInputStream bis = new BufferedInputStream(
new FileInputStream(file));
JarEntry entry = new JarEntry(name);
jos.putNextEntry(entry);
int bytesRead;
byte[] buffer = new byte[1024];
while ((bytesRead = bis.read(buffer)) != -1) {
jos.write(buffer, 0, bytesRead);
}
bis.close();
}
}
*/
}
/*
* To take care of JDK6-JDK6u3, where 2.1 API classes are not there
*/
try {
ParallelWorldClassLoader.toJarUrl(clazz.getResource('/'+clazz.getName().replace('.','/')+".class"));
return true;
} catch(Exception e) {
return false;
}
}
}
}
+ sourceFiles.size()];
int baseIndex = 4;
//javac is not working in osgi as the url starts with a bundle
if (bootCP) {
args[baseIndex++] = "-Xbootclasspath/p:"+JavaCompilerHelper.getJarFile(EndpointContext.class)+File.pathSeparator+JavaCompilerHelper.getJarFile(JAXBPermission.class);
}
}
}
}
}
}
//there are no files to compile, so return true?
return true;
}
}
return classpathStr;
}
}
}