Maven Configuration in Eclipse

View: New views
11 Messages — Rating Filter:   Alert me  

Maven Configuration in Eclipse

by Exposito Aguilera, Francisco :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

I have a Maven installed in a linux Server and there is the local
repository.

Then I have my Eclipse in a Windows system.

How can I configure m2eclipse in order to search inside the linux
repository?

Thanks a lot.

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


Re: Maven Configuration in Eclipse

by valentin_jacquemin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

You should specify the repository location either in your pom.xml or in
settings like that:

<repository>
  <id>maven2-repository.dev.java.net</id>
  <name>Java.net Repository for Maven</name>
  <url>http://download.java.net/maven/2/</url>
 </repository>

Adapt basing on your environment.
Regards,

Valentin Jacquemin


On Wed, Nov 4, 2009 at 10:28 AM, Exposito Aguilera, Francisco <
francisco.exposito@...> wrote:

> Hello,
>
> I have a Maven installed in a linux Server and there is the local
> repository.
>
> Then I have my Eclipse in a Windows system.
>
> How can I configure m2eclipse in order to search inside the linux
> repository?
>
> Thanks a lot.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>

Parent Message unknown RE: Maven Configuration in Eclipse

by Exposito Aguilera, Francisco :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

But I want (if it is possible) to configure it in Eclipse options, not in
the POM file because then I have to modify every project.

After installing m2Eclipse a new Maven option is created inside
Window-->Preferences.

If I go to Maven Installations, I have to select where my Maven is installed
and the user settings location. And both locations ask me for a path.

May I use samba and add share the location where is Maven installed?

Can I define an URL anywhere?

Thanks



-----Mensaje original-----
De: Valentin Jacquemin [mailto:jacqueminv@...]
Enviado el: miércoles, 04 de noviembre de 2009 10:45
Para: Maven Users List
Asunto: Re: Maven Configuration in Eclipse

You should specify the repository location either in your pom.xml or in
settings like that:

<repository>
  <id>maven2-repository.dev.java.net</id>
  <name>Java.net Repository for Maven</name>
  <url>http://download.java.net/maven/2/</url>
 </repository>

Adapt basing on your environment.
Regards,

Valentin Jacquemin


On Wed, Nov 4, 2009 at 10:28 AM, Exposito Aguilera, Francisco <
francisco.exposito@...> wrote:

> Hello,
>
> I have a Maven installed in a linux Server and there is the local
> repository.
>
> Then I have my Eclipse in a Windows system.
>
> How can I configure m2eclipse in order to search inside the linux
> repository?
>
> Thanks a lot.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>

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


Re: Maven Configuration in Eclipse

by valentin_jacquemin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> But I want (if it is possible) to configure it in Eclipse options, not in
the POM file because then I have to modify every project.
Put the repository in the settings.xml of maven instead of the pom and it
will be set for your general maven setup not only for one project. From the
maven doc:

You can set this in your settings.xml file to globally use a certain mirror,
however note that it is common for a project to customise the repository in
their pom.xml and that your setting will take precedence. If you find that
dependencies are not being found, check you have not overridden the remote
repository.

http://maven.apache.org/guides/introduction/introduction-to-repositories.html

Hope it helped,
Valentin Jacquemin


On Wed, Nov 4, 2009 at 11:02 AM, Exposito Aguilera, Francisco <
francisco.exposito@...> wrote:

> But I want (if it is possible) to configure it in Eclipse options, not in
> the POM file because then I have to modify every project.
>
> After installing m2Eclipse a new Maven option is created inside
> Window-->Preferences.
>
> If I go to Maven Installations, I have to select where my Maven is
> installed
> and the user settings location. And both locations ask me for a path.
>
> May I use samba and add share the location where is Maven installed?
>
> Can I define an URL anywhere?
>
> Thanks
>
>
>
> -----Mensaje original-----
> De: Valentin Jacquemin [mailto:jacqueminv@...]
> Enviado el: miércoles, 04 de noviembre de 2009 10:45
> Para: Maven Users List
> Asunto: Re: Maven Configuration in Eclipse
>
> You should specify the repository location either in your pom.xml or in
> settings like that:
>
> <repository>
>  <id>maven2-repository.dev.java.net</id>
>  <name>Java.net Repository for Maven</name>
>  <url>http://download.java.net/maven/2/</url>
>  </repository>
>
> Adapt basing on your environment.
> Regards,
>
> Valentin Jacquemin
>
>
> On Wed, Nov 4, 2009 at 10:28 AM, Exposito Aguilera, Francisco <
> francisco.exposito@...> wrote:
>
> > Hello,
> >
> > I have a Maven installed in a linux Server and there is the local
> > repository.
> >
> > Then I have my Eclipse in a Windows system.
> >
> > How can I configure m2eclipse in order to search inside the linux
> > repository?
> >
> > Thanks a lot.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@...
> > For additional commands, e-mail: users-help@...
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>

