maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "khote" <kh...@mminternet.com>
Subject Re: Struts dependent artefacts
Date Wed, 03 Dec 2003 10:18:03 GMT
in my project root, I create a subdirectory called "entities" to store these
commonly included things.

In a subproject at the top of the project.xml

<!DOCTYPE project [
    <!ENTITY xdoclet-common     SYSTEM
"file:${basedir}/../entities/xdoclet-commons.ent">
    <!ENTITY commons-common     SYSTEM
"file:${basedir}/../entities/commons-commons.ent">
    <!ENTITY spring-common      SYSTEM
"file:${basedir}/../entities/spring-commons.ent">
    <!ENTITY jboss-common       SYSTEM
"file:${basedir}/../entities/jboss-commons.ent">
    <!ENTITY hibernate-common   SYSTEM
"file:${basedir}/../entities/hibernate-includejars-commons.ent">

]>

....
<dependencies>
  &xdoclet-common;
  &jboss-common;
</dependencies>

The only problem with this that I haven't resolved yet is that you must run
the subproject from the parent, for example:
cd /blah/parentprojectdirectory
maven -p subproject/project.xml java:compile

if you go into subproject and maven java:compile it will complain about not
finding the files.


----- Original Message ----- 
From: "Geddes, Mark (ANTS)" <mark.geddes@ants.co.uk>
To: "'Maven Users List'" <users@maven.apache.org>
Sent: Wednesday, December 03, 2003 2:13 AM
Subject: RE: Struts dependent artefacts


