Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
How to develop without an IDE?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  Messages 1 - 25 of 137 - Collapse all  -  Translate all to Translated (View all originals)   Newer >
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Rui Maciel  
View profile  
 More options Apr 22 2012, 11:15 am
Newsgroups: comp.lang.java.programmer
From: Rui Maciel <rui.mac...@gmail.com>
Date: Sun, 22 Apr 2012 16:15:30 +0100
Local: Sun, Apr 22 2012 11:15 am
Subject: How to develop without an IDE?
Is it possible to set up a Java project so that it can be built without
relying on an IDE?  If it is, where can I find any information on how to set
up this sort of project?  

Bonus points if it's possible to pull this off by writing a single makefile.

Thanks in advance,
Rui Maciel


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David Lamb  
View profile  
 More options Apr 22 2012, 11:18 am
Newsgroups: comp.lang.java.programmer
From: David Lamb <dal...@cs.queensu.ca>
Date: Sun, 22 Apr 2012 11:18:39 -0400
Local: Sun, Apr 22 2012 11:18 am
Subject: Re: How to develop without an IDE?
On 22/04/2012 11:15 AM, Rui Maciel wrote:

> Is it possible to set up a Java project so that it can be built without
> relying on an IDE?  If it is, where can I find any information on how to set
> up this sort of project?

> Bonus points if it's possible to pull this off by writing a single makefile.

I've always used a combination of Emacs and make. Given your "single
makefile" question, though, I suspect you may have more sophisticated
needs than I do. Care to elaborate?

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Knute Johnson  
View profile  
 More options Apr 22 2012, 11:41 am
Newsgroups: comp.lang.java.programmer
From: Knute Johnson <nos...@knutejohnson.com>
Date: Sun, 22 Apr 2012 08:41:49 -0700
Local: Sun, Apr 22 2012 11:41 am
Subject: Re: How to develop without an IDE?
On 4/22/2012 8:15 AM, Rui Maciel wrote:

> Is it possible to set up a Java project so that it can be built without
> relying on an IDE?  If it is, where can I find any information on how to set
> up this sort of project?

> Bonus points if it's possible to pull this off by writing a single makefile.

> Thanks in advance,
> Rui Maciel

I use Vim to edit, and a batch file to compile and jar up the classes.
And often a batch file to start them as well.

--

Knute Johnson


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andreas Leitgeb  
View profile  
 More options Apr 22 2012, 12:22 pm
Newsgroups: comp.lang.java.programmer
From: Andreas Leitgeb <a...@gamma.logic.tuwien.ac.at>
Date: Sun, 22 Apr 2012 16:22:10 +0000 (UTC)
Local: Sun, Apr 22 2012 12:22 pm
Subject: Re: How to develop without an IDE?

David Lamb <dal...@cs.queensu.ca> wrote:
> On 22/04/2012 11:15 AM, Rui Maciel wrote:
>> Is it possible to set up a Java project so that it can be built without
>> relying on an IDE?  If it is, where can I find any information on how to set
>> up this sort of project?
>> Bonus points if it's possible to pull this off by writing a single makefile.
> I've always used a combination of Emacs and make. Given your "single
> makefile" question, though, I suspect you may have more sophisticated
> needs than I do. Care to elaborate?

Not sure if I clarify the OP, or "hijack" his thread, but
suppose you created a working environment in eclipse consisting
of a couple of projects, then what tools are there to create
e.g. an "ant" or "maven"-script from eclipse's own project-
control files, that would allow a headless machine to build
a runnable jar-file with all project-dependencies just like
eclipse does?

Even if the OP didn't mean that, I'd still like to know - so
much for hijacking ;)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Arne Vajhøj  
View profile  
 More options Apr 22 2012, 12:36 pm
Newsgroups: comp.lang.java.programmer
From: Arne Vajhøj <a...@vajhoej.dk>
Date: Sun, 22 Apr 2012 12:36:29 -0400
Local: Sun, Apr 22 2012 12:36 pm
Subject: Re: How to develop without an IDE?
On 4/22/2012 11:15 AM, Rui Maciel wrote:

> Is it possible to set up a Java project so that it can be built without
> relying on an IDE?  If it is, where can I find any information on how to set
> up this sort of project?

