Hi,

I'd put myself in the novice group considering maven, but after I recently
switched from Ant to maven I'd try to give you some basic stuff:

1) with maven you build your modules (in maven lingo artifacts) and install
them to a repository - this must not be additional product - every user has
its own repository, obeying the maven layout

2) you are referencing the artifacts from the repository in your classpath
and NOT the eclipse projects even the m2e plugin does the magic to reflect
the workspace changes. But this is eclipse / m2e specific. So, if you have
a dependency on some.groupId:some-artifactId:1.0-SNAPSHOT this dependency
will be searched in the repository, so if you never had run mvn install on
the dependend artifact you'll get an error - dependency
some.groupId:some-artifactId:1.0-SNAPSHOT - artifact not found

3) making release could require some maven plugin(s) - for example take a
look at the maven assembly plugin[1]. For example, our project has a fat
client, which is deployed as Java WebStart app and the server component is
delivered as EAR. The web-project must contain the build artifacts for the
Java WebStart. In order to accomplish this I have to use the maven java
webstart plugin and some execution goals with the dependency plugin. To
sign the client app I have to use maven-jar-plugin.

Don't worry - it sounds difficult but you can plenty of examples on the
maven site as well as googling for some problem

Hope this helps for the moment

[1] https://maven.apache.org/plugins/maven-assembly-plugin/





On Tue, Nov 20, 2012 at 12:31 PM, Shumail Arshad <[email protected]>wrote:

> Hello Rafal,
>
> Thanks for your email.
>
> And thanks for pointing out that I am doing something wrong. Can you
> please point me to some study material or anything which explains me
> standard way of using maven. I am unable to understand how will I be able
> to package the release if I build each project into its own eclipse folder.
>
> Can you please tell me what is the best way to use maven.. ? I will be
> extremely happy if you can send me a dummy example whicb can used in large
> scale multip module application.
>
> Thanks
> Shumail
> On Nov 20, 2012 11:10 AM, "Rafał Krzewski" <[email protected]>
> wrote:
>
>>  You are using Maven in completely non-standard way. Buliding two
>> projects into the same directory is can fail in many "interesting" ways,
>> and I can't even imagine the mess resulting from mixing a 100 builds!
>> This is definetely not something that Maven or m2e developers would
>> endorse or support. There are many clean & workable solutions to
>> application launching & classpath management. Sorry buddy, but you are
>> doing it wrong.
>>
>> Cheers,
>> Rafał
>>
>> On 11/19/2012 05:52 PM, Shumail Arshad wrote:
>>
>> Sorry, I just gave an example. But your statement below is worrying for
>> me. Why can't I specify a non-default directory, which does not exist in
>> the project. What If I have 100 projects and I want to build all of them in
>> the same directory so that classpath can be specified to single libs folder.
>>
>>  "You can use any non-default directory for your project, in m2e, as long
>> as it's located under your project."
>>
>>
>>
>> _______________________________________________
>> m2e-users mailing list
>> [email protected]
>> https://dev.eclipse.org/mailman/listinfo/m2e-users
>>
>>
> _______________________________________________
> m2e-users mailing list
> [email protected]
> https://dev.eclipse.org/mailman/listinfo/m2e-users
>
>
_______________________________________________
m2e-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/m2e-users

Reply via email to