cancel
Showing results for 
Search instead for 
Did you mean: 

Custom evaluator in Java

_jan
Champ on-the-rise
Champ on-the-rise
Hi,
I want to create custom evaluator in Java. I found that it should be Java class which extends
org.alfresco.web.evaluator.BaseEvaluator
.
But Eclipse is writing : 
import org.alfresco.web.evaluator.BaseEvaluator cannot be resolved.

This should be located in alfresco-share-4.2.f.jar. After compilation of project I found this package there Eclipse didnt stop showing that error.

My project is created with maven and I havent changed anything. But when i try to add external file as library
alfresco-share-4.2.f.jar
, then everything is OK.

Is this because of Alfresco 4.2.f or it should be located in alfresco 4.2.f?

Thanks
2 REPLIES 2

oleh
Champ in-the-making
Champ in-the-making
I faced the same issue when I was creating the initial tests for SDK 1.2.0 (http://ohej.dk/2014/10/alfresco-4-2-x-and-alfresco-sdk/), which I've yet to complete I ended up with these dependencies in my pom.xml to ensure everything worked smoothly:

       <dependency>
            <groupId>${alfresco.groupId}</groupId>
            <artifactId>share</artifactId>
            <version>${alfresco.version}</version>
            <classifier>classes</classifier>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>${alfresco.groupId}</groupId>
                    <artifactId>alfresco-web-framework-commons</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.springframework.extensions.surf</groupId>
            <artifactId>spring-surf-api</artifactId>
            <scope>provided</scope>
            <version>1.2.0-M14</version>
            <exclusions>
                <exclusion>
                    <groupId>javax.servlet</groupId>
                    <artifactId>servlet-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>javax.servlet</groupId>
                    <artifactId>jsp-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.alfresco</groupId>
            <artifactId>alfresco-web-framework-commons</artifactId>
            <version>${alfresco.version}</version>
            <type>jar</type>
            <exclusions>
                <exclusion>
                    <groupId>rhino</groupId>
                    <artifactId>js</artifactId>
                </exclusion>
            </exclusions>
            <scope>provided</scope>
        </dependency>

_jan
Champ on-the-rise
Champ on-the-rise
Thanks for reply,

I put this into my share pom.xml but it doesnt fix my problem. Maven and Eclipse are still showing error that
The import org.alfresco.web cannot be resolved
.