The Nexus referred to by my Maven project is located on another server, which has some restrictions. The problem is that I have to import some Java libraries into my project that the Nexus cannot download due to its restrictions. My goal is to import these libraries locally and thus avoid using the Nexus. If anyone knows any alternative, I am open to new proposals.
My only attempt has been to import these libraries using Maven which in turn uses the Nexus of those servers, but it is impossible because they have certain network restrictions. Those libreries are:
import oracle.xml.parser.schema.*;
import oracle.xml.parser.v2.*;
But what i am trying?
I provide function that Validate XML files by using XSD schemas. But when the function is called it throws an error becaus of the import of the libreries are not allowed.
import oracle.xml.parser.schema.*;
import oracle.xml.parser.v2.*;
import java.net.*;
import java.io.*;
import org.w3c.dom.*;
import java.util.*;
import java.sql.SQLException;
/**
*
* Clase de utilidad para el tratamiento de XML.
* class SIXUtil
* author Ibermática
* date Diciembre 2008
*
*/
public class SIXUtil
{
public static String validarXmlSchema(oracle.sql.CLOB xml,
oracle.sql.CLOB xsd) throws Exception
{
XSDBuilder builder = new XSDBuilder();
XMLSchema schemadoc =
(XMLSchema)builder.build(xsd.getAsciiStream(),null);
DOMParser dp = new DOMParser();
dp.setXMLSchema(schemadoc);
dp.setValidationMode(XMLParser.SCHEMA_VALIDATION);
dp.setPreserveWhitespace (true);
StringWriter sw = new StringWriter();
dp.setErrorStream (new PrintWriter(sw));
try
{
dp.parse (xml.getAsciiStream());
}
catch (XMLParseException pe)
{
sw.write(pe.getMessage());
}
catch (Exception e)
{
sw.write("Error inesperado: " + e.getMessage());
}
return sw.toString();
}
}
/
I expect to import the libreries locally insted of using the Nexus.