[jira] [Commented] (CONNECTORS-388) Upgrade the Crawler UI framework with Apache Velocity

2012-01-22 Thread Karl Wright (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/CONNECTORS-388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13190635#comment-13190635
 ] 

Karl Wright commented on CONNECTORS-388:


I set up a merge branch and began looking into jar dependencies.  The new build 
dependencies on antlr, oro, and maven seem unnecessary; everything seems to 
work without that.  Piergiorgio, can you explain what those are for, and why 
the framework should need them?


 Upgrade the Crawler UI framework with Apache Velocity
 -

 Key: CONNECTORS-388
 URL: https://issues.apache.org/jira/browse/CONNECTORS-388
 Project: ManifoldCF
  Issue Type: Improvement
  Components: Framework core
Affects Versions: ManifoldCF 0.3
Reporter: Piergiorgio Lucidi
Assignee: Piergiorgio Lucidi
   Original Estimate: 72h
  Remaining Estimate: 72h

 We have to try to upgrade the UI Crawler using Apache Velocity that a good 
 solution that could fit with Manifold implementation.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CONNECTORS-388) Upgrade the Crawler UI framework with Apache Velocity

2012-01-22 Thread Karl Wright (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/CONNECTORS-388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13190637#comment-13190637
 ] 

Karl Wright commented on CONNECTORS-388:


It turns out that the only jar needed for the UI tests to pass is the velocity 
jar itself.  All the others seem to be used for Velocity features we don't 
need, e.g. avalon logging.  So I've cut it back to the bare bones and modified 
the LICENSE.txt file accordingly.  Will commit to trunk shortly...


 Upgrade the Crawler UI framework with Apache Velocity
 -

 Key: CONNECTORS-388
 URL: https://issues.apache.org/jira/browse/CONNECTORS-388
 Project: ManifoldCF
  Issue Type: Improvement
  Components: Framework core
Affects Versions: ManifoldCF 0.3
Reporter: Piergiorgio Lucidi
Assignee: Piergiorgio Lucidi
   Original Estimate: 72h
  Remaining Estimate: 72h

 We have to try to upgrade the UI Crawler using Apache Velocity that a good 
 solution that could fit with Manifold implementation.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CONNECTORS-388) Upgrade the Crawler UI framework with Apache Velocity

2012-01-22 Thread Karl Wright (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/CONNECTORS-388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13190638#comment-13190638
 ] 

Karl Wright commented on CONNECTORS-388:


r1234472 is the commit to trunk.


 Upgrade the Crawler UI framework with Apache Velocity
 -

 Key: CONNECTORS-388
 URL: https://issues.apache.org/jira/browse/CONNECTORS-388
 Project: ManifoldCF
  Issue Type: Improvement
  Components: Framework core
Affects Versions: ManifoldCF 0.3
Reporter: Piergiorgio Lucidi
Assignee: Piergiorgio Lucidi
   Original Estimate: 72h
  Remaining Estimate: 72h

 We have to try to upgrade the UI Crawler using Apache Velocity that a good 
 solution that could fit with Manifold implementation.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CONNECTORS-388) Upgrade the Crawler UI framework with Apache Velocity

2012-01-21 Thread Karl Wright (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/CONNECTORS-388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13190578#comment-13190578
 ] 

Karl Wright commented on CONNECTORS-388:


r1234446 fixes the resource location problem... The only problem remaining 
seems to be :A's showing up in the Server tab.  Looking into that next.


 Upgrade the Crawler UI framework with Apache Velocity
 -

 Key: CONNECTORS-388
 URL: https://issues.apache.org/jira/browse/CONNECTORS-388
 Project: ManifoldCF
  Issue Type: Improvement
  Components: Framework core
Affects Versions: ManifoldCF 0.3
Reporter: Piergiorgio Lucidi
Assignee: Piergiorgio Lucidi
   Original Estimate: 72h
  Remaining Estimate: 72h

 We have to try to upgrade the UI Crawler using Apache Velocity that a good 
 solution that could fit with Manifold implementation.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CONNECTORS-388) Upgrade the Crawler UI framework with Apache Velocity

2012-01-21 Thread Karl Wright (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/CONNECTORS-388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13190582#comment-13190582
 ] 

Karl Wright commented on CONNECTORS-388:


UI tests fail on the branch, for this reason:

[junit] 2012-01-21 21:34:30.199:WARN::Nested in 
javax.servlet.ServletException: java.lang.NoClassDefFoundError: 
org/apache/velocity/context/Context:
[junit] java.lang.NoClassDefFoundError: org/apache/velocity/context/Context

