Intellij cant resolve tagsoup namespace even if maven dependency added

376 Views Asked by At

I had a problem with TagSoup in one of my projects: even if I added maven dependency to pom, IntelliJ 13 Ultimate would still shout that it can't resolve namespace org.ccil.cowan.tagsoup.Parser (pointing at "ccil" bit).
So I have created a new, empty Maven project, and added 2 dependencies to it: saxon9 and tagsoup1.2.

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>MavenExperiment</groupId>
<artifactId>MavenExperiment</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
    <dependency>
        <groupId>org.ccil.cowan.tagsoup</groupId>
        <artifactId>tagsoup</artifactId>
        <version>1.2</version>
    </dependency>
    <dependency>
        <groupId>net.sf.saxon</groupId>
        <artifactId>Saxon-HE</artifactId>
        <version>9.4</version>
    </dependency>
</dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-resources-plugin</artifactId>
            <version>2.5</version>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>2.3.2</version>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>2.12</version>
        </plugin>
    </plugins>
</build>
</project>

And created simple class:

public class MavenExperiment {

    net.sf.saxon.TransformerFactoryImpl impl;
    org.ccil.cowan.tagsoup.Parser pars;
}

The outcome:

  • both saxon and tagsoup are being downloaded to my local repo
  • it builds in the terminal (mvn clean install)
  • in IntelliJ the saxon stuff is being resolved alright
  • in IntelliJ the tagsoup stuff is still throwing up on the "ccil" part of the namespace with error "cannot resolve symbol"
  • won't build in IntelliJ because of the above error

Any ideas? Am I missing some kind of dependency for tagsoup (certainly can't see anything on the tagsoup website about such dependency)? Thanks.

0

There are 0 best solutions below