smttsp smttsp - 1 month ago 22
Java Question

No embedded stylesheet instruction for file

I wanted to learn more about crawlers and find a project on git which I didn't know how to use until yesterday. I finally achieved to import it to eclipse but now it is giving the following:

07:45:07,798 INFO [main] Main - javax.xml.transform.TransformerFactory=null
07:45:07,811 INFO [main] Main - java.endorsed.dirs=C:\Users\st\Desktop\eclipse-jee-juno-SR1-win32-x86_64\eclipse\jre\lib\endorsed
07:45:07,840 INFO [main] Main - launchFile: C:\Users\st\workspace\.metadata\.plugins\org.eclipse.wst.xsl.jaxp.launching\launch\launch.xml
07:45:08,019 FATAL [main] Main - No embedded stylesheet instruction for file: file:/C:/Users/st/git/crawler_new/pom.xml

org.eclipse.wst.xsl.jaxp.debug.invoker.TransformationException: No embedded stylesheet instruction for file: file:/C:/Users/st/git/crawler_new/pom.xml
at org.eclipse.wst.xsl.jaxp.debug.invoker.internal.JAXPSAXProcessorInvoker.transform(JAXPSAXProcessorInvoker.java:225)
at org.eclipse.wst.xsl.jaxp.debug.invoker.internal.JAXPSAXProcessorInvoker.transform(JAXPSAXProcessorInvoker.java:186)
at org.eclipse.wst.xsl.jaxp.debug.invoker.internal.Main.main(Main.java:73)

Caused by: org.eclipse.wst.xsl.jaxp.debug.invoker.TransformationException: No embedded stylesheet instruction for file: file:/C:/Users/st/git/crawler_new/pom.xml
at org.eclipse.wst.xsl.jaxp.debug.invoker.internal.JAXPSAXProcessorInvoker.transform(JAXPSAXProcessorInvoker.java:214)
... 2 more


According to searches I have done for the error, it looks like the error is related to xml file but I don't know much about xml. But the
pom.xml
file that is not found is sitting in the directory
/C:/Users/st/git/crawler_new/pom.xml
.

Also, I searched in the issues in project's git site but couldn't find anything related to my problem.

Any advice would be appreciated.

Answer

It looks like you are trying to "run" the POM file in Eclipse (Run As/XSL transformation or whatever the option is) in which case Eclipse is trying to find an XSL stylesheet to transform the XML - not what you're interested in. The POM file is a file for a tool called Maven which specifies a project's structure, its dependencies, etc. You first want to download Maven and run mvn eclipse:eclipse from the command line/shell which will generate all of the Eclipse meta-data files for the project (e.g. .project, .classpath, etc) and re-import your project as a Java application. Alternatively, download the m2e plugin and import it as a Maven project.

Maven may take a bit to learn but there are many tutorials available aside from the one on the Maven site, simply google it.