[MAGNOLIA-204] adapt project layout to maven/jakarta standards Created: 22/Nov/04  Updated: 14/Jan/05  Resolved: 14/Jan/05

Status: Closed
Project: Magnolia
Component/s: build
Affects Version/s: 2.01
Fix Version/s: 2.01

Type: Improvement Priority: Minor
Reporter: Fabrizio Giustina Assignee: Fabrizio Giustina
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File project.properties     XML File project.xml    
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Date of First Response:

 Description   

In order to support maven in future, or just to provide a more standard directory layout (see apache and jakarta project), I would suggest to slightly change the project layout in svn.

suggested changes:

  • move /src to /src/main. Rationale: allow a common src directory which can host in future "different kind" of sources, mainly junit tests ("src/test") or resources ("src/resources")
  • move /applications/webapps/magnolia to /src/webapp. Rationale: clearly separate source files from generated files (everything is a source file goes into /src, everything is a generated file goes into /target)
  • fix ant build.xml and idea project in order to compile classes to /target/classes instead of /classes. Rationale: separate generated files and allow a common path for different kind of artifacts (classes, junit tests, war, distributions).

See also http://maven.apache.org/reference/dirlayout.html
note that this directory layout is not required by maven but it's the suggested one derived by best-practices.



 Comments   
Comment by Boris Kraft [ 23/Nov/04 ]

I think it makes sense, even independently from maven.

Comment by Fabrizio Giustina [ 24/Nov/04 ]

Just to let you give it a try, I'm uploading a working maven pom to test maven after the changes in project layout previously listed.

You will only need to fix the project layout, copy project.xml and project.properties in the root folter and you should be able to run maven:war to compile classes and generate magnolia war.

Dependencies still need to be cleaned up, here I added the jars in svn plus some of the jars in the magnolia 2.0 distribution (probably some of them can be removed).

Comment by Fabrizio Giustina [ 24/Nov/04 ]

project.properties, needed for jar override and for repository locations

Comment by Sameer Charles [ 24/Nov/04 ]

Great!

ll change it to

trunk
– src
---- main
---- webapp
---- test

Comment by Andreas Brenk [ 24/Nov/04 ]

I think the servlet API shouldn't be bundled as the servlet container will provide it.

Just removen the <properties> section in project.xml:

<dependency>
<groupId>servletapi</groupId>
<artifactId>servletapi</artifactId>
<version>2.3</version>
<type>jar</type>
REMOVE <properties>
REMOVE <war.bundle>true</war.bundle>
REMOVE </properties>
</dependency>

Why is ant bundled into the .war? Possibly remove it, too.

Comment by Sameer Charles [ 24/Nov/04 ]

changed the project layout on svn.

– Haven't tested maven files yet

Comment by Ortwin Glueck [ 26/Nov/04 ]

Nice work. Only you probably don't want to war-bundle servletapi.

Comment by Fabrizio Giustina [ 14/Jan/05 ]

closing, project layout has already been changed in svn

Generated at Mon Feb 12 03:15:07 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.