[Building Sakai] A question about how to use some APIs in project Profile2

Small Cat shadowless4288 at gmail.com
Thu Nov 5 20:47:19 PST 2009


Hi,
In the components.xml, I added a bean for my class as :
*
<!--  MyPortfolios -->
    <bean id = "org.sakaiproject.profile2.tool.myportfolios.MyPortfolios;"
        class="org.sakaiproject.profile2.tool.myportfolios.MyPortfolios;">

        <property name="siteService"
ref="org.sakaiproject.site.api.SiteService"/>

    </bean>*
In relevant pom.xml , I added :
*<dependency>
                    <groupId>org.sakaiproject</groupId>
                    <artifactId>sakai-site-api</artifactId>
                    <scope>provided</scope>
                </dependency>
*
Is this right ?
Thanks ,


2009/11/6 Steve Swinsburg <steve.swinsburg at gmail.com>

> Hi,
>
> Are you making an addition to Profile2 that you might like to contribute
> back? If so, thats great! Could you possibly Jira it here:
> http://jira.sakaiproject.org/browse/PRFL
>
> For your issue, it's most likely an API injection issue. You'll need to
> make sure you have the dependency in the relevant POM and in the
> components.xml so Spring can inject it into the beans. However if you Jira
> this task we can go over the goal and implementation details.
>
> cheers,
> Steve
>
>
>
> On 06/11/2009, at 1:51 AM, Small Cat wrote:
>
> Dear all,
> I want to add some functions for Profile2, and one of them can show all
> scores of assigments in all course sites...
> But I can't use some APIs as getSites.... ( I can use it in other tools,
> but in Profile2 I don't know why it can't )
> This is error when I deploy :
>
> *[ERROR] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Compilation failure
>
>
> C:\sakai\profile2-1.2.1\tool\src\java\org\sakaiproject\profile2\tool\myportfolio
> s\MyPortfolios.java:[22,52] cannot access
> org.sakaiproject.entity.api.EntityProd
> ucer
> file org\sakaiproject\entity\api\EntityProducer.class not found
>                         courseSiteList =
> siteService.getSites(SelectionType.ACCE
> SS,
>
>
> C:\sakai\profile2-1.2.1\tool\src\java\org\sakaiproject\profile2\tool\myportfolio
> s\MyPortfolios.java:[35,60] cannot access org.sakaiproject.entity.api.Edit
> file org\sakaiproject\entity\api\Edit.class not found
>
> courseList.add(courseSiteList.remove(0).getTitle());*
>
> How to use getSites in Profile2 , if can not, what methods I can use to
> replace ?
> Thank you,
> --
> Regards,
> Tran Trung Kien
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to
> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of
> "unsubscribe"
>
>
>


-- 
Regards,
Tran Trung Kien
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20091106/aefeb58d/attachment.html 


More information about the sakai-dev mailing list