All your dependencies work now, because snapshot has a standard
updatePolicy of daily. You can start playing with this today. :)

Possible settings:
updatePolicy     The frequency for downloading updates - can be
"always", "daily" (default), "interval:XXX" (in minutes) or "never"
(only if it doesn't exist locally).

Hth,

Nick Stolwijk
~Java Developer~

Iprofs BV.
Claus Sluterweg 125
2012 WS Haarlem
www.iprofs.nl



On Fri, Oct 24, 2008 at 11:28 AM, Marco Huber <[EMAIL PROTECTED]> wrote:
> Hi Nick,
>
> I will try out your suggestion. But now all the dependencies works at the
> moment, so I had to try that out tomorrow.
>
> Thank you
> Marco
>
> Nick Stolwijk wrote:
>>
>> You can add a repository configuration to your settings.xml at home,
>> which tells maven to never update snapshots for that repository.
>>  <profiles>
>>    <profile>
>>      <activation>
>>        <activeByDefault/>
>>      </activation>
>>      <repositories>
>>        <repository>
>>          <id>Same id as your pom</id>
>>          <snapshots>
>>            <enabled>true</enabled>
>>            <updatePolicy>never</updatePolicy>
>>          </snapshots>
>>        </repository>
>>    </profile>
>> </profiles>
>>
>> See the maven settings model:
>> http://maven.apache.org/ref/2.0.7/maven-settings/settings.html
>>
>> Hth,
>>
>> Nick Stolwijk
>> ~Java Developer~
>>
>> Iprofs BV.
>> Claus Sluterweg 125
>> 2012 WS Haarlem
>> www.iprofs.nl
>>
>>
>>
>> On Fri, Oct 24, 2008 at 10:51 AM, Marco Huber <[EMAIL PROTECTED]>
>> wrote:
>>>
>>> Hi Nick,
>>>
>>> thank you for answer. Sure I can use the offline mode. But I don't really
>>> want to switch Maven completely offline. At the moment I use the central
>>> repository for all non company artifacts.
>>>
>>> I don't understand why Maven breaks the build. If it run in a timeout at
>>> the
>>> first check of the snapshots that okay. But there is a snapshot version
>>> in
>>> my local repo. So why cause this in an error?
>>>
>>> Regards
>>> Marco
>>>
>>> Nick Stolwijk wrote:
>>>>
>>>> You can always use the offline modus (mvn -o) to force Maven to not
>>>> connect to the internet at all.
>>>>
>>>> Hth,
>>>>
>>>> Nick Stolwijk
>>>> ~Java Developer~
>>>>
>>>> Iprofs BV.
>>>> Claus Sluterweg 125
>>>> 2012 WS Haarlem
>>>> www.iprofs.nl
>>>>
>>>>
>>>>
>>>> On Fri, Oct 24, 2008 at 10:24 AM, Marco Huber <[EMAIL PROTECTED]>
>>>> wrote:
>>>>>
>>>>> Hi all,
>>>>>
>>>>> I have a little problem with Maven, if I work at home.
>>>>> In our company, we have different project in a SNAPSHOT state, which I
>>>>> have
>>>>> to use in the project I'm currently working.
>>>>>
>>>>> If I work at home I copy normally my local-repo from the company an
>>>>> updated
>>>>> my local-repo at home. We have a inner company repository which I
>>>>> cannot
>>>>> connect from home.
>>>>>
>>>>> If I now run mvn clean install Maven tells me that it cannot find the
>>>>> artifact com.myCompany:myArtifact
>>>>>
>>>>> "
>>>>> [INFO] Failed to resolve artifact.
>>>>>
>>>>> Missing:
>>>>> ----------
>>>>> 1) com.myCompany:myArtifact:jar:0.6.0-SNAPSHOT
>>>>>
>>>>>  Try downloading the file manually from the project website.
>>>>>
>>>>>  Then, install it using the command:
>>>>>    mvn install:install-file -DgroupId=com.myCompany
>>>>> -DartifactId=myArtifact -Dversion=0.6.0-SNAPSHOT -Dpackaging=jar
>>>>> -Dfile=/path/to/file
>>>>>
>>>>>  Alternatively, if you host your own repository you can deploy the file
>>>>> there:
>>>>>    mvn deploy:deploy-file -DgroupId=com.myCompany
>>>>> -DartifactId=myArtifact
>>>>> -Dversion=0.6.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file
>>>>> -Durl=[url]
>>>>> -Drepositor
>>>>> yId=[id]
>>>>>
>>>>>  Path to dependency:
>>>>>      1) com.myCompany:myOtherArtifact:jar:1.0.0-SNAPSHOT
>>>>>      2) com.myCompany:myArtifact:jar:0.6.0-SNAPSHOT
>>>>>
>>>>> ----------
>>>>> 1 required artifact is missing.
>>>>> "
>>>>>
>>>>> If I install the dependent artifact locally Maven is happy, or if I
>>>>> remove
>>>>> all xml file from this artifact in my local repo.
>>>>>
>>>>> So my question: Why does Maven broke if it cannot download a SNAPSHOT?
>>>>> Should it not use the latest from the local repository?
>>>>>
>>>>> Thank you for your answers
>>>>> Marco
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>>>
>>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to