You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by Henning Schmiedehausen <hp...@intermeta.de> on 2004/05/21 19:28:50 UTC

Maven Plugin for Turbine (META)

Hi,

Eric checked the META (Maven Environment for Turbine Applications), a
maven plugin to develop Turbine applications, into the 2.4-dev tree a
while ago. I updated it for the 2.3  branch, wrote some docs about it
and all in all I feel, that this is now getting ready to get some
serious testing and workout by Turbine developers. In the end, I think
that this is superior to the ageing TDK and should help you to get up to
speed using Turbine much faster than the TDK.

Get the instructions on how to use this from here:

http://www.apache.org/~henning/turbine-maven-plugin/

If you don't understand something: Ask. These are docs written by the
guy who wrote the plugin. There might be things that were obvious to me
which are not at all visible to an user.

BTW: One drawback: You have to use maven. I use the 1.0RC3 release
version and it went reasonably well.

I gave the plugin limited testing on Windows (say: I worked after my own
instructions using the maven 1.0-RC3 exe from maven.apache.org) and it
worked well (I got the helloworld application. ;-) ) but Windows is a
platform where I want some testing. 

I tested:

Windows XP Professional
Sun JSDK 1.4.2-04 from sun.com
MySQL 3.23.58 from mysql.com
Tomcat 5.0.24 from jakarta.apache.org
maven-1.0-RC3 from maven.apache.org

On (RedHat) Linux I'm using the plugin for months and I declare it
stable. :-) :

RedHat Linux 9 / RedHat Enterprise Linux 3 ES / Fedora Core 1
Sun JSDK 1.4.2-04 from sun.com
MySQL 3.23.58 from mysql.com or PostgreSQL 7.3.6 from postgresql.org
Tomcat 4.1.30 from jakarta.apache.org
maven-1.0-RC3 from maven.apache.org

If you find bugs or want enhancements, feel free to send your
suggestions to the developer list or directly to me (I prefer the
developer list because there are more eyes and I have an archive).

One thing is definitely planned for the very near future: I need a
"flavour" switch, which allows you to set up an application using a
distinct flavour of Turbine. Current plans are "2.3", "2.3.1-dev" and
"2.4-dev". I already know how to implement this, I just need the time to
do so.

	Regards
		Henning


-- 
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen          INTERMETA GmbH
hps@intermeta.de        +49 9131 50 654 0   http://www.intermeta.de/
 
RedHat Certified Engineer -- Jakarta Turbine Development  -- hero for hire
   Linux, Java, perl, Solaris -- Consulting, Training, Development

"Fighting for one's political stand is an honourable action, but re-
 fusing to acknowledge that there might be weaknesses in one's
 position - in order to identify them so that they can be remedied -
 is a large enough problem with the Open Source movement that it
 deserves to be on this list of the top five problems."
                       --Michelle Levesque, "Fundamental Issues with
                                    Open Source Software Development"


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org


Re: Maven Plugin for Turbine (META)

Posted by "Henning P. Schmiedehausen" <hp...@intermeta.de>.
Jeffery Painter <pa...@kiasoft.com> writes:


>First take on META:

>I created a setup.properties file to begin my new test application

Hi,


>-------------------------------------------------------------------
>#
># META sample application
># setup.properties
>#

># where is tomcat?
>maven.appserver.home = /home/painter/tomcat
> 
># name of application
>turbine.app.name = jobs
>  
># application settings
>turbine.app.package = net.jobs
>turbine.app.om.package = net.jobs.om
> 
># Torque setup
>torque.database = mysql
>torque.database.driver = org.gjt.mm.mysql.Driver
>torque.database.user = user
>torque.database.password = password
>torque.database.buildUrl = jdbc:mysql://localhost/jobs
>torque.database.createUrl = jdbc:mysql://localhost/
>-------------------------------------------------------------------

>The readme file in the jakarta-turbine-2/extensions/maven-plugin/README
>didn't make it very clear what the steps were, but your online 
>documentation did help me figure it out.

ok.

>I ran "maven turbine:setup" and it created a folder called ./jobs
>The next step was to change into this new directory ./jobs before
>issuing the next command "maven turbine:deploy"... I was trying to run
>the command in the same directory before figuring out why it wasn't 
>working.

Is in the docs on the "getting_started.html" page.

>next, for some reason, maven turbine:deploy requested I have the postgres 
>jdbc drivers in the project.xml dependencies even though I specified I 
>wanted to use mysql as my database. I had to manually remove the 
>dependency from the project.xml since I don't have postgres installed on 
>this machine, nor the required drivers.

Yes. I figured, that 90% of all people using Turbine will use either
mysql or postgresql so I put both driver jars into the
project.xml. You can either drop the one that you do not need (as you
did) or ignore it. Your build error came from the fact that I've
simply copied an internal name of the postgresql jar into the POM. I
fixed this.

>lastly, the deployment wanted to put the newly created app in /webapps
>and not my container /home/painter/tomcat/webapps directory

Yep, that's a bug. Fixed. I didn't see it, because I have a
~/build.properties file where I set this for all my applications.


>I'm not sure why it doesn't recognize the container directive. Should I 
>define this somewhere else?

Nope. It should work with the 1.1 plugin now. Thanks a lot for testing
out.

	Regards
		Henning

-- 
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen          INTERMETA GmbH
hps@intermeta.de        +49 9131 50 654 0   http://www.intermeta.de/

