You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by Matthias Klein <ma...@cmklein.de> on 2006/05/24 12:20:07 UTC
Is Maven really necessary?
Currently I am writing a small web application using Torque as OM.
However, I find it rather cumbersome to heavily depend on Maven only for
the Torque part (the rest is dutifully carried out by the tools provided
by Eclipse)
Is there no way to somehow perform this task (at least the compilation
task) without maven?
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org
Re: Is Maven really necessary?
Posted by Graham Leggett <mi...@sharp.fm>.
Matthias Klein wrote:
> Currently I am writing a small web application using Torque as OM.
> However, I find it rather cumbersome to heavily depend on Maven only for
> the Torque part (the rest is dutifully carried out by the tools provided
> by Eclipse)
>
> Is there no way to somehow perform this task (at least the compilation
> task) without maven?
From experience, there is never such a thing as a "small application",
only "an application that hasn't had the chance to get big yet".
Also, by building the app solo, you are far less likely to reuse that
app's code elsewhere, as it's too much of a pain to set up the
dependencies. If you can, stick with maven for the build. Relying purely
on an IDE to build something means that if someone else needs to
maintain your code, they need to use your IDE, not the one they are most
efficient with.
Regards,
Graham
--
Re: Is Maven really necessary?
Posted by Graham Leggett <mi...@sharp.fm>.
On Wed, May 24, 2006 2:33 pm, Matthias Klein wrote:
> I am familiar with Ant and still would like to do this ad-hoc type
> development in a simpler fashion.
> However, since all of you here seem to disagree, I assume my best bet is
> to wrap my head around maven to be able to appreciate its advantages. Hey,
> may be I will even like that tool once I am done with it. Who knows.
> Oh well. May be maven is the way to go then...
If you want to build your WAR project using maven, you fill in a few basic
details in a project.xml file, and go:
maven war
And that's it. Doesn't get much simpler really.
Your first project with maven tends to be a bit of a pain filling in the
project.xml file, but after that your second one is "copy and alter a few
values".
Regards,
Graham
--
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org
Re: Is Maven really necessary?
Posted by Graham Leggett <mi...@sharp.fm>.
Matthias Klein wrote:
> Of course, the list of dependencies will have to be resolved first. But
>
> Question 2: Is all I need to do add all required jars and plugins in my
> /lib folder?
Maven will resolve dependencies for you, and the built in "eclipse"
plugin for maven will keep eclipse in sync with your project.xml file.
In other words, do this:
maven eclipse:generate-project
maven eclipse:generate-classpath
Run the second step each time your dependencies change in project.xml,
and then "refresh" that project in eclipse.
There is an extra one off step in eclipse: Add a
java->buildpath->classpath variable called MAVEN_REPO pointing at your
~/.maven/repository directory, details in the eclipse plugin docs for maven.
Regards,
Graham
--
Re: Is Maven really necessary?
Posted by Thomas Vandahl <tv...@apache.org>.
Matthias Klein wrote:
> Question 1: Is that even possible to now keep going with "developing as
> usual"?
Yes, that's what I do all the time.
> Of course, the list of dependencies will have to be resolved first. But
>
> Question 2: Is all I need to do add all required jars and plugins in my
> /lib folder?
Yes and no. You should look into MevenIDE. There you add a "Maven
nature" to your project and then you can synchronize the dependencies
between project.xml and the Eclipse class path.
> Question 3: Is there no one single dependecies file that I can download
> and unpack it into my /lib ? (Doing this one by one is way too cumbersome
> - and might force me to start using maven NOW :-)
No, at least not that I know of. This is one area where Maven shines. It
will resolve all your dependencies automagically. All this can be done
from within Eclipse if you want.
Bye, Thomas.
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org
Re: Is Maven really necessary?
Posted by Matthias Klein <ma...@cmklein.de>.
Okay, I tried this:
1. Installing maven
2. writing the two schema xml files and the project.properties
3. invoked the generator with "maven torque"
It all worked perfectly fine so far. Since I executed all this in my
project directory, the classes are even where they are supposed to be.
After a "refresh" even my IDE knows about them.
As you suggested, now I would like to do the "rest" with my IDE (until I
use maven for my project, too)
Question 1: Is that even possible to now keep going with "developing as
usual"?
Of course, the list of dependencies will have to be resolved first. But
Question 2: Is all I need to do add all required jars and plugins in my
/lib folder?
Question 3: Is there no one single dependecies file that I can download
and unpack it into my /lib ? (Doing this one by one is way too cumbersome
- and might force me to start using maven NOW :-)
Thanks
Matt
Am Mi, 24.05.2006, 18:00, schrieb Matthias Klein:
>>> Shouldn't it be sufficient to generate them into a source directory
>>> Eclipse knows about?
>>>
>
> That's what I hoped for. I am currently trying this approach (still
> writing my project-schema.xml, though :-) So I should know soon
>
>
>
> Am Mi, 24.05.2006, 17:42, schrieb Thomas Vandahl:
>
>> Matthias Klein wrote:
>>
>>
>>> I am familiar with Ant and still would like to do this ad-hoc type
>>> development in a simpler fashion. However, since all of you here seem
>>> to disagree, I assume my best bet is to wrap my head around maven to
>>> be able to appreciate its advantages. Hey, may be I will even like
>>> that tool once I am done with it. Who knows. Oh well. May be maven is
>>> the way to go then...
>>
>> You may have a look at Mevenide or the ANT integration of Eclipse.
>> Especially the Maven integration is very useful.
>>
>>
>>
>> BTW, why do you have to compile the Torque classes using Maven?
>> Shouldn't it be sufficient to generate them into a source directory
>> Eclipse knows about?
>>
>>
>>
>>
>> Bye, Thomas.
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
>> For additional commands, e-mail: torque-user-help@db.apache.org
>>
>>
>>
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org
Re: Is Maven really necessary?
Posted by Matthias Klein <ma...@cmklein.de>.
>>Shouldn't it be sufficient to generate them into a source directory
>>Eclipse knows about?
That's what I hoped for. I am currently trying this approach (still
writing my project-schema.xml, though :-) So I should know soon
Am Mi, 24.05.2006, 17:42, schrieb Thomas Vandahl:
> Matthias Klein wrote:
>
>> I am familiar with Ant and still would like to do this ad-hoc type
>> development in a simpler fashion. However, since all of you here seem to
>> disagree, I assume my best bet is to wrap my head around maven to be
>> able to appreciate its advantages. Hey, may be I will even like that
>> tool once I am done with it. Who knows. Oh well. May be maven is the way
>> to go then...
>
> You may have a look at Mevenide or the ANT integration of Eclipse.
> Especially the Maven integration is very useful.
>
>
> BTW, why do you have to compile the Torque classes using Maven?
> Shouldn't it be sufficient to generate them into a source directory
> Eclipse knows about?
>
>
>
> Bye, Thomas.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org
Re: Is Maven really necessary?
Posted by Thomas Vandahl <tv...@apache.org>.
Matthias Klein wrote:
> I am familiar with Ant and still would like to do this ad-hoc type
> development in a simpler fashion.
> However, since all of you here seem to disagree, I assume my best bet is
> to wrap my head around maven to be able to appreciate its advantages. Hey,
> may be I will even like that tool once I am done with it. Who knows.
> Oh well. May be maven is the way to go then...
You may have a look at Mevenide or the ANT integration of Eclipse.
Especially the Maven integration is very useful.
BTW, why do you have to compile the Torque classes using Maven?
Shouldn't it be sufficient to generate them into a source directory
Eclipse knows about?
Bye, Thomas.
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org
Re: Is Maven really necessary?
Posted by Matthias Klein <ma...@cmklein.de>.
I am familiar with Ant and still would like to do this ad-hoc type
development in a simpler fashion.
However, since all of you here seem to disagree, I assume my best bet is
to wrap my head around maven to be able to appreciate its advantages. Hey,
may be I will even like that tool once I am done with it. Who knows.
Oh well. May be maven is the way to go then...
My thesis is done :-) Finally. Thanks a lot, though! "Hi" to the entire
synyx crew. (I will be over for a pint of coffee soon...)
Thanks again
Matt
Am Mi, 24.05.2006, 14:11, schrieb Florian Hopf:
> Hi,
>
>> A user creates the project.properties and the schema xml stuff. That's
>> all Then he calls
>>
>>
>> java torque generate
>>
>> to create all java files in the target source directory
>>
>> Then the user can either type
>>
>>
>> java torque compile
>>
>> to compile the om stuff and place the class files in the specified
>> target dir or simply include this om source path in the project of his
>> IDE (e.g.
>> Eclipse or Netbeans or whatever)
>>
>>
>>
> I don't see the necessity for such a thing. Ant is a very common tool
> for Java developers. But if you'd like to have it I think it wouldn't be
> difficult to implement. Ant tasks can be called from java quite easily.
> There's a section in the ant manual describing the steps you'd have to
> take.
>
> Good luck with your thesis ;)
>
>
> Florian
> <http://dict.leo.org/ende?lp=ende&p=/gQPU.&search=necessity>
>
>
> --
> /**
> * Florian Hopf
> * Synyx GmbH & Co. KG
> * phone +49(0)721 9118303
> * eMail hopf@synyx.de
> * www http://www.synyx.de
> * irc irc.synyx.de
> */
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org
Re: Is Maven really necessary?
Posted by Florian Hopf <ho...@synyx.de>.
Hi,
> A user creates the project.properties and the schema xml stuff. That's all
> Then he calls
>
> java torque generate
>
> to create all java files in the target source directory
>
> Then the user can either type
>
> java torque compile
>
> to compile the om stuff and place the class files in the specified target
> dir or simply include this om source path in the project of his IDE (e.g.
> Eclipse or Netbeans or whatever)
>
>
I don't see the necessity for such a thing. Ant is a very common tool
for Java developers. But if you'd like to have it I think it wouldn't be
difficult to implement. Ant tasks can be called from java quite easily.
There's a section in the ant manual describing the steps you'd have to take.
Good luck with your thesis ;)
Florian
<http://dict.leo.org/ende?lp=ende&p=/gQPU.&search=necessity>
--
/**
* Florian Hopf
* Synyx GmbH & Co. KG
* phone +49(0)721 9118303
* eMail hopf@synyx.de
* www http://www.synyx.de
* irc irc.synyx.de
*/
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org
Re: Is Maven really necessary?
Posted by Matthias Klein <ma...@cmklein.de>.
Thanks for your speedy reply. What I had in mind was, for small projects,
something like this:
A user creates the project.properties and the schema xml stuff. That's all
Then he calls
java torque generate
to create all java files in the target source directory
Then the user can either type
java torque compile
to compile the om stuff and place the class files in the specified target
dir or simply include this om source path in the project of his IDE (e.g.
Eclipse or Netbeans or whatever)
That would be very neat and simple and doesn't require so many different
scattered configuration files and different tools for different tasks
Am Mi, 24.05.2006, 12:30, schrieb Florian Hopf:
> Hi Matthias,
>
>> Currently I am writing a small web application using Torque as OM.
>> However, I find it rather cumbersome to heavily depend on Maven only for
>> the Torque part (the rest is dutifully carried out by the tools
>> provided by Eclipse)
>>
>> Is there no way to somehow perform this task (at least the compilation
>> task) without maven?
>>
> Although I recommend using maven even for small applications (did you
> have a look at the war-goals?), you can also use the ant tasks. See the
> generator docs at
> http://db.apache.org/torque/releases/torque-3.2/generator/index.html for
> more info.
>
> HTH
> Flo
>
>
> --
> /**
> * Florian Hopf
> * Synyx GmbH & Co. KG
> * phone +49(0)721 9118303
> * eMail hopf@synyx.de
> * www http://www.synyx.de
> * irc irc.synyx.de
> */
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org
Re: Is Maven really necessary?
Posted by Florian Hopf <ho...@synyx.de>.
Hi Matthias,
> Currently I am writing a small web application using Torque as OM.
> However, I find it rather cumbersome to heavily depend on Maven only for
> the Torque part (the rest is dutifully carried out by the tools provided
> by Eclipse)
>
> Is there no way to somehow perform this task (at least the compilation
> task) without maven?
>
Although I recommend using maven even for small applications (did you
have a look at the war-goals?), you can also use the ant tasks. See the
generator docs at
http://db.apache.org/torque/releases/torque-3.2/generator/index.html for
more info.
HTH
Flo
--
/**
* Florian Hopf
* Synyx GmbH & Co. KG
* phone +49(0)721 9118303
* eMail hopf@synyx.de
* www http://www.synyx.de
* irc irc.synyx.de
*/
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org