> Yes, but there is only one level of inheritance. I am declaring these
> dependencies in my project's top-level project.xml, and I have multiple
> sub-projects (ejbs, war, ear) which extend the top-level project.
> The problem is that I have several other J2EE projects with the same
> structure, and I am having to repeat this _logic_. I'm looking for an
> approach based on _composition_ rather than _inheritance_.
> Thanks anyway,
>
> Mark
>
> -----Original Message-----
> From: egglersim@post.ch [mailto:egglersim@post.ch]
> Sent: 03 December 2003 09:28
> To: users@maven.apache.org
> Subject: RE: Struts dependent artefacts
>
>
> You can inherit the dependecies from another project with the <extend>
> tag.
> Look at: http://maven.apache.org/reference/project-descriptor.html
>
> -----Original Message-----
> From: Geddes, Mark (ANTS) [mailto:mark.geddes@ants.co.uk]
> Sent: Mittwoch, 3. Dezember 2003 10:13
> To: 'users@maven.apache.org'
> Subject: Struts dependent artefacts
>
>
> Hi,
> Apologies if this has been asked before - I searched the archives but
> didn't
> find the answer I was looking for. I am in the process of migrating
> several
> projects from an in-house build system to the excellent Maven. We tend
> to
> package everything as EAR archives, and we make extensive use of Struts.
> The
> in-house system leans heavily on the ideas from 'Java Development with
> Ant'
> (Hatcher, Loughran), specifically we store versions of Struts in version
> specific directories. So a 'struts-1.1' directory will contain all the
> jars
> and tlds for that version. The Ant script will copy all the runtime
> required
> jars and tlds from the directory into the appropriate build area. The
> version is controlled through a property, so migrating between versions
> has
> been seamless.
> I am now using Maven's dependency mechanism, and have come up with
> something
> like this for Struts-1.1:
>
> <dependency>
> <groupId>struts</groupId>
> <artifactId>struts</artifactId>
> <version>1.1</version>
> <properties>
> <ear.bundle>true</ear.bundle>
> </properties>
> </dependency>
> <dependency>
> <groupId>struts</groupId>
> <artifactId>struts-logic</artifactId>
> <version>1.1</version>
> <type>tld</type>
> <properties>
> <war.bundle>true</war.bundle>
> </properties>
> </dependency>
> <dependency>
> <groupId>struts</groupId>
> <artifactId>struts-bean</artifactId>
> <version>1.1</version>
> <type>tld</type>
> <properties>
> <war.bundle>true</war.bundle>
> </properties>
> </dependency>
> <dependency>
> <groupId>struts</groupId>
> <artifactId>struts-html</artifactId>
> <version>1.1</version>
> <type>tld</type>
> <properties>
> <war.bundle>true</war.bundle>
> </properties>
> </dependency>
> <dependency>
> <groupId>struts</groupId>
> <artifactId>struts-nested</artifactId>
> <version>1.1</version>
> <type>tld</type>
> <properties>
> <war.bundle>true</war.bundle>
> </properties>
> </dependency>
> <dependency>
> <groupId>struts</groupId>
> <artifactId>struts-template</artifactId>
> <version>1.1</version>
> <type>tld</type>
> <properties>
> <war.bundle>true</war.bundle>
> </properties>
> </dependency>
> <dependency>
> <groupId>struts</groupId>
> <artifactId>struts-tiles</artifactId>
> <version>1.1</version>
> <type>tld</type>
> <properties>
> <war.bundle>true</war.bundle>
> </properties>
> </dependency>
> <dependency>
> <groupId>commons-beanutils</groupId>
> <artifactId>commons-beanutils</artifactId>
> <version>1.6</version>
> <properties>
> <ear.bundle>true</ear.bundle>
> </properties>
> </dependency>
> <dependency>
> <groupId>commons-digester</groupId>
> <artifactId>commons-digester</artifactId>
> <version>1.5</version>
> <properties>
> <ear.bundle>true</ear.bundle>
> </properties>
> </dependency>
> <dependency>
> <groupId>commons-collections</groupId>
> <artifactId>commons-collections</artifactId>
> <version>2.1</version>
> <properties>
> <ear.bundle>true</ear.bundle>
> </properties>
> </dependency>
> <dependency>
> <groupId>commons-fileupload</groupId>
> <artifactId>commons-fileupload</artifactId>
> <version>1.0</version>
> <properties>
> <ear.bundle>true</ear.bundle>
> </properties>
> </dependency>
> <dependency>
> <groupId>commons-logging</groupId>
> <artifactId>commons-logging</artifactId>
> <version>1.0.3</version>
> <properties>
> <ear.bundle>true</ear.bundle>
> </properties>
> </dependency>
> <dependency>
> <groupId>commons-lang</groupId>
> <artifactId>commons-lang</artifactId>
> <version>1.0.1</version>
> <properties>
> <ear.bundle>true</ear.bundle>
> </properties>
> </dependency>
> <dependency>
> <groupId>commons-validator</groupId>
> <artifactId>commons-validator</artifactId>
> <version>1.0.2</version>
> <properties>
> <ear.bundle>true</ear.bundle>
> </properties>
> </dependency>
> <dependency>
> <groupId>oro</groupId>
> <artifactId>oro</artifactId>
> <version>2.0.6</version>
> <properties>
> <ear.bundle>true</ear.bundle>
> </properties>
> </dependency>
>
> This is fine. The problem is that I have to duplicate this for each
> project.
> Is there a simple way to re-use this _logic_ across multiple projects,
> or am
> I heading up the wrong path?
> Any ideas gratefully received.
>
> Mark
>
>
> ************************************************************************
> ***
> This communication (including any attachments) contains confidential
> information.  If you are not the intended recipient and you have
> received this communication in error, you should destroy it without
> copying, disclosing or otherwise using its contents.  Please notify the
> sender immediately of the error.
>
> Internet communications are not necessarily secure and may be
> intercepted or changed after they are sent.  Abbey National Treasury
> Services plc does not accept liability for any loss you may suffer as a
> result of interception or any liability for such changes.  If you wish
> to confirm the origin or content of this communication, please contact
> the sender by using an alternative means of communication.
>
> This communication does not create or modify any contract and, unless
> otherwise stated, is not intended to be contractually binding.
>
> Abbey National Treasury Services plc. Registered Office:  Abbey National
> House, 2 Triton Square, Regents Place, London NW1 3AN.  Registered in
> England under Company Registration Number: 2338548.  Regulated by the
> Financial Services Authority (FSA).
> ************************************************************************
> ***
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
***************************************************************************
> This communication (including any attachments) contains confidential
information.  If you are not the intended recipient and you have received
this communication in error, you should destroy it without copying,
disclosing or otherwise using its contents.  Please notify the sender
immediately of the error.
>
> Internet communications are not necessarily secure and may be intercepted
or changed after they are sent.  Abbey National Treasury Services plc does
not accept liability for any loss you may suffer as a result of interception
or any liability for such changes.  If you wish to confirm the origin or
content of this communication, please contact the sender by using an
alternative means of communication.
>
> This communication does not create or modify any contract and, unless
otherwise stated, is not intended to be contractually binding.
>
> Abbey National Treasury Services plc. Registered Office:  Abbey National
House, 2 Triton Square, Regents Place, London NW1 3AN.  Registered in
England under Company Registration Number: 2338548.  Regulated by the
Financial Services Authority (FSA).
>
***************************************************************************
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message