RedHat Certified Engineer -- Jakarta Turbine Development  -- hero for hire
   Linux, Java, perl, Solaris -- Consulting, Training, Development

"Fighting for one's political stand is an honourable action, but re-
 fusing to acknowledge that there might be weaknesses in one's
 position - in order to identify them so that they can be remedied -
 is a large enough problem with the Open Source movement that it
 deserves to be on this list of the top five problems."
                       -- Michelle Levesque, "Fundamental Issues with
                                    Open Source Software Development"

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org


Re: Maven Plugin for Turbine (META)

Posted by Jeffery Painter <pa...@kiasoft.com>.
First take on META:

I created a setup.properties file to begin my new test application


-------------------------------------------------------------------
#
# META sample application
# setup.properties
#

# where is tomcat?
maven.appserver.home = /home/painter/tomcat
 
# name of application
turbine.app.name = jobs
  
# application settings
turbine.app.package = net.jobs
turbine.app.om.package = net.jobs.om
 
# Torque setup
torque.database = mysql
torque.database.driver = org.gjt.mm.mysql.Driver
torque.database.user = user
torque.database.password = password
torque.database.buildUrl = jdbc:mysql://localhost/jobs
torque.database.createUrl = jdbc:mysql://localhost/
-------------------------------------------------------------------

The readme file in the jakarta-turbine-2/extensions/maven-plugin/README
didn't make it very clear what the steps were, but your online 
documentation did help me figure it out.

I ran "maven turbine:setup" and it created a folder called ./jobs
The next step was to change into this new directory ./jobs before
issuing the next command "maven turbine:deploy"... I was trying to run
the command in the same directory before figuring out why it wasn't 
working.

next, for some reason, maven turbine:deploy requested I have the postgres 
jdbc drivers in the project.xml dependencies even though I specified I 
wanted to use mysql as my database. I had to manually remove the 
dependency from the project.xml since I don't have postgres installed on 
this machine, nor the required drivers.

lastly, the deployment wanted to put the newly created app in /webapps
and not my container /home/painter/tomcat/webapps directory

I created a temp directory on the root called /webapps and it did deploy

I was able to move the deployed app into my tomcat container and it loaded 
up perfectly.

I'm not sure why it doesn't recognize the container directive. Should I 
define this somewhere else?

---------------------- snip --------------------------
jar:jar:
 
java:jar:
    [echo] java:jar is deprecated and will be removed. Please use jar:jar
 
    [echo] Installing to Appserver Directory: /webapps/jobs, Inplace: 
false
    [mkdir] Created dir: /webapps/jobs/WEB-INF/lib
    [mkdir] Created dir: /webapps/jobs/WEB-INF/conf
    [mkdir] Created dir: /webapps/jobs/WEB-INF/classes
    [mkdir] Created dir: /webapps/jobs/logs
    [mkdir] Created dir: /webapps/jobs/templates
---------------------- snip --------------------------


Cool stuff Henning!

	Jeff Painter

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Maven Plugin for Turbine (META)

Posted by Jeffery Painter <pa...@kiasoft.com>.
First take on META:

I created a setup.properties file to begin my new test application


-------------------------------------------------------------------
#
# META sample application
# setup.properties
#

# where is tomcat?
maven.appserver.home = /home/painter/tomcat
 
# name of application
turbine.app.name = jobs
  
# application settings
turbine.app.package = net.jobs
turbine.app.om.package = net.jobs.om
 
# Torque setup
torque.database = mysql
torque.database.driver = org.gjt.mm.mysql.Driver
torque.database.user = user
torque.database.password = password
torque.database.buildUrl = jdbc:mysql://localhost/jobs
torque.database.createUrl = jdbc:mysql://localhost/
-------------------------------------------------------------------

The readme file in the jakarta-turbine-2/extensions/maven-plugin/README
didn't make it very clear what the steps were, but your online 
documentation did help me figure it out.

I ran "maven turbine:setup" and it created a folder called ./jobs
The next step was to change into this new directory ./jobs before
issuing the next command "maven turbine:deploy"... I was trying to run
the command in the same directory before figuring out why it wasn't 
working.

next, for some reason, maven turbine:deploy requested I have the postgres 
jdbc drivers in the project.xml dependencies even though I specified I 
wanted to use mysql as my database. I had to manually remove the 
dependency from the project.xml since I don't have postgres installed on 
this machine, nor the required drivers.

lastly, the deployment wanted to put the newly created app in /webapps
and not my container /home/painter/tomcat/webapps directory

I created a temp directory on the root called /webapps and it did deploy

I was able to move the deployed app into my tomcat container and it loaded 
up perfectly.

I'm not sure why it doesn't recognize the container directive. Should I 
define this somewhere else?

---------------------- snip --------------------------
jar:jar:
 
java:jar:
    [echo] java:jar is deprecated and will be removed. Please use jar:jar
 
    [echo] Installing to Appserver Directory: /webapps/jobs, Inplace: 
false
    [mkdir] Created dir: /webapps/jobs/WEB-INF/lib
    [mkdir] Created dir: /webapps/jobs/WEB-INF/conf
    [mkdir] Created dir: /webapps/jobs/WEB-INF/classes
    [mkdir] Created dir: /webapps/jobs/logs
    [mkdir] Created dir: /webapps/jobs/templates
---------------------- snip --------------------------


Cool stuff Henning!

	Jeff Painter

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org