You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@isis.apache.org by Kevin Meyer - KMZ <ke...@kmz.co.za> on 2010/10/16 22:26:11 UTC

problem with archetype pom?

Hi Dan,

There seems to be a problem with the archetype project pom?
I'm getting a mvn error...

K:>mvn install
[INFO] Scanning for projects...
Downloading: http://repo1.maven.org/maven2/org/apache/isis/isis-
parent/7/isis-parent-7.pom
[INFO] Unable to find resource 'org.apache.isis:isis-parent:pom:7' in 
repository central (http://repo1.maven.org/maven2)
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).


Project ID: org.apache.isis.archetypes:archetypes:pom:4.0

Reason: Cannot find parent: org.apache.isis:isis-parent for project: 
org.apache.isis.archetypes:archetypes:pom:4.0 for project 
org.apache.isis.archetypes:archetypes:pom:4.0


Regards,
Kevin


Re: problem with archetype pom?

Posted by Kevin Meyer - KMZ <ke...@kmz.co.za>.
> > My problem is that I am building from sources. My local repository is
> > *always* the same, if not newer, than any other. So why does maven
> > go looking elsewhere for Isis snapshots? ;)
> Sorry for going round the loop on this, but what was the problem with 
> using the -o (--offline) flag?

Occaisionally some *other* package needs to be updated. In this 
case, I currently run mvn twice: once without -o to allow other 
downloads - which I cancel when it starts hunting for isis snapshots. 
Then with -o .... ;)

Otherwise, no problem.

> A better option might be to redefine the repository definition in a 
> profile, and then enable using -P flag, something like:
> 
> <profiles>
> <profile>
> <id>offline</id>
> 
> You could then use "-P offline" to enable this profile.    This should work.
> 

Sounds like a much safer idea! Thanks.

Kevin


Re: problem with archetype pom?

Posted by Dan Haywood <dk...@gmail.com>.
  On 18/10/2010 14:54, Kevin Meyer - KMZ wrote:
>
> My problem is that I am building from sources. My local repository is
> *always* the same, if not newer, than any other. So why does maven
> go looking elsewhere for Isis snapshots? ;)
Sorry for going round the loop on this, but what was the problem with 
using the -o (--offline) flag?


> Am I correct in thinking that if I (locally) change the pom snapshot
> repository to<enabled>false</enabled>  (or whatever the setting is),
> then I can (locally) disable any non-local snapshot repositories ?
>
Just done a search on this, and it looks like that might work, see [1].  
Would be a bit fiddly for you, though, and there's a risk of 
accidentally committing such locally made changes.

A better option might be to redefine the repository definition in a 
profile, and then enable using -P flag, something like:

<profiles>
<profile>
<id>offline</id>
<repository>
<id>apache.snapshots</id>
<name>Apache Snapshot Repository</name>
<url>http://repository.apache.org/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</profile>
</profiles>

You could then use "-P offline" to enable this profile.    This should work.

Cheers
Dan

[1] https://issues.onehippo.com/browse/HREPTWO-3499



Re: problem with archetype pom?

Posted by Kevin Meyer - KMZ <ke...@kmz.co.za>.
> > Dan, is there any reason for this?  This should be used only for 
> > modules that depend on Isis and might want to run/build a snapshot 
> > version without building all the dependent code first.
> 
> We get this by way of inheriting from org.apache:apache-parent:7, which 
> was Mark's recommendation.  
> 
> But I'm not sure why there's a problem with having this defined.  We 
> need a snapshot repo, don't we?  And this is the official one to use.

My problem is that I am building from sources. My local repository is 
*always* the same, if not newer, than any other. So why does maven 
go looking elsewhere for Isis snapshots? ;) Especially given that I 
don't have cable/DSL - these interrogations take some time (just like 
the docbook build always fetching the DTD resources from the 
embedded URL!).

Am I correct in thinking that if I (locally) change the pom snapshot 
repository to <enabled>false</enabled> (or whatever the setting is), 
then I can (locally) disable any non-local snapshot repositories ?



Re: problem with archetype pom?

Posted by Robert Matthews <rm...@nakedobjects.org>.
On 18/10/10 11:06, Dan Haywood wrote:
>
>
> On 18/10/2010 10:53, Robert Matthews wrote:
>> For some reason we have the following in the distributionManagement 
>> section of the pom (run mvn help:effective-pom to see it)
>>
>> <snapshotRepository>
>> <id>apache.snapshots.https</id>
>> <name>Apache Development Snapshot Repository</name>
>> <url>https://repository.apache.org/content/repositories/snapshots</url>
>> </snapshotRepository>
>>
>> which tells Maven to look there for snapshots.
>>
>> Dan, is there any reason for this?  This should be used only for 
>> modules that depend on Isis and might want to run/build a snapshot 
>> version without building all the dependent code first.
>>
>
> We get this by way of inheriting from org.apache:apache-parent:7, 
> which was Mark's recommendation.  Doing so will fit in with other 
> projects that Mark is involved with, so there's good precedent here, 
> and there's a good write-up on the release process that this parent 
> defines for us, which I've referenced from our wiki [1].
This makes sense, so if we used a logging snaphot then it would be 
automatically loaded.
>
> But I'm not sure why there's a problem with having this defined.  We 
> need a snapshot repo, don't we?  And this is the official one to use.
When my code is building I'll have a look why (if) our snapshot are 
being sought.

Rob

Re: problem with archetype pom?

Posted by Dan Haywood <dk...@gmail.com>.

On 18/10/2010 10:53, Robert Matthews wrote:
> For some reason we have the following in the distributionManagement 
> section of the pom (run mvn help:effective-pom to see it)
>
> <snapshotRepository>
> <id>apache.snapshots.https</id>
> <name>Apache Development Snapshot Repository</name>
> <url>https://repository.apache.org/content/repositories/snapshots</url>
> </snapshotRepository>
>
> which tells Maven to look there for snapshots.
>
> Dan, is there any reason for this?  This should be used only for 
> modules that depend on Isis and might want to run/build a snapshot 
> version without building all the dependent code first.
>

We get this by way of inheriting from org.apache:apache-parent:7, which 
was Mark's recommendation.  Doing so will fit in with other projects 
that Mark is involved with, so there's good precedent here, and there's 
a good write-up on the release process that this parent defines for us, 
which I've referenced from our wiki [1].

But I'm not sure why there's a problem with having this defined.  We 
need a snapshot repo, don't we?  And this is the official one to use.

Dan

[1] https://cwiki.apache.org/confluence/display/ISIS/ReleaseProcess




Re: problem with archetype pom?

Posted by Robert Matthews <rm...@nakedobjects.org>.
Kevin
> PS: Since I am building from sources, I generally use "mvn -o" to
> prevent maven from fetching o.a.isis resources from the repositories.
>    
> PPS: Is there a more appropriate method that I can use to have
> maven use my local repository over the o.a.isis sources?
You local resources will be used without the -o flag, its just that 
Maven will check with the repository that you do in fact have the latest 
version on disk.  This happens because we are using snapshots, and these 
by the very nature could change at any time.  If you were using released 
versions of everything then Maven would be satisfied that what you have 
on your disk is the same as in the public repository, as your 
version-1.0 is the same as its version-1.0.  However in the snapshot 
world your version-1.0-SNAPSHOT might not be the same as its 
version-1.0-SNAPSHOT.

However this should not even be happening as the source code is 
definitive: the code you build on your machine should be seen as the 
latest version.  For some reason we have the following in the 
distributionManagement section of the pom (run mvn help:effective-pom to 
see it)

<snapshotRepository>
<id>apache.snapshots.https</id>
<name>Apache Development Snapshot Repository</name>
<url>https://repository.apache.org/content/repositories/snapshots</url>
</snapshotRepository>

which tells Maven to look there for snapshots.

Dan, is there any reason for this?  This should be used only for modules 
that depend on Isis and might want to run/build a snapshot version 
without building all the dependent code first.

Rob

Re: problem with archetype pom?

Posted by Kevin Meyer - KMZ <ke...@kmz.co.za>.
I've editted support/pom.xml and some files related to the exploration 
archetype.  I can now build an exploration application from archetype.

I've put initial instructions into:
trunk/support/src/site/apt/jottings.apt
These instructions are for (mostly) absolute beginners. 

In short, you need to manually run "mvn install" within the support 
directory to install the archetypes....

I have not yet tested against xml object store, nor looked at the 
application archetype sources.

Have fun.

Kevin

PS: Since I am building from sources, I generally use "mvn -o" to 
prevent maven from fetching o.a.isis resources from the repositories.

PPS: Is there a more appropriate method that I can use to have 
maven use my local repository over the o.a.isis sources?

On 16 Oct 2010 at 22:26, Kevin Meyer - KMZ wrote:

> Hi Dan,
> 
> There seems to be a problem with the archetype project pom?