Brian
Brian

Reputation: 155

How is JSPC called?

Given:

  1. Upon running mvn clean install JSP compiler jspc reports issues
  2. Issues are confirmed real. When deploying code as is (without fixing anything) JSP is broken at runtime
  3. Upon fixing the issues and deploying the application, issues go away

Problem: Fix is not recognized by JSPC

How is JSPC called?

        <plugin>
            <groupId>org.codehaus.mojo.jspc</groupId>
            <artifactId>jspc-maven-plugin</artifactId>
            <configuration>
                <includeInProject>false</includeInProject>
                <sources>
                    <directory>${basedir}/myapp/src/main/webapp/</directory>
                    <includes>
                        <include>**/*.jsp</include>
                    </includes>
                </sources>
                <source>1.6</source>
                <target>1.6</target>
            </configuration>
            <executions>
                <execution>
                    <goals>
                        <goal>compile</goal>
                    </goals>
                </execution>
            </executions>

            <dependencies>
                <dependency>
                    <groupId>org.codehaus.mojo.jspc</groupId>
                    <artifactId>jspc-compiler-tomcat6</artifactId>
                    <version>2.0-alpha-3</version>
                </dependency>
            </dependencies>
        </plugin>

What errors are reported?

[ERROR] MyClass cannot be resolved to a type

More details about the problem:

Similar question about this here

It seems like a classpath problem, but where in pom can it be set please?

Upvotes: 2

Views: 804

Answers (1)

James Raitsev
James Raitsev

Reputation: 96481

Try adding

<workingDirectory>${basedir}/myapp/target/classes</workingDirectory>

inside <configuration> tags

Upvotes: 2

Related Questions