You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by AK-47 <ak...@gmail.com> on 2011/12/07 13:43:44 UTC

Building war for different project structure from maven j2ee statndard one

Hi

i want to create any EAR build which suppose to have web module as well
but my issue is i am having different folder sturcture then the standard
given by maven

i have java source and web module in two different folders, usually it
happens as in java web project (WTP)

<root>
POM-1
    <F1>
       POM-2
            <JavaModule>
                 POM-3
             <WebContent>
                  POM-4

POM-1 for just aggregation with build - POM
POM-2 for creating EAR
POM-4 for creating WAR module

I wish to get comipled java files from folder <java module> to war build to
POM-4

i don't know what to do between  <JavaModule> POM-3 and <WebContent> POM-4
to get java source inside war module

please help to advice a smalll maven trick to solve the issue
Thanks

--
View this message in context: http://maven.40175.n5.nabble.com/Building-war-for-different-project-structure-from-maven-j2ee-statndard-one-tp5055483p5055483.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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


Re: Building war for different project structure from maven j2ee statndard one

Posted by Stephen Connolly <st...@gmail.com>.
if you are not allowed to change the web app structure in any way, don't
use maven... use ant.

maven is opinionated... maven's opinion is the structure you want to follow
is a load of rubbish... maven will fight you all the way... and any time
you fight maven, you will loose.

btw. with some minor tweaks, your webapp structure could be not so rubbish,
but you seem adamant that the structure is set in stone... i suspect it is
not as rigidly fixed as you think... for example, a jar in web-inf/lib is
equivalent to the contents of that jar in web-inf/classes (unless you have
duplicate classes on your classpath... but that is a bug you need to
fix)... so what was being suggested about adding the dependencies will
"just work" unless your application is breaking all the rules about writing
good java apps... and part of maven's opinionated nature is to help people
follow best practices... so maven will only be your friend if you are
prepared to write your application the right way. (in general i find it is
quicker to write applications the right way with maven, than the wrong way
without maven)

- Stephen

---
Sent from my Android phone, so random spelling mistakes, random nonsense
words and other nonsense are a direct result of using swype to type on the
screen
On 8 Dec 2011 04:50, "AK-47" <ak...@gmail.com> wrote:

> Hi
>
> i want to make me more clear
>
> setting only deppendencies will not work,
> i got full java source com.comp.abc in JavaModule
> i want to get WAR to be done WebContent module
> so i need all complied java class files must be available in WebContent
> before building was
>
> now the question here is -
> 1) first how get all comipled classes
> 2.) how to place them WebContent module so that in war build these must be
> included in WEB-INF
> \classes folder
>
> the situation with me is i am not working with default maven web project
> structure
> I have java web project structure which i m not allowed to change
> i need some way to locate java source files for compiling to build war
> along
> with java classes files
>
> Plz help me to get solve this
>
> Thanks
>
> --
> View this message in context:
> http://maven.40175.n5.nabble.com/Building-war-for-different-project-structure-from-maven-j2ee-statndard-one-tp5055483p5057701.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Building war for different project structure from maven j2ee statndard one

Posted by AK-47 <ak...@gmail.com>.
Hi

i want to make me more clear

setting only deppendencies will not work,
i got full java source com.comp.abc in JavaModule
i want to get WAR to be done WebContent module
so i need all complied java class files must be available in WebContent
before building was

now the question here is -
1) first how get all comipled classes
2.) how to place them WebContent module so that in war build these must be
included in WEB-INF
\classes folder

the situation with me is i am not working with default maven web project
structure
I have java web project structure which i m not allowed to change
i need some way to locate java source files for compiling to build war along
with java classes files

Plz help me to get solve this

Thanks

--
View this message in context: http://maven.40175.n5.nabble.com/Building-war-for-different-project-structure-from-maven-j2ee-statndard-one-tp5055483p5057701.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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


Re: Building war for different project structure from maven j2ee statndard one

Posted by Cai Wei <jn...@gmail.com>.
I am not sure I have caught you very well, but to my understanding, by
setting POM-3 as one of POM-4's dependencies would get java source in POM-3
inside war module (POM-4).

Hope it helps.

2011/12/7 AK-47 <ak...@gmail.com>

> Hi
>
> i want to create any EAR build which suppose to have web module as well
> but my issue is i am having different folder sturcture then the standard
> given by maven
>
> i have java source and web module in two different folders, usually it
> happens as in java web project (WTP)
>
> <root>
> POM-1
>    <F1>
>       POM-2
>            <JavaModule>
>                 POM-3
>             <WebContent>
>                  POM-4
>
> POM-1 for just aggregation with build - POM
> POM-2 for creating EAR
> POM-4 for creating WAR module
>
> I wish to get comipled java files from folder <java module> to war build to
> POM-4
>
> i don't know what to do between  <JavaModule> POM-3 and <WebContent> POM-4
> to get java source inside war module
>
> please help to advice a smalll maven trick to solve the issue
> Thanks
>
> --
> View this message in context:
> http://maven.40175.n5.nabble.com/Building-war-for-different-project-structure-from-maven-j2ee-statndard-one-tp5055483p5055483.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>