You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by pawan gandhi <pa...@dowjones.com> on 2010/02/18 22:09:16 UTC

Problem for access local .m2 installed snapshot dependency

Hi Everyone,

I have two m2 projects. Both are snapshot versions. When i do mvn clean
install on first project (say A), it is installed into .m2 repository with
A-1.0-SNAPSHOT.jar file.

Now i specify A as dependency in project B's POM. When i try mvn clean
install for B, it says.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Try downloading the file manually from the project website.

Then, install it using the command:
    mvn install:install-file -DgroupId=com.omc.provisioning
-DartifactId=ProvisioningCommons-components -Dversion=1.0-7-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.dowjones.omc
-DartifactId=ProvisioningCommons-components -Dversion=1.0-7-SNAPSHOT
-Dpackaging=ja
r -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

Path to dependency:
        1)
com.dowjones.omc.provisioning:IdentityService-components:jar:1.6-2-SNAPSHOT
        2)
com.dowjones.omc.provisioning:ProvisioningCommons-components:jar:1.0-7-SNAPSHOT


 
com.dowjones.omc.provisioning:ProvisioningCommons-components:jar:1.0-7-SNAPSHOT
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


I thought that initially it check if artifacts present in .m2 repo then it
tries for external remote repos. But here it is strange. 

Any idea will be greatly appreciated.


Thanks
Pawan
-- 
View this message in context: http://old.nabble.com/Problem-for-access-local-.m2-installed-snapshot-dependency-tp27645686p27645686.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: Problem for access local .m2 installed snapshot dependency

Posted by Ryan Connolly <ry...@gmail.com>.
I can't see how it could be possible that the dependency declares a version
of of 1.0.-0 when the output of your build is reporting a missing version of
1.0-7.  I would double check the versions in all poms and do a clean install
on both projects again.

On Feb 18, 2010 8:17 PM, "pawan gandhi" <pa...@dowjones.com> wrote:


'A' has its pom <version>1.0-0-SNAPSHOT</version>



Wayne Fay wrote:
>
>>    <version>1.0-0-SNAPSHOT</version>
>
> What's the version element in A's...
--
View this message in context:
http://old.nabble.com/Problem-for-access-local-.m2-installed-snapshot-dependency-tp27645686p27648597.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-he...

Re: Problem for access local .m2 installed snapshot dependency

Posted by pawan gandhi <pa...@dowjones.com>.
'A' has its pom <version>1.0-0-SNAPSHOT</version>


Wayne Fay wrote:
> 
>>    <version>1.0-0-SNAPSHOT</version>
> 
> What's the version element in A's pom look like? I'm guess it does not
> match the <version>1.0-0-SNAPSHOT</version> that B is looking for...
> 
> Wayne
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Problem-for-access-local-.m2-installed-snapshot-dependency-tp27645686p27648597.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: Problem for access local .m2 installed snapshot dependency

Posted by Wayne Fay <wa...@gmail.com>.
>    <version>1.0-0-SNAPSHOT</version>

What's the version element in A's pom look like? I'm guess it does not
match the <version>1.0-0-SNAPSHOT</version> that B is looking for...

Wayne

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


Re: Problem for access local .m2 installed snapshot dependency

Posted by pawan gandhi <pa...@dowjones.com>.
The command that i run 
1.mvn clean install for installing A and  mvn clean compile for B.
2. B's pom has A dependency declared like this
<dependency>
   <groupId>com</.groupId>
    <artifactsId>A</artifactId>
    <version>1.0-0-SNAPSHOT</version>
</dependency>



Wayne Fay wrote:
> 
> No, I don't get it. Let's make it super simple...
> 
> What commands (exactly) are you typing? I don't need to see the output.
> What does the dependency on A in B's pom.xml file look like?
> 
> Wayne
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Problem-for-access-local-.m2-installed-snapshot-dependency-tp27645686p27647370.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: Problem for access local .m2 installed snapshot dependency

Posted by Wayne Fay <wa...@gmail.com>.
No, I don't get it. Let's make it super simple...

What commands (exactly) are you typing? I don't need to see the output.
What does the dependency on A in B's pom.xml file look like?

Wayne

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


Re: Problem for access local .m2 installed snapshot dependency

Posted by pawan gandhi <pa...@dowjones.com>.
Hi Wayne,

More more clarity on this,
com.dowjones.omc.provisioning:ProvisioningCommons-components:jar:1.0-7-SNAPSHOT 
is my A artifact. I have it in my .m2 but my second project is not able to
get it. But when i do an explicit install:install-file on
"com.dowjones.omc.provisioning:ProvisioningCommons-components:jar:1.0-7-SNAPSHOT",
i am able to get. What is different in install:install-file and install
phase.

Hope you got it.


Thanks
Pawan

Wayne Fay wrote:
> 
>> A-1.0-SNAPSHOT.jar file.
>>
>> com.dowjones.omc.provisioning:ProvisioningCommons-components:jar:1.0-7-SNAPSHOT
> 
> 1.0-SNAPSHOT is not equivalent to 1.0.7-SNAPSHOT, right?
> 
> Wayne
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Problem-for-access-local-.m2-installed-snapshot-dependency-tp27645686p27646240.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: Problem for access local .m2 installed snapshot dependency

Posted by Wayne Fay <wa...@gmail.com>.
> A-1.0-SNAPSHOT.jar file.
>
> com.dowjones.omc.provisioning:ProvisioningCommons-components:jar:1.0-7-SNAPSHOT

1.0-SNAPSHOT is not equivalent to 1.0.7-SNAPSHOT, right?

Wayne

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