Re: Maven Configuration in Eclipse

by Jouko Johansson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Have you tried configuring mirror to user's settings.xml

-> http://maven.apache.org/settings.html#Mirrors



On Wed, Nov 4, 2009 at 12:02 PM, Exposito Aguilera, Francisco <
francisco.exposito@...> wrote:

> But I want (if it is possible) to configure it in Eclipse options, not in
> the POM file because then I have to modify every project.
>
> After installing m2Eclipse a new Maven option is created inside
> Window-->Preferences.
>
> If I go to Maven Installations, I have to select where my Maven is
> installed
> and the user settings location. And both locations ask me for a path.
>
> May I use samba and add share the location where is Maven installed?
>
> Can I define an URL anywhere?
>
> Thanks
>
>
>
> -----Mensaje original-----
> De: Valentin Jacquemin [mailto:jacqueminv@...]
> Enviado el: miércoles, 04 de noviembre de 2009 10:45
> Para: Maven Users List
> Asunto: Re: Maven Configuration in Eclipse
>
> You should specify the repository location either in your pom.xml or in
> settings like that:
>
> <repository>
>  <id>maven2-repository.dev.java.net</id>
>  <name>Java.net Repository for Maven</name>
>  <url>http://download.java.net/maven/2/</url>
>  </repository>
>
> Adapt basing on your environment.
> Regards,
>
> Valentin Jacquemin
>
>
> On Wed, Nov 4, 2009 at 10:28 AM, Exposito Aguilera, Francisco <
> francisco.exposito@...> wrote:
>
> > Hello,
> >
> > I have a Maven installed in a linux Server and there is the local
> > repository.
> >
> > Then I have my Eclipse in a Windows system.
> >
> > How can I configure m2eclipse in order to search inside the linux
> > repository?
> >
> > Thanks a lot.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@...
> > For additional commands, e-mail: users-help@...
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>


--
--------------------------------------------------
Jouko Johansson

Parent Message unknown RE: Maven Configuration in Eclipse

by Exposito Aguilera, Francisco :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm a little bit lost (and new in Maven)... Maybe I explain what I finally
want...

1) Linux server:

        - Apache Maven
        - Nexus
        - A new corporate repository in order to have the jars we use in all
projects.

2) Windows
        - Eclipse with m2eclipse


Functionality:

1) All eclipse developers needs to access only to corporate repository.

2) If they add in the pom a dependency which is not in the corporate
repository, then Nexus must copy it to the corporate repository and then the
user will have access to it.


Is it possible? If it is... could you explain the steps to do it (more or
less)



Also I don't know if my idea of this corporate repository is the same as the
local repository or if there is a local repository for every developer...

I am open to other ideas.


Thanks

-----Mensaje original-----
De: Jouko Johansson [mailto:joukojo@...]
Enviado el: miércoles, 04 de noviembre de 2009 11:40
Para: Maven Users List
Asunto: Re: Maven Configuration in Eclipse

Have you tried configuring mirror to user's settings.xml

-> http://maven.apache.org/settings.html#Mirrors



On Wed, Nov 4, 2009 at 12:02 PM, Exposito Aguilera, Francisco <
francisco.exposito@...> wrote:

> But I want (if it is possible) to configure it in Eclipse options, not in
> the POM file because then I have to modify every project.
>
> After installing m2Eclipse a new Maven option is created inside
> Window-->Preferences.
>
> If I go to Maven Installations, I have to select where my Maven is
> installed
> and the user settings location. And both locations ask me for a path.
>
> May I use samba and add share the location where is Maven installed?
>
> Can I define an URL anywhere?
>
> Thanks
>
>
>
> -----Mensaje original-----
> De: Valentin Jacquemin [mailto:jacqueminv@...]
> Enviado el: miércoles, 04 de noviembre de 2009 10:45
> Para: Maven Users List
> Asunto: Re: Maven Configuration in Eclipse
>
> You should specify the repository location either in your pom.xml or in
> settings like that:
>
> <repository>
>  <id>maven2-repository.dev.java.net</id>
>  <name>Java.net Repository for Maven</name>
>  <url>http://download.java.net/maven/2/</url>
>  </repository>
>
> Adapt basing on your environment.
> Regards,
>
> Valentin Jacquemin
>
>
> On Wed, Nov 4, 2009 at 10:28 AM, Exposito Aguilera, Francisco <
> francisco.exposito@...> wrote:
>
> > Hello,
> >
> > I have a Maven installed in a linux Server and there is the local
> > repository.
> >
> > Then I have my Eclipse in a Windows system.
> >
> > How can I configure m2eclipse in order to search inside the linux
> > repository?
> >
> > Thanks a lot.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@...
> > For additional commands, e-mail: users-help@...
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>


--
--------------------------------------------------
Jouko Johansson

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


RE: Maven Configuration in Eclipse

by Jörg Schaible-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

fist you have to understand that you cannot really share the settings.xml.
All you can do is, that you provide a template that can be copied by the
users and should be stored in the default location "<userhome>/.m2/".

Exposito Aguilera, Francisco wrote at Mittwoch, 4. November 2009 12:30:

> I'm a little bit lost (and new in Maven)... Maybe I explain what I finally
> want...
>
> 1) Linux server:
>
> - Apache Maven
> - Nexus
> - A new corporate repository in order to have the jars we use in all
> projects.
>
> 2) Windows
> - Eclipse with m2eclipse
>
>
> Functionality:
>
> 1) All eclipse developers needs to access only to corporate repository.

This can be achieved by the mirror configuration in the settings.xml as
already pointed out with your Nexus installation as replacement for
central.

> 2) If they add in the pom a dependency which is not in the corporate
> repository, then Nexus must copy it to the corporate repository and then
> the user will have access to it.

With the local settings above, it will work this way.
 
> Is it possible? If it is... could you explain the steps to do it (more or
> less)
>
> Also I don't know if my idea of this corporate repository is the same as
> the local repository

No. The corporate repo is managed by Nexus only.

> or if there is a local repository for every
> developer...

Yes, and it cannot be shared. A user should be able to delete his local repo
at any time and get anything again from Nexus again.

> I am open to other ideas.

Cheers,
Jörg


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


RE: RE: Maven Configuration in Eclipse

by Todd Thiessen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> fist you have to understand that you cannot really share the
> settings.xml.

It is easier to share the global settings.xml file (the one found in the
/conf directory of you maven installation. You can put all the corporate
repo information in the global settings.xml file location and this file
could then be shared as is across all developers. Any information
specific to the developer (like passwords) would go into the local
settings.xml file.

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


Parent Message unknown RE: Maven Configuration in Eclipse

by Exposito Aguilera, Francisco :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

How can I create the corporate repository?

Is it a new web project in Tomcat? How must I define it?


-----Mensaje original-----
De: news [mailto:news@...] En nombre de Jörg Schaible
Enviado el: miércoles, 04 de noviembre de 2009 13:03
Para: users@...
Asunto: RE: Maven Configuration in Eclipse

Hi,

fist you have to understand that you cannot really share the settings.xml.
All you can do is, that you provide a template that can be copied by the
users and should be stored in the default location "<userhome>/.m2/".

Exposito Aguilera, Francisco wrote at Mittwoch, 4. November 2009 12:30:

> I'm a little bit lost (and new in Maven)... Maybe I explain what I finally
> want...
>
> 1) Linux server:
>
> - Apache Maven
> - Nexus
> - A new corporate repository in order to have the jars we use in all
> projects.
>
> 2) Windows
> - Eclipse with m2eclipse
>
>
> Functionality:
>
> 1) All eclipse developers needs to access only to corporate repository.

This can be achieved by the mirror configuration in the settings.xml as
already pointed out with your Nexus installation as replacement for
central.

> 2) If they add in the pom a dependency which is not in the corporate
> repository, then Nexus must copy it to the corporate repository and then
> the user will have access to it.

With the local settings above, it will work this way.
 
> Is it possible? If it is... could you explain the steps to do it (more or
> less)
>
> Also I don't know if my idea of this corporate repository is the same as
> the local repository

No. The corporate repo is managed by Nexus only.

> or if there is a local repository for every
> developer...

Yes, and it cannot be shared. A user should be able to delete his local repo
at any time and get anything again from Nexus again.

> I am open to other ideas.

Cheers,
Jörg


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

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


Parent Message unknown RE: Maven Configuration in Eclipse

by Exposito Aguilera, Francisco :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Suppose I use the same computer for server and client, right now.

I've created a Hosted repository in Nexus, where the repository path is
http://localhost:8081/nexus/content/repositories/ISS


Then I've used the embedded maven installation inside eclipse and defined
the user settings like that:

<settings>
  <mirrors>
    <mirror>
      <id>nexus</id>
      <mirrorOf>*</mirrorOf>
          <url>http://localhost:8081/nexus/content/repositories/ISS/</url>
    </mirror>
  </mirrors>
  <profiles>
    <profile>
      <id>nexus</id>
      <repositories>
        <repository>
          <id>central</id>
          <url>http://central</url>
          <releases><enabled>true</enabled></releases>
          <snapshots><enabled>true</enabled></snapshots>
        </repository>
      </repositories>
     <pluginRepositories>
        <pluginRepository>
          <id>central</id>
          <url>http://central</url>
          <releases><enabled>true</enabled></releases>
          <snapshots><enabled>true</enabled></snapshots>
        </pluginRepository>
      </pluginRepositories>
    </profile>
  </profiles>
  <activeProfiles>
    <activeProfile>nexus</activeProfile>
  </activeProfiles>
</settings>

But when I try to use an artefact which is not in that repository, it is not
downloaded from anywhere.

And if I add this URL to a group repository, the artefact is downloaded to
the local repository, not to the ISS repository.

What I am doing wrong?

I've tried Archiva and in order to solve it I had to add a proxy connector
to ISS repository. But I don't know how to do it in Nexus.

The other option is to use Archiva, but I like too much from Nexus that I
can search in all remote repositories if I activate "Download Remote
Indexes". And I haven't found this option in Archiva...

Thanks in advance.

-----Mensaje original-----
De: Exposito Aguilera, Francisco
Enviado el: miércoles, 04 de noviembre de 2009 14:36
Para: 'Maven Users List'
Asunto: RE: Maven Configuration in Eclipse

How can I create the corporate repository?

Is it a new web project in Tomcat? How must I define it?


-----Mensaje original-----
De: news [mailto:news@...] En nombre de Jörg Schaible
Enviado el: miércoles, 04 de noviembre de 2009 13:03
Para: users@...
Asunto: RE: Maven Configuration in Eclipse

Hi,

fist you have to understand that you cannot really share the settings.xml.
All you can do is, that you provide a template that can be copied by the
users and should be stored in the default location "<userhome>/.m2/".

Exposito Aguilera, Francisco wrote at Mittwoch, 4. November 2009 12:30:

> I'm a little bit lost (and new in Maven)... Maybe I explain what I finally
> want...
>
> 1) Linux server:
>
> - Apache Maven
> - Nexus
> - A new corporate repository in order to have the jars we use in all
> projects.
>
> 2) Windows
> - Eclipse with m2eclipse
>
>
> Functionality:
>
> 1) All eclipse developers needs to access only to corporate repository.

This can be achieved by the mirror configuration in the settings.xml as
already pointed out with your Nexus installation as replacement for
central.

> 2) If they add in the pom a dependency which is not in the corporate
> repository, then Nexus must copy it to the corporate repository and then
> the user will have access to it.

With the local settings above, it will work this way.
 
> Is it possible? If it is... could you explain the steps to do it (more or
> less)
>
> Also I don't know if my idea of this corporate repository is the same as
> the local repository

No. The corporate repo is managed by Nexus only.

> or if there is a local repository for every
> developer...

Yes, and it cannot be shared. A user should be able to delete his local repo
at any time and get anything again from Nexus again.

> I am open to other ideas.

Cheers,
Jörg


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

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

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


Re: Maven Configuration in Eclipse

by Wayne Fay :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> I've tried Archiva and in order to solve it I had to add a proxy connector
> to ISS repository. But I don't know how to do it in Nexus.

Nexus questions should generally be sent to the Nexus Users list...
http://nexus.sonatype.org/dev/mailing-lists.html

Wayne

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