> Bonus points if it's possible to pull this off by writing a single makefile.

Very few rely on their IDE to build for serious projects.

They use tools like Ant or Maven to build with.

You can also write the code without an IDE, but why not utilize
the extra support you get from a Java aware IDE.

Arne


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
markspace  
View profile  
 More options Apr 22 2012, 1:17 pm
Newsgroups: comp.lang.java.programmer
From: markspace <-@.>
Date: Sun, 22 Apr 2012 10:17:25 -0700
Local: Sun, Apr 22 2012 1:17 pm
Subject: Re: How to develop without an IDE?
On 4/22/2012 8:15 AM, Rui Maciel wrote:

> Is it possible to set up a Java project so that it can be built
> without relying on an IDE?  If it is, where can I find any
> information on how to set up this sort of project?

> Bonus points if it's possible to pull this off by writing a single
> makefile.

Yes of course.  The devil will be in the details however.

<http://docs.oracle.com/javase/7/docs/technotes/tools/>

<http://www.gnu.org/software/make/manual/make.html>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lew  
View profile  
 More options Apr 22 2012, 2:35 pm
Newsgroups: comp.lang.java.programmer
From: Lew <no...@lewscanon.com>
Date: Sun, 22 Apr 2012 11:35:18 -0700
Local: Sun, Apr 22 2012 2:35 pm
Subject: Re: How to develop without an IDE?
On 04/22/2012 09:36 AM, Arne Vajhøj wrote:

> On 4/22/2012 11:15 AM, Rui Maciel wrote:
>> Is it possible to set up a Java project so that it can be built without
>> relying on an IDE? If it is, where can I find any information on how to set
>> up this sort of project?

>> Bonus points if it's possible to pull this off by writing a single makefile.

> Very few rely on their IDE to build for serious projects.

> They use tools like Ant or Maven to build with.

> You can also write the code without an IDE, but why not utilize
> the extra support you get from a Java aware IDE.

OP: Be careful that your problem statement doesn't limit your solution space.

Arne knew that makefiles are not literally the best build mechanism for Java,
so unlike those others who specifically dicussed make with you, he gave you
the idiomatically Java equivalent.

I'm not aware of any prevalence of make in the Java build-and-deployment world.

Ant and Maven are the two most standard mechanisms. Real-life Java
build-and-deployment systems are edifices of scripts (shell, Python, Ruby,
...), continuous-integration (CI) platforms, Ant and/or Maven,
intelligently-crafted logging (of the builds, not just the program runs), and
often much more.

As a solo practitioner you can readily put together a decent ecosystem with
open-source tools, e.g., for Java EE:

  git                    version-control repository
  Jenkins                continuous-integration framework
  Ant                    build system
  bash
  Python
  Junit                  unit test framework
  EasyMock               mock objects for testing code
  FindBugs               find bugs in source code
  Glassfish              application server
    Geronimo, JBoss
  Tomcat, Jetty          simpler app server
                         JSPs, no EJBs, JMX, etc., unless plugins
  Apache Web Server      HTTP server - all kinds of proxy magic, etc.
  EclipseLink, OpenJPA   JPA - Java Persistence API)
  Postgres               RDBMS
  Your favorite editor(s) and IDE(s)

You certainly do not need an IDE for any of that, and quite frankly, none of
your build and test stuff should use any IDE files directly, nor should most
editor- or IDE-specific files be in the trunk of your code repository.

With such a suite of tools, I still would add NetBeans or Eclipse (among the
free options) or Aptana (based on Eclipse) as an IDE. While an IDE is not
essential to system development, it is very helpful.

They not only help with code development, they make great dashboards to manage
your libraries, databases, servers, logs, test frameworks, and other tools,
and the interactions amongst them. We programmers tend to monomaniacally focus
only on how IDEs help code production. They are also very handy, particularly
for the solo stages (developer workstation or individual consultant's
production box), to manage the myriad operations matters.

http://git-scm.com/
http://jenkins-ci.org/
http://ant.apache.org/
http://www.ubuntu.com/
http://www.cygwin.com/
http://www.python.org/
http://www.junit.org/
http://www.easymock.org/
http://findbugs.sourceforge.net/
http://glassfish.java.net/
http://geronimo.apache.org/
http://www.jboss.org/
http://tomcat.apache.org/
http://www.eclipse.org/jetty/
http://httpd.apache.org/
http://www.eclipse.org/eclipselink/
http://openjpa.apache.org/
http://www.postgresql.org/
http://www.gnu.org/software/emacs/
http://netbeans.org/
http://eclipse.org/
http://www.aptana.com/

--
Lew
Honi soit qui mal y pense.
http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Martin Gregorie  
View profile  
 More options Apr 22 2012, 3:11 pm
Newsgroups: comp.lang.java.programmer
From: Martin Gregorie <mar...@address-in-sig.invalid>
Date: Sun, 22 Apr 2012 19:11:28 +0000 (UTC)
Local: Sun, Apr 22 2012 3:11 pm
Subject: Re: How to develop without an IDE?

On Sun, 22 Apr 2012 16:15:30 +0100, Rui Maciel wrote:
> Is it possible to set up a Java project so that it can be built without
> relying on an IDE?  If it is, where can I find any information on how to
> set up this sort of project?

Simple. Do just as you would for, say, a C project but use Ant instead of
make.

> Bonus points if it's possible to pull this off by writing a single
> makefile.

Its the norm to use a single build.xml (ant's equivalent of Makefile) to
do everything that make will, i.e. build, clean the source structure,
install the jarfiles. The only significant differences are that its
working with a package hierarchy rather than a set of modules in separate
directories and that it will usually run javadocs too.

This is how I usually work with Java projects, often over an ssh session.

--
martin@   | Martin Gregorie
gregorie. | Essex, UK
org       |


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Arne Vajhøj  
View profile  
 More options Apr 22 2012, 5:21 pm
Newsgroups: comp.lang.java.programmer
From: Arne Vajhøj <a...@vajhoej.dk>
Date: Sun, 22 Apr 2012 17:21:32 -0400
Local: Sun, Apr 22 2012 5:21 pm
Subject: Re: How to develop without an IDE?
On 4/22/2012 2:35 PM, Lew wrote:

make and Java is like square form and wheels. Not a good mix.

Arne


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Steven Simpson  
View profile  
 More options Apr 22 2012, 6:32 pm
Newsgroups: comp.lang.java.programmer
From: Steven Simpson <s...@domain.invalid>
Date: Sun, 22 Apr 2012 23:32:08 +0100
Local: Sun, Apr 22 2012 6:32 pm
Subject: Re: How to develop without an IDE?
On 22/04/12 16:15, Rui Maciel wrote:

> Is it possible to set up a Java project so that it can be built without
> relying on an IDE?  If it is, where can I find any information on how to set
> up this sort of project?

> Bonus points if it's possible to pull this off by writing a single makefile.

Though I use Eclipse for any project of more than a few source files, I
don't use it for building.  The projects include the necessary scripts
to be built stand-alone.

I did explore trying to get 'make' to handle per-file dependencies, and
I haven't totally given up yet, but for now I've settled for per-jar
dependencies.  I have a pre-packaged 'make' include file, and tell it
that jar foo depends upon the 'API' of jar bar, and it works out rules
that allow compilation of foo to be necessary only if any of foo's
sources have changed (of course), or the API of bar has changed - so bar
can change internally without necessarily triggering recompilation of foo.

Within a jar, nothing special is going on - it's a clean build.

A jar's API is derived from the class files immediately after
compilation.  I originally used javap and gawk for this, but javap's
text output is not a consistent format from one vendor to the next, and
the gawk processing is slow, so I eventually wrote a Java program to
parse the class files directly.  It's a little faster, and should be
more broadly compatible.  However, I think it's still substantially
slower than simply doing clean builds on all jars unconditionally.

Details here:

<http://www.comp.lancs.ac.uk/~ss/software/pkg-jardeps>

Cheers,

Steven

--
ss at comp dot lancs dot ac dot uk


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
BGB  
View profile  
 More options Apr 22 2012, 7:15 pm
Newsgroups: comp.lang.java.programmer
From: BGB <cr88...@hotmail.com>
Date: Sun, 22 Apr 2012 16:15:33 -0700
Local: Sun, Apr 22 2012 7:15 pm
Subject: Re: How to develop without an IDE?
On 4/22/2012 2:21 PM, Arne Vajhøj wrote:

it does technically work though, and may make some sense, say, if one is
also building a bunch of C code (say, as part of a JNI wrapper for
native code or similar), or is generally part of a larger project for
which make is already used.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Arne Vajhøj  
View profile  
 More options Apr 22 2012, 7:45 pm
Newsgroups: comp.lang.java.programmer
From: Arne Vajhøj <a...@vajhoej.dk>
Date: Sun, 22 Apr 2012 19:45:52 -0400
Local: Sun, Apr 22 2012 7:45 pm
Subject: Re: How to develop without an IDE?
On 4/22/2012 7:15 PM, BGB wrote:

I would rather call ant from make or make from ant to handle those
situations.

Arne


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
BGB  
View profile  
 More options Apr 22 2012, 11:28 pm
Newsgroups: comp.lang.java.programmer
From: BGB <cr88...@hotmail.com>
Date: Sun, 22 Apr 2012 20:28:30 -0700
Local: Sun, Apr 22 2012 11:28 pm
Subject: Re: How to develop without an IDE?
On 4/22/2012 4:45 PM, Arne Vajhøj wrote:

yes, this works as well.

I guess it is probably whichever is more convenient.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Nasser M. Abbasi  
View profile  
 More options Apr 23 2012, 12:57 am
Newsgroups: comp.lang.java.programmer
From: "Nasser M. Abbasi" <n...@12000.org>
Date: Sun, 22 Apr 2012 23:57:35 -0500
Local: Mon, Apr 23 2012 12:57 am
Subject: Re: How to develop without an IDE?
On 4/22/2012 10:28 PM, BGB wrote:

>>> it does technically work though, and may make some sense, say, if one is
>>> also building a bunch of C code (say, as part of a JNI wrapper for
>>> native code or similar), or is generally part of a larger project for
>>> which make is already used.

>> I would rather call ant from make or make from ant to handle those
>> situations.

> yes, this works as well.

> I guess it is probably whichever is more convenient.

I found that using one good tool for everything is better than
mixing things.

Also, gnumake can do so many more things than just build source
code. I use it to update my html files and pdf files from
Latex sources, and other such things.

As long as the idea that drives the tool is: Perform this action
to update these prerequisites that this target depends on, then better
to use one tool that does this better and for many other things, not
just .java files.

In my tree, I have .f, .f90, .c, .c++, .java, .tex, and many
other files that I want to 'update' in my tree.

Using one tool for all, is better, because one becomes better
at using this one tool, and things are integrated better.
gnumake+bash is pretty much all what I need.

I tried ant, and found that I am doing the same thing I
am already doing in my Makefile, just had to use different
syntax. (I also did not like XML syntax). Also looked at Ruby
script, and few other things. They all pretty much try to do
what Make allready does but using different syntax.

It is very easy to use gnumake to build Java and  make jar files and
all. Here is a link showing Makefile for Java from the best book
on gnumake "Managing Projects with GNU make" by Robert Mecklenburg

http://www.makelinux.net/make3/make3-CHP-9#make3-CHP-9

Chapter 9 is all about using make for build Java.

As others said. If you are using an IDE with its own build
system. It is better to have your own makefile to build
your tree, independent of what the IDE has. This way, if
you changed IDE, or move your tree somewhere else where
this IDE is not available, you can still build your tree
any where.

--Nasser


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Leif Roar Moldskred  
View profile  
 More options Apr 23 2012, 3:06 am
Newsgroups: comp.lang.java.programmer
From: Leif Roar Moldskred <le...@dimnakorr.com>
Date: Mon, 23 Apr 2012 02:06:25 -0500
Local: Mon, Apr 23 2012 3:06 am
Subject: Re: How to develop without an IDE?
Nasser M. Abbasi <n...@12000.org> wrote:

> I found that using one good tool for everything is better than
> mixing things.

[SNIP]

> In my tree, I have .f, .f90, .c, .c++, .java, .tex, and many
> other files that I want to 'update' in my tree.

You see no contradiction here?

--
Leif Roar Moldskred


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Nasser M. Abbasi  
View profile  
 More options Apr 23 2012, 3:09 am
Newsgroups: comp.lang.java.programmer
From: "Nasser M. Abbasi" <n...@12000.org>
Date: Mon, 23 Apr 2012 02:09:55 -0500
Local: Mon, Apr 23 2012 3:09 am
Subject: Re: How to develop without an IDE?
On 4/23/2012 2:06 AM, Leif Roar Moldskred wrote:

> Nasser M. Abbasi<n...@12000.org>  wrote:

>> I found that using one good tool for everything is better than
>> mixing things.

> [SNIP]

>> In my tree, I have .f, .f90, .c, .c++, .java, .tex, and many
>> other files that I want to 'update' in my tree.

> You see no contradiction here?

What contradiction?

I use Makefile to build all the my programs?

Do you mean, why I use different languages? And I should
use one programming language? is that what you mean?

If I can find one programming language that meets all my
programming needs, then I'll use that one language, but
have not found one yet.

--Nasser


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Roedy Green  
View profile  
 More options Apr 23 2012, 3:33 am
Newsgroups: comp.lang.java.programmer
From: Roedy Green <see_webs...@mindprod.com.invalid>
Date: Mon, 23 Apr 2012 00:33:20 -0700
Local: Mon, Apr 23 2012 3:33 am
Subject: Re: How to develop without an IDE?
On Sun, 22 Apr 2012 16:15:30 +0100, Rui Maciel <rui.mac...@gmail.com>
wrote, quoted or indirectly quoted someone who said :

>Is it possible to set up a Java project so that it can be built without
>relying on an IDE?  If it is, where can I find any information on how to set
>up this sort of project?  

see http://mindprod.com/jgloss/ant.html
--
Roedy Green Canadian Mind Products
http://mindprod.com
When you were a child, if you did your own experiment
to see if it was better to put to cocoa into your cup first
or the hot milk first, then you likely have the programmer gene..

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
BGB  
View profile  
 More options Apr 23 2012, 4:26 am
Newsgroups: comp.lang.java.programmer
From: BGB <cr88...@hotmail.com>
Date: Mon, 23 Apr 2012 01:26:17 -0700
Local: Mon, Apr 23 2012 4:26 am
Subject: Re: How to develop without an IDE?
On 4/23/2012 12:09 AM, Nasser M. Abbasi wrote:

yeah...

in my case, my project currently uses 5 different programming languages
(to a greater or lesser degree, list does not include makefiles),
several smaller/special purpose DSLs, and an assortment of specialized
file-formats.

I also generally use Make as well...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Leif Roar Moldskred  
View profile  
 More options Apr 23 2012, 5:36 am
Newsgroups: comp.lang.java.programmer
From: Leif Roar Moldskred <le...@dimnakorr.com>
Date: Mon, 23 Apr 2012 04:36:43 -0500
Local: Mon, Apr 23 2012 5:36 am
Subject: Re: How to develop without an IDE?
Nasser M. Abbasi <n...@12000.org> wrote:

> What contradiction?

> I use Makefile to build all the my programs?

> Do you mean, why I use different languages? And I should
> use one programming language? is that what you mean?

> If I can find one programming language that meets all my
> programming needs, then I'll use that one language, but
> have not found one yet.

I'm just saying that "using one good tool for everything" is no more
(nor less) the right approach when it comes to build systems than when
it comes to programming languages.

--
Leif Roar Moldskred


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Daniel Pitts  
View profile  
 More options Apr 23 2012, 1:25 pm
Newsgroups: comp.lang.java.programmer
From: Daniel Pitts <newsgroup.nos...@virtualinfinity.net>
Date: Mon, 23 Apr 2012 10:25:40 -0700
Local: Mon, Apr 23 2012 1:25 pm
Subject: Re: How to develop without an IDE?
On 4/22/12 8:15 AM, Rui Maciel wrote:
> Is it possible to set up a Java project so that it can be built without
> relying on an IDE?  If it is, where can I find any information on how to set
> up this sort of project?

> Bonus points if it's possible to pull this off by writing a single makefile.

> Thanks in advance,
> Rui Maciel

for small scale projects, a command line works perfectly well.

I would run commands such as: javac net/virtualinfinity/myproject/Main.java

Once in a while I'd have to do a rm `find . | grep ".class$"` and the
like to do a "clean" build.

Why not use an IDE though? They provide so much!


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Robert Klemme  
View profile  
 More options Apr 23 2012, 3:11 pm
Newsgroups: comp.lang.java.programmer
From: Robert Klemme <shortcut...@googlemail.com>
Date: Mon, 23 Apr 2012 21:11:45 +0200
Local: Mon, Apr 23 2012 3:11 pm
Subject: Re: How to develop without an IDE?
On 23.04.2012 06:57, Nasser M. Abbasi wrote:

Which, if followed religiously, will lead you into a situation where it
can get really awkward to do things with tool A which would be extremely
easy with tool B.

> Also, gnumake can do so many more things than just build source
> code. I use it to update my html files and pdf files from
> Latex sources, and other such things.

No wonder because make doesn't do *any* of these things.  Make evaluates
timestamps along dependencies (mostly between files) and invokes other
programs that do all the work.  GNU make additionally has an extremely
large database of predefined rules, has functions and other capabilities.

> As long as the idea that drives the tool is: Perform this action
> to update these prerequisites that this target depends on, then better
> to use one tool that does this better and for many other things, not
> just .java files.

Interestingly GNU make's large built in rule database does not contain
anything related to compiling Java.  How do you create your Makefiles in
a way as to invoke javac only for those files which have changed -
especially in light of the fact that one Java source file might create
multiple .class files?

> In my tree, I have .f, .f90, .c, .c++, .java, .tex, and many
> other files that I want to 'update' in my tree.

> Using one tool for all, is better, because one becomes better
> at using this one tool, and things are integrated better.
> gnumake+bash is pretty much all what I need.

I'm with Leif: if you drink your own cool aid you should be throwing out
all those languages and resort to language [ ] only.

> I tried ant, and found that I am doing the same thing I
> am already doing in my Makefile, just had to use different
> syntax. (I also did not like XML syntax). Also looked at Ruby
> script, and few other things. They all pretty much try to do
> what Make allready does but using different syntax.

I disagree: ant is very different from make.  Ant has built in tasks and
knows itself how to accomplish them.  You can even teach it more tasks
via its extension interface.  ant rules for building Java projects are
almost certainly a lot simpler than the same for make - as that example
proves.

> It is very easy to use gnumake to build Java and make jar files and
> all. Here is a link showing Makefile for Java from the best book
> on gnumake "Managing Projects with GNU make" by Robert Mecklenburg

> http://www.makelinux.net/make3/make3-CHP-9#make3-CHP-9

I did not see the advertized Makefile example but found this gem
(quoting from that page):

"Code declared to be within the a.b.c package would be compiled to class
files in the a/b/c directory. This means that make's normal algorithm
for associating a binary file with its source fails."

Or did you mean this link?
http://www.makelinux.net/make3/make3-CHP-9-SECT-2

I am counting 200+ lines in this Makefile.  It inefficiently invokes
javac on all Java sources and defines functions for things that ant can
do out of the box.  As a consequence you have to search in different
locations to find out which packages go into which jar file.  The same
is probably 15% of the lines as an ant file.  Sorry, but that example is
no advertisement for using make to build Java projects.

> Chapter 9 is all about using make for build Java.

> As others said. If you are using an IDE with its own build
> system. It is better to have your own makefile to build
> your tree, independent of what the IDE has. This way, if
> you changed IDE, or move your tree somewhere else where
> this IDE is not available, you can still build your tree
> any where.

Modern IDE's usually have integration with ant and / or maven and will
happily generate appropriate build files.

Kind regards

        robert

--
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rui Maciel  
View profile  
 More options Apr 23 2012, 6:15 pm
Newsgroups: comp.lang.java.programmer
From: Rui Maciel <rui.mac...@gmail.com>
Date: Mon, 23 Apr 2012 23:15:29 +0100
Local: Mon, Apr 23 2012 6:15 pm
Subject: Re: How to develop without an IDE?

Robert Klemme wrote:
> On 23.04.2012 06:57, Nasser M. Abbasi wrote:
>> I found that using one good tool for everything is better than
>> mixing things.

> Which, if followed religiously, will lead you into a situation where it
> can get really awkward to do things with tool A which would be extremely
> easy with tool B.

This isn't necessarily a problem, particularly if a person is already
familiar with tool A while being completely unaware that tool B even
existed.  

Then there is a significant issue with being forced to learn an entirely new
tool just because there might be a single thing that it might be able to
handle in a simpler way, and then being forced to deal with a significant
list of things where the new tool fails to perform.  Unfortunately, this
appears to be an undistinguishing feature of every automated build system
that has been released.

>> Also, gnumake can do so many more things than just build source
>> code. I use it to update my html files and pdf files from
>> Latex sources, and other such things.

> No wonder because make doesn't do *any* of these things.  Make evaluates
> timestamps along dependencies (mostly between files) and invokes other
> programs that do all the work.  GNU make additionally has an extremely
> large database of predefined rules, has functions and other capabilities.

There is nothing wrong with this.  In fact, I see it as an extremelly
valuable feature.  It's a pain in the neck to shoe-horn custom build rules
to an automated build system which was developed with them as an
afterthought.

>> As long as the idea that drives the tool is: Perform this action
>> to update these prerequisites that this target depends on, then better
>> to use one tool that does this better and for many other things, not
>> just .java files.

> Interestingly GNU make's large built in rule database does not contain
> anything related to compiling Java.  How do you create your Makefiles in
> a way as to invoke javac only for those files which have changed -
> especially in light of the fact that one Java source file might create
> multiple .class files?

Maybe build-in rules aren't needed, considering Make's static pattern rules.

http://www.gnu.org/software/make/manual/make.html#Static-Pattern

<snip/>

Rui Maciel


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rui Maciel  
View profile  
 More options Apr 23 2012, 6:22 pm
Newsgroups: comp.lang.java.programmer
From: Rui Maciel <rui.mac...@gmail.com>
Date: Mon, 23 Apr 2012 23:22:30 +0100
Local: Mon, Apr 23 2012 6:22 pm
Subject: Re: How to develop without an IDE?

David Lamb wrote:
> I've always used a combination of Emacs and make. Given your "single
> makefile" question, though, I suspect you may have more sophisticated
> needs than I do. Care to elaborate?

There is nothing sophisticated in my needs.  The only reason I mentioned
makefiles is that I'm already familiar with them.  I would prefer to develop
a skill which I already have than being forced to start from scratch by
being forced to use another tool.

Rui Maciel


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rui Maciel  
View profile  
 More options Apr 23 2012, 6:38 pm
Newsgroups: comp.lang.java.programmer
From: Rui Maciel <rui.mac...@gmail.com>
Date: Mon, 23 Apr 2012 23:38:47 +0100
Local: Mon, Apr 23 2012 6:38 pm
Subject: Re: How to develop without an IDE?

Daniel Pitts wrote:
> Why not use an IDE though? They provide so much!

They also tend to be inferior in a considerable number of aspects,
particularly when compared with the features provided by some text editors.  
Between being forced to stick with an IDE and managing the build process by
hand, the latter option sounds a lot better.

Rui Maciel


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
markspace  
View profile  
 More options Apr 23 2012, 6:44 pm
Newsgroups: comp.lang.java.programmer
From: markspace <-@.>
Date: Mon, 23 Apr 2012 15:44:05 -0700
Local: Mon, Apr 23 2012 6:44 pm
Subject: Re: How to develop without an IDE?
On 4/23/2012 3:15 PM, Rui Maciel wrote:

> Maybe build-in rules aren't needed, considering Make's static pattern rules.

> http://www.gnu.org/software/make/manual/make.html#Static-Pattern

That's a good find, and I appreciate you pointing it out to this list.
It's actually been several years since I've dealt with make's build
rules in any way, and a small refresher wouldn't be bad for me.

However, in the Java world, ant is the standard build program.  (Or
maven; however I haven't got into maven yet.)  There's no way you can
avoid ant.  Any project that exists in Java, any deliverable you get
from an outside contractor or firm, will invariably use ant.  It is
simply "the standard."

So I'd recommend you learn to use it.  First, it avoids fumbling around
making your own static rules, and second you will have to learn it
eventually, regardless.  So it might as well be on your own terms, and
on your own schedule.

I found ant's use of XML off-putting at first as well, but it becomes
easier to deal with, and more natural to write, after you've hand
written a couple of basic project definitions.  Just go for it, and
don't sweat the new stuff you'll learn.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Messages 1 - 25 of 137   Newer >
« Back to Discussions « Newer topic     Older topic »