• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Re-arrange the Jforum repository for 3?

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, I'm treading into a religious war zone... project layout. Everyone has a favorite style and many are fanatics about it... but...

In reflecting on the recent forgotten files problems with the 2.1.7 release, it struck me that som re-arrangement of the source code would help keep this from happening in the future.

Here's my favorite for webapps (but I'm not a fanatic about it...).



The advantage is that 99% of what you want in a webapp distro is located in the webroot directory without any extra files mixed in. There is no "list of specific includes/excludes" that you have to maintain to produce a war or simple distro zip.

For testing, just redirect your context doc root the the webroot directory.

FWIW, the existing build file can easily support this layout. Plus I've got some "stock" ant build files that handle creating distributions that would merge in easily with this.

(sound of flame retardent suit being zipped up...)

Comments, etc.

[originally posted on jforum.net by monroe]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Looks very good for me. Question: where do you suggest we put the upgrade scripts and other tools? (like search indexer, phpbb migration etc)

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tests, Tools, and www are always a "toss up" in my mind. In many ways, they are subprojects and not true "src" material. Probably leaving them at the top level would be fine.

In the case of tools, it would advertise their existence better than being in the src directory.

In the case of tests, I could see this eventually becoming a true subproject with it's own build/run script. E.g., something that created a test db, loaded it with test data, and then runs all the tests. Plus allows developers / testers to provide local info (like DB server info, etc).

And www is the same as these two.

Of course, if we wanted to make it easy for Maven addicts to play along (I'm NOT advocating converting to Maven...) We could use the Maven standard layout that looks like:



See http://www.javaworld.com/javaworld/jw-12-2005/jw-1205-maven.html for details.

In this case, tools and tests would live under src and the www (jforum.net site) would live in src/site. There is a slight attraction to this layout, but it buries things deeper.

As I said, I'm not a fanatic about layout...
[originally posted on jforum.net by monroe]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Although you do not want to advocate maven in your post, do you second the opinion of many others that it should be used?

About the www directory, it should be at the root directory because java.net's project page looks for it (well, it only looks for index.html, but all resources used by that page are also expected to be into www). So it's natural to put the website under www/website.



Output dirs are as follow:

- /src/main => /target/webapp/WEB-INF/classes
- /src/tests => /target/tests
- /src/tools => /target/tools
- /src/webapp => /target/webapp

The /src/lib is an auxiliar dir, where stuff like maven, ant, junit and etc are put into. If we are going wit the "Plugins" ideia, the core plugins could be put at /src/plugins directory, as /target/webapp/WEB-INF/classes as output dir.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Re: Maven use..

I've used Maven as a Apache Torque committer since that's the development environment. Even done some 1.0 plug-in modifications (and looked at some 2.0 plug-in mods).

Maven has some neat features and functions, but my first choice is still Ant.. Mostly due to the extra flexibility you get with it and the centralized documentation.

IMHO, Maven's big problem is that if you start to do anything "non-standard" you end up adding a fairly hefty subproject to your project with a bunch of extra coding in a hodge podge of Jelly "dialects" that are documented all over the place. Personally, I don't think it should take more than a hour or two to get any new special thing added to your build system... (of course all the Maven-ites will start clamoring that you shouldn't HAVE "non-standard" things or how easy it is to call Ant from Maven..).

However, they do have some good ideas on generic standardization, like directory structures... and if we use the Maven standard, Maven-ites can easily add in their maven xml's and project properties files and build jForum that way. So the Ant-people and Maven-ites can play together.
[originally posted on jforum.net by monroe]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I really don't like the directory structure Maven suggests. It is anything but logical.
Also, if the "only" thing maven would add to the project is an "easier" build, then I vote to keep it away and go with Ant.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I updated the JForum 3 CVS HEAD and added a section to our JForum 3 documentation named JForum 3 Directory Structure

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Rafael Steil wrote:I updated the JForum 3 CVS HEAD and added a section to our...



"Getting the source code" says JForum 3 is not in HEAD. Is HEAD JForum3 or 2.1.7 now?

"/src/configfiles" - I don't like "files" in the dir name, it is implicit. Why not say: "/src/otherconfig" or something to signify the "3rd party" aspect.
[originally posted on jforum.net by MyJForum]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HEAD is 2.1.7.

What name do you suggest for the config dir? "otherconfig" seems trick :P

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How about the Tomcat style: "conf" ?
[originally posted on jforum.net by andowson]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why not just /config ???

Simple....OK it's not all configs there...but what's the problem with this?
[originally posted on jforum.net by Guilherme Moreira]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Rafael Steil wrote:What name do you suggest for the config dir? "otherconfig" seems trick :P



What does trick mean? Perhaps you mean "tricky"? It can be just "config" if it never gets confused with the other config directory in WEB-INF.

Maybe you can setup a 3rd party directory for src files (and call it custom instead of other):

JForum/src/custom/config

But, why have the "configfiles" anyways? If I wanted to add a source file I would use (example):

JForum/src/com/mycompany/stuff/file.java
JForum/src/com/mycompany/stuff/configfile

P.S. - http://www.jforum.net/doc/JForum3DirectoryStructure has some spelling errors:

/webapp/WEB-INF/classess

etc.

[originally posted on jforum.net by MyJForum]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

MyJForum wrote:
What does trick mean? Perhaps you mean "tricky"? It can be just "config" if it never gets confused with the other config directory in WEB-INF.



yes, I meant "tricky". I don't like just "config" because the ambiguity. But custom/config seems nice.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I do beg all your pardon...

/upgrade

What's the use of it? Upgrade scripts from 2.1 branch?

I vote for Ant - No Maven. IMHO, KiSS. The problems Maven addresses are neither in short sight or far sight of JForum's development scope. Perhaps when we'd release JForum 10 with features like Voice Natural Recognition and Bayesian Self-Typed Text, that it will require a multitude of build.xml, we'll have problems enough for Maven.

D�rico Filho
[originally posted on jforum.net by dericofilho]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, any kind of upgrade scripts.

We'll go with Ant.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
What a stench! Central nervous system shutting down. Save yourself tiny ad!
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic