You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by NunoM <nu...@hotmail.com> on 2012/04/05 02:21:17 UTC

Maven Repository

Hello everyone,

I'm a new user to Apache Maven and Apache Shiro.

I'm doing a tutorial, but before starting it, I need to add
https://repository.apache.org/content/groups/snapshots-group/ to my
settings.xml. (I need shiro core 1.2.0 snapshot.jar)

Can anyone tell me how to that correctly?

I've never used maven before, and even with the documentation, I feel lost.

Thanks in advance,
Nuno.



--
View this message in context: http://maven.40175.n5.nabble.com/Maven-Repository-tp5619256p5619256.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: Maven Repository

Posted by Barrie Treloar <ba...@gmail.com>.
On Thu, Apr 5, 2012 at 10:11 AM, NunoM <nu...@hotmail.com> wrote:
> Hello,
>
> Yes. I already spent some time reading the documentation.
>
> And I thought I had understood it well.
>
> I've already added the server tag and necessary permissions that are located
> in the readme.txt on the website.
>
> Which is:  http://maven.40175.n5.nabble.com/file/n5619282/settings.xml
> settings.xml
>
> I'm not trying to look for a shortcut, just for a little help. :)
>
> These are all new concepts to me, I'm getting there little by little.

Its good that you are the docs, the books will be your best source of
understanding, followed by some experimentation.

> But then one doubt came to my mind.
>
> 1. Do I need to create a profile tag in my settings. xml and then create the
> repository inside?

You will find the more repository definitions you have the slower your
Maven build will become, because Maven needs to check EVERY repository
to see if there is a newer version of the artifact.

So its often better to put repository definitions inside a profile so
that you can turn on just the ones you need, when you need them.

The next best thing is to your a Repository Manager, this way you
define a mirror that points everything at your Repository Manager.
This way you no longer need to define extra repositories in Maven and
now there is only one network call to make to your Repository Manager.
The other benefit is that if you are working with others locally they
can share the Repository Manager to speed up downloading artifacts.
Its still a good idea to install one, even if you work by yourself,
because Maven only connects once to the Repository Manager, but also
if you are on a laptop you can work disconnected from the internet
much more easily.

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


RE: Maven Repository

Posted by Jim McCaskey <ji...@pervasive.com>.
FWIW, 

My guess is something like below will work if you want to get 1.3.0-SNAPSHOT jar.  Having said that, you specifically said 1.2.0-SNAPSHOT jar's.  Those don't appear to exist anymore as 1.2.0 has been shipped.

https://repository.apache.org/content/repositories/snapshots-group/org/apache/shiro/shiro-core/1.2.0-SNAPSHOT/

Also, 1.2.0 is available from the central Maven repository which Maven already knows about:

http://repo1.maven.org/maven2/org/apache/shiro/shiro-core/1.2.0/

HTH

-Jim


<settings xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
    <servers>
        <server>
            <id>apache.releases</id>
            <directoryPermissions>775</directoryPermissions>
            <filePermissions>644</filePermissions>
        </server>
        <server>
            <id>apache.snapshots</id>
            <directoryPermissions>775</directoryPermissions>
            <filePermissions>644</filePermissions>
        </server>
    </servers>

    <!-- This is your currently active profile -->
    <activeProfiles>
        <activeProfile>profile-1</activeProfile>
    </activeProfiles>

    <!-- Profile definitions including remote repositories -->
    <profiles>
        <profile>
            <id>profile-1</id>
            <repositories>
                <repository>
                    <id>apache.snapshots</id>
                    <url>http://repository.apache.org/content/groups/snapshots-group/</url>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                    <releases>
                        <enabled>false</enabled>
                    </releases>
                </repository>
            </repositories>
        </profile>
    </profiles>
</settings>



-----Original Message-----
From: NunoM [mailto:nunowasted@hotmail.com] 
Sent: Wednesday, April 04, 2012 7:41 PM
To: users@maven.apache.org
Subject: Re: Maven Repository

Hello,

Yes. I already spent some time reading the documentation.

And I thought I had understood it well.

I've already added the server tag and necessary permissions that are located
in the readme.txt on the website.

Which is:  http://maven.40175.n5.nabble.com/file/n5619282/settings.xml
settings.xml 

I'm not trying to look for a shortcut, just for a little help. :)

These are all new concepts to me, I'm getting there little by little.


But then one doubt came to my mind.

1. Do I need to create a profile tag in my settings. xml and then create the
repository inside?

Thanks in advance,
Nuno.

--
View this message in context: http://maven.40175.n5.nabble.com/Maven-Repository-tp5619256p5619282.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




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


Re: Maven Repository

Posted by NunoM <nu...@hotmail.com>.
Hello,

Yes. I already spent some time reading the documentation.

And I thought I had understood it well.

I've already added the server tag and necessary permissions that are located
in the readme.txt on the website.

Which is:  http://maven.40175.n5.nabble.com/file/n5619282/settings.xml
settings.xml 

I'm not trying to look for a shortcut, just for a little help. :)

These are all new concepts to me, I'm getting there little by little.


But then one doubt came to my mind.

1. Do I need to create a profile tag in my settings. xml and then create the
repository inside?

Thanks in advance,
Nuno.

--
View this message in context: http://maven.40175.n5.nabble.com/Maven-Repository-tp5619256p5619282.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: Maven Repository

Posted by Barrie Treloar <ba...@gmail.com>.
On Thu, Apr 5, 2012 at 9:51 AM, NunoM <nu...@hotmail.com> wrote:
> Hello everyone,
>
> I'm a new user to Apache Maven and Apache Shiro.
>
> I'm doing a tutorial, but before starting it, I need to add
> https://repository.apache.org/content/groups/snapshots-group/ to my
> settings.xml. (I need shiro core 1.2.0 snapshot.jar)
>
> Can anyone tell me how to that correctly?
>
> I've never used maven before, and even with the documentation, I feel lost.
>
> Thanks in advance,
> Nuno.

I'd recommend spending 30 minutes or so skim reading the freely available books
http://maven.apache.org/articles.html
You'll want to spend more time in there later but that will give you
an appreciation of what Maven is doing.
You especially want to avoid fighting with Maven, you will lose.

Anything we tell you here is just going to be a quick fix and is not
going to improve your understanding.

Alternatively, http://maven.apache.org/settings.html has the details
on how to add a repository, you can plug in your url from the
examples.
But I urge you not to take this shortcut.

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