Creating 2.5.2 project in eclipse - antcontrib?

62 views
Skip to first unread message

aric....@gmail.com

unread,
Jan 15, 2014, 3:00:40 PM1/15/14
to dot...@googlegroups.com
Hi,

I have an issue creating dotCMS project in Eclipse.
This is the documentation that I was following: http://dotcms.com/docs/latest/DevelopmentEnvironment

To clone the project, this is what I did:
I downloaded git from here: http://git-scm.com/downloads
I cloned the project through git with this command: "git clone https://github.com/dotCMS/dotCMS.git"

To create the new project, I followed the documentation line by line.
Everything went well until just before running ant command: "ant compile buildsql buildmXsql"

When I tried to run that ant command, I got no error BUT there is this line:

[taskdef] Could not load definitions from resource net/sf/antcontrib/antlib.xml. It could not be found.

and a couple of warnings, which are also shown in the documentation screenshot, so I believe the warnings are normal.


In the attempt to solve that, I stumbled on old article: https://github.com/dotCMS/dotCMS/issues/2820
This is the part that I do not understand......
It seems like every jar necessary should have been included..

First of all, just like Maria said, there is no ant-contrib jar in dotCMS/WEB-INF/lib....

Nonetheless, I followed http://ant-contrib.sourceforge.net/
Download Apache Ant 1.9.3, set ANT_HOME env var, also set this to PATH so it is available to be called.

From there, I downloaded ant-contrib from http://sourceforge.net/projects/ant-contrib/files/
Build ant-contrib via "ant" and it returns with BUILD SUCCESSFUL and I can see ant-contrib.jar being created.

Taking this .jar to dotCMS/WEB-INF/lib, run "ant compile buildsql buildmXsql" again, it still shows the same result:
[taskdef] Could not load definitions from resource net/sf/antcontrib/antlib.xml. It could not be found.


This time, I went ahead and do what Maria did, replacing:
<taskdef resource="net/sf/antcontrib/antlib.xml"/>
with:
<taskdef resource="net/sf/antcontrib/antcontrib.properties">
      <classpath>
        <pathelement location="${dotcms.root.dir}/dotCMS/WEB-INF/lib/ant-contrib-0.6.jar"/>
      </classpath>
    </taskdef>
hardcoding the path of the .jar....

Doing so, I am able to eliminate [taskdef] error and managed to get the same ant build result as shown in the documentation screenshot....
However, my database is still empty..........
Launching tomcat throws me an error:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/juli/logging/LogFactory
at org.apache.catalina.startup.Bootstrap.<clinit>(Bootstrap.java:60)


My question is this, what is this "ant compile buildsql buildmXsql" command supposed to do?
compile - I assume this will compile the source code into classes in /dotCMS/build/classes (as described by the installation doc)
buildsql - It seems like this target is only used to copy correct sql files into dotCMS/dotCMS/WEB-INF/classes
buildmXsql - This.... I am not sure what this is doing...... Is this the population of DB table??

What is antlib.xml?
How do I get ant-contrib installed properly without modifying build.xml? I mean, even after modification, it still does not work the way it is described...


I do not know what I did wrong...... I followed the tutorial line by line, doing it 3x from fresh copy....
Any inputs?


Regards,


Aric

Jason Tesser

unread,
Jan 15, 2014, 3:27:14 PM1/15/14
to dot...@googlegroups.com
To answer your question ant compile buildsql buildmXsql is to build the SQL NOT execute it. 

See this for running in master 


Maybe you are running master and that is the issue. 

On Wed, Jan 15, 2014 at 3:00 PM, <aric....@gmail.com> wrote:
ant compile buildsql buildmXsql


aric....@gmail.com

unread,
Jan 15, 2014, 3:51:23 PM1/15/14
to dot...@googlegroups.com
Hi,

So that was it......... orz
After I added tomcat-juli.jar, it runs fine..

I do not know what the difference are between master and trunk.. But it does seem like running in master..
Is it not recommended to run in master?

There are quite a bit of warnings (in red) when I run the server, but at least I can now proceed to try building my first plugin...
I will most likely have questions along the plugin creation.. But I will ask when I have enough knowledge how to get around building a plugin..


Thank you!


Aric

Jason Tesser

unread,
Jan 15, 2014, 3:52:57 PM1/15/14
to dot...@googlegroups.com
master is our bleeding edge unreleased code. 

I do not have red in Eclipse FWIW with master 


--
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dotcms+un...@googlegroups.com.
To post to this group, send email to dot...@googlegroups.com.
Visit this group at http://groups.google.com/group/dotcms.
For more options, visit https://groups.google.com/groups/opt_out.

tapan...@gmail.com

unread,
Jun 19, 2014, 11:35:32 AM6/19/14
to dot...@googlegroups.com
I am getting following error

package java.nio.file does not exists.
This is from JAVA 7

and dotcms installtion says u need java 6.
Do we need java 7?

Jason Tesser

unread,
Jun 19, 2014, 12:40:43 PM6/19/14
to dot...@googlegroups.com
Java nio is in Java 7. Which Java 7 are you using?
Thanks,
Jason S. Tesser
Director, Product Development, Lead Engineer
Dotcms, Inc.
T: 305.858.1422 x7003
http://twitter.com/dotCMS
www.dotcms.com
> "Dotcms User Group" group.
>
> To unsubscribe from this group and stop receiving emails from it, send an
> email to dotcms+un...@googlegroups.com.
> To post to this group, send email to dot...@googlegroups.com.
> Visit this group at http://groups.google.com/group/dotcms.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages