views:

219

answers:

1

I'm trying to create the pom for an existing grails project via:

mvn grails:create-pom -DgroupId=ourcompany.com

Now, we have our maven repository available in a local nexus repo:

http://ourcompany.com/nexus

But when i run the above, i get the below error

Downloading: http://ourcompany.com/nexus/content/groups/public/ourcompany/com/hibernate-core/3.3.1.GA/hibernate-core-3.3.1.GA.jar [INFO] Unable to find resource 'ourcompany.com:hibernate-core:jar:3.3.1.GA' in repository central (http://repo1.maven.org/maven2) [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR

But it is in there at simply:

http://ourcompany.com/nexus/content/groups/public/hibernate-core/3.3.1.GA/hibernate-core-3.3.1.GA.jar

Ie, w/o the "ourcompany.com" path. From my perspective, it should just try to pull down hibernate w/o inserting the groupId, but maybe i'm not understanding how i'm supposed to run this command?

+1  A: 

What happens is you just run:

mvn grails:create-pom
Pascal Thivent
Yeah, sorry, that is the cmd i'm using. Just mistyped it above.
Jack
@Jack Ok then I suggest trying without the `-DgroupId`
Pascal Thivent
I get an error saying it wants the -DgroupId=VALUE param. Or, it gives me the option of "adding a <groupId> under <configuration> for grails-maven-plugin", but not even sure where that would be.
Jack
@Jack Well, adding the `groupId` in the configuration of the plugin is equivalent and should lead to the same problem. Just let me know if you want to test this anyway.
Pascal Thivent
@Bill My guess is that the `groupId` is added to the `groupId` of dependencies (i.e. it's a bug). But this is a wild guess.
Pascal Thivent
@Pascal: If it's not going to work, not sure what the point is. But thanks for your help.
Jack
@Jack It *should be* equivalent but the plugin might do strange things and behave differently, that's the point (and I can't test this myself easily).
Pascal Thivent
@Bill could very well be that it's not the proper way to have created that nexus repo. It's a new code base i just started working with and this is my 1st time using maven ... In any case, the way it's setup works fine for all the other maven projects that exist (non grails); and they do have a groupId of com.ourcompany in the pom.xml.
Jack