Java

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • Newbie

    1 answers - 3557 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    I am new to maven and have recently been tasked with migrating a project to
    maven.
    The project is a bit strange and has grown organically over time. There are
    quite a few things about how it is maintained a built that make it a bit
    perplexing when trying to map it into the maven world.
    I have a few concerns/questions if anybody out there has seen anything
    similar or has thoughts, I'd love the help/support.
    1) I am curious about deploying modules separately. The project
    contains many modules that are interrelated and are developed in tandem,
    however the project would rarely need to be built as a whole. In performing
    some testing/proof of concept work I was able to build a sub module fine,
    however when I went to release that sub module it complained about the
    parent not being released. Is there a way to release the parent pom without
    have to build all the children? I wouldn't mind doing this once but it could
    be an ordeal if you had to do it every time a dependency was added to the
    parent. In short, can a parent pom be released in isolation of it's members?
    2) The product in question has grown organically over time. Initially
    it was just one-off website for clients and using a "standard" jar file that
    grew with each website and wasn't version very well. Now that we are trying
    to productize the solution we have 1 repository that contains section with
    client specific code. ant script will build the application and overlay
    client specific files and configuration to produce a war file.
    As part of the migration to maven, I want to split this into 2 distinct
    steps. The first step would be an application build. Then second step would
    be the client specific class files, jsp files, and resources. The first step
    is pretty straight forward with maven. I would generate a war artifact with
    a bunch of standard files & resources. However when it comes to merging in
    the client code I become a bit stumped. Here are a few of my concerns &
    questions:
    a. Can I use uberwar to merge this local client files into a publish
    platform war?
    b. Can I dynamically set the artifactId? If not then I would need 1
    PM per client which probably wouldn't scale. In this event I may need to
    consider using ant for this step. Has anybody had to deal with this before?
    3) Another issue that I face is that the operations team expects us to
    give them war files that have the client requested context name as the name
    of the war file. This is a hinderance because it means we can't have the
    version # or artifactId in the file name. I have thought about generating
    composite artifacts, i.e. a jar or zip (if possible) that would contain two
    war files (production_context.war & demo_context.war). This "composite
    artifact" could have the version and artifactid in it.
    Does anybody have any examples of how you'd go about creating an artifact
    like this? I.E. Kick off a war process, then zip it up? If not zip, then
    jar? I'd also need to be able to control what stuff actually made it into
    the generated artifact.
    D-
    Douglas W. Ferguson
    EPSIIA - Another Fiserv Connection
    Development
    Phone: 512-329-0081 ext. 3309
    Dial Toll Free: 800-415-5946
    Mobile Phone: 512-293-7279
    Fax: 512-329-0086
    douglas.ferguson (AT) epsiia (DOT) com
    www.epsiia.com <http://www.epsiia.com/
  • No.1 | | 1813 bytes | |

    Hi Doug,

    Answered inline

    8/3/06, Douglas Ferguson <douglas.ferguson (AT) epsiia (DOT) comwrote:

    parent not being released. Is there a way to release the parent pom without
    have to build all the children? I wouldn't mind doing this once but it could
    be an ordeal if you had to do it every time a dependency was added to the
    parent. In short, can a parent pom be released in isolation of it's members?

    mvn -N will keep Maven from traversing into the submodules, so you can
    use mvn -N install to only install the parent pom without going into
    all the children and building/installing them.

    a. Can I use uberwar to merge this local client files into a publish
    platform war?

    Uberwar does not exist for M2. Take a look at Assembly plugin or take
    advantage of the ability of the WAR plugin to "overlay" wars.

    b. Can I dynamically set the artifactId? If not then I would need 1
    PM per client which probably wouldn't scale. In this event I may need to
    consider using ant for this step. Has anybody had to deal with this before?

    You might be able to pass artifactId as a property that is passed from
    command line or a profile file.

    Does anybody have any examples of how you'd go about creating an artifact
    like this? I.E. Kick off a war process, then zip it up? If not zip, then
    jar? I'd also need to be able to control what stuff actually made it into
    the generated artifact.

    The assembly plugin is your friend. you could try doing this with
    <finalNameinstead, but I think assembly is the right answer.

    Wayne

    To unsubscribe, e-mail: users-unsubscribe (AT) maven (DOT) apache.org
    For additional commands, e-mail: users-help (AT) maven (DOT) apache.org

Re: Newbie


max 4000 letters.
Your nickname that display:
In order to stop the spam: 4 + 3 =
QUESTION ON "Java"

EMSDN.COM