Obviously this is because velocity isn't the class path for the test.  It's 
probably easier to fix this during the merge, however, because of the changes 
to the build system on trunk.


 Upgrade the Crawler UI framework with Apache Velocity
 -

 Key: CONNECTORS-388
 URL: https://issues.apache.org/jira/browse/CONNECTORS-388
 Project: ManifoldCF
  Issue Type: Improvement
  Components: Framework core
Affects Versions: ManifoldCF 0.3
Reporter: Piergiorgio Lucidi
Assignee: Piergiorgio Lucidi
   Original Estimate: 72h
  Remaining Estimate: 72h

 We have to try to upgrade the UI Crawler using Apache Velocity that a good 
 solution that could fit with Manifold implementation.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CONNECTORS-388) Upgrade the Crawler UI framework with Apache Velocity

2012-01-18 Thread Piergiorgio Lucidi (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/CONNECTORS-388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13188655#comment-13188655
 ] 

Piergiorgio Lucidi commented on CONNECTORS-388:
---

Created the branch to work on this issue:
https://svn.apache.org/repos/asf/incubator/lcf/branches/CONNECTORS-388/

 Upgrade the Crawler UI framework with Apache Velocity
 -

 Key: CONNECTORS-388
 URL: https://issues.apache.org/jira/browse/CONNECTORS-388
 Project: ManifoldCF
  Issue Type: Improvement
  Components: Framework core
Affects Versions: ManifoldCF 0.3
Reporter: Piergiorgio Lucidi
Assignee: Piergiorgio Lucidi
   Original Estimate: 72h
  Remaining Estimate: 72h

 We have to try to upgrade the UI Crawler using Apache Velocity that a good 
 solution that could fit with Manifold implementation.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CONNECTORS-388) Upgrade the Crawler UI framework with Apache Velocity

2012-01-18 Thread Piergiorgio Lucidi (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/CONNECTORS-388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13188697#comment-13188697
 ] 

Piergiorgio Lucidi commented on CONNECTORS-388:
---

Started to work on this issue (r1233061).

I imported Apache Velocity in the lib folder and in the build files (Ant and 
Maven), all the new dependencies are the following:
* antlr
* avalon
* jdom
* maven-ant-tasks
* oro
* werken-xpath

I had to update the Commons Collections dependencies from 2.1 to 3.2.1 that is 
required in Velocity because it uses new classes introduced in the third 
version of the library.

I updated the org.apache.manifoldcf.core.i18n.Messages class adding the new 
method that must be used for all the connectors that must use Velocity 
(outputResourceWithVelocity).

I started to work on the CMIS Connector, that's why I updated the 
org.apache.manifoldcf.crawler.connectors.cmis.Message class that is related to 
the specific connector. 

To conform other connectors, it is only needed to change the method 
outputResource to the new one outputResourceWithVelocity. And it is needed to 
conform all the templates JS and HTML changing all the replacer from 
${something:A} to $something:A, this because Velocity has a different way 
to use replacers for parameters.

Now I have a problem to get load the HTML template in Velocity, in the Messages 
class we have:
{code}
StringWriter stringWriter = new StringWriter();
   try {
   Velocity.mergeTemplate(resourceLoaderPath, UTF-8, context, 
stringWriter);
   }
   catch (Exception e) {
 throw new ManifoldCFException(e.getMessage(),e);
   }
{code}

It seems that Velocity doesn't find for some reasons the template in the 
classpath, notice that I'm using the ClasspathResourceLoader that is used for 
this specific need:
{code}
Properties properties = new Properties();
properties.setProperty(VelocityEngine.RESOURCE_LOADER, classpath);
properties.setProperty(classpath.+VelocityEngine.RESOURCE_LOADER+.class, 
ClasspathResourceLoader.class.getName());
{code}

So I think that we need only to solve this issue about classpath loading and we 
have done!
Any hints?

 Upgrade the Crawler UI framework with Apache Velocity
 -

 Key: CONNECTORS-388
 URL: https://issues.apache.org/jira/browse/CONNECTORS-388
 Project: ManifoldCF
  Issue Type: Improvement
  Components: Framework core
Affects Versions: ManifoldCF 0.3
Reporter: Piergiorgio Lucidi
Assignee: Piergiorgio Lucidi
   Original Estimate: 72h
  Remaining Estimate: 72h

 We have to try to upgrade the UI Crawler using Apache Velocity that a good 
 solution that could fit with Manifold implementation.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CONNECTORS-388) Upgrade the Crawler UI framework with Apache Velocity

2012-01-18 Thread Karl Wright (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/CONNECTORS-388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13188743#comment-13188743
 ] 

Karl Wright commented on CONNECTORS-388:


I'm refactoring the root build.xml to build up the manifest classpath a line at 
a time, so we'll have to merge that when the time comes.  Other than that, good 
work!

The reason that VelocityEngine doesn't find the resources is because they can 
only be accessed by the current classloader, which is defined in ManifoldCF 
core as a nested set of classloaders.  But you can get the correct classloader 
using the method ManifoldCF.createResourceLoader().



 Upgrade the Crawler UI framework with Apache Velocity
 -

 Key: CONNECTORS-388
 URL: https://issues.apache.org/jira/browse/CONNECTORS-388
 Project: ManifoldCF
  Issue Type: Improvement
  Components: Framework core
Affects Versions: ManifoldCF 0.3
Reporter: Piergiorgio Lucidi
Assignee: Piergiorgio Lucidi
   Original Estimate: 72h
  Remaining Estimate: 72h

 We have to try to upgrade the UI Crawler using Apache Velocity that a good 
 solution that could fit with Manifold implementation.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CONNECTORS-388) Upgrade the Crawler UI framework with Apache Velocity

2012-01-18 Thread Karl Wright (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/CONNECTORS-388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13188843#comment-13188843
 ] 

Karl Wright commented on CONNECTORS-388:


I've had a look at what Velocity provides as far as resource loading options, 
and none of them are pertinent to ManifoldCF.  So what we will need to do is 
extend the abstract base class 
org.apache.velocity.runtime.resource.loader.ResourceLoader.  We'll also need to 
configure Velocity using something other than a Properties, since we'll need to 
instantiate our ManifoldCFResourceLoader class appropriately for the context 
we're in.  I'm not quite sure how to do that yet.


 Upgrade the Crawler UI framework with Apache Velocity
 -

 Key: CONNECTORS-388
 URL: https://issues.apache.org/jira/browse/CONNECTORS-388
 Project: ManifoldCF
  Issue Type: Improvement
  Components: Framework core
Affects Versions: ManifoldCF 0.3
Reporter: Piergiorgio Lucidi
Assignee: Piergiorgio Lucidi
   Original Estimate: 72h
  Remaining Estimate: 72h

 We have to try to upgrade the UI Crawler using Apache Velocity that a good 
 solution that could fit with Manifold implementation.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CONNECTORS-388) Upgrade the Crawler UI framework with Apache Velocity

2012-01-18 Thread Karl Wright (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/CONNECTORS-388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13188853#comment-13188853
 ] 

Karl Wright commented on CONNECTORS-388:


It looks like we do not want to use the singleton approach to setting up 
Velocity, since you can only configure a singleton ONCE, and thus we won't be 
able to use different class loaders, which is essential.  Instead, we'll need 
to set up a VelocityEngine object.  It should be sufficient to create a single 
static VelocityEngine object in each connector's Messages class, which is 
configured to resolve resources based on that class's class loader.  So the 
method in ui-core/i18n/Messages.java should accept a VelocityEngine argument in 
this model, and create a Velocity context for every template being rendered.

I'm still not sure how to provide a VelocityEngine with an already-instantiated 
ResourceLoader class, but we should be able to figure that out looking at the 
Velocity source code.


 Upgrade the Crawler UI framework with Apache Velocity
 -

 Key: CONNECTORS-388
 URL: https://issues.apache.org/jira/browse/CONNECTORS-388
 Project: ManifoldCF
  Issue Type: Improvement
  Components: Framework core
Affects Versions: ManifoldCF 0.3
Reporter: Piergiorgio Lucidi
Assignee: Piergiorgio Lucidi
   Original Estimate: 72h
  Remaining Estimate: 72h

 We have to try to upgrade the UI Crawler using Apache Velocity that a good 
 solution that could fit with Manifold implementation.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CONNECTORS-388) Upgrade the Crawler UI framework with Apache Velocity

2012-01-18 Thread Karl Wright (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/CONNECTORS-388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=1317#comment-1317
 ] 

Karl Wright commented on CONNECTORS-388:


r1233150 is the changes needed to get the model basically correct.

Note that I haven't yet tried this setup; I have qualms about the 
VelocityEngine.setExtendedConfiguration() call, because I don't believe I've 
set all the pertinent defaults.  But we shall see.



 Upgrade the Crawler UI framework with Apache Velocity
 -

 Key: CONNECTORS-388
 URL: https://issues.apache.org/jira/browse/CONNECTORS-388
 Project: ManifoldCF
  Issue Type: Improvement
  Components: Framework core
Affects Versions: ManifoldCF 0.3
Reporter: Piergiorgio Lucidi
Assignee: Piergiorgio Lucidi
   Original Estimate: 72h
  Remaining Estimate: 72h

 We have to try to upgrade the UI Crawler using Apache Velocity that a good 
 solution that could fit with Manifold implementation.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira