The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

abaitam (2) [Avatar] Offline
#1
I am following the steps on this page:

http://tuscanyinaction.com/samples.html

and at step 5 I get this error message:

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).


Project ID: null:tuscany-scatours:pom:${scatours.version}

Reason: Cannot find parent: org.apache.tuscany.sca:tuscany-sca for project: null
:tuscany-scatours:pom:${scatours.version} for project null:tuscany-scatours:pom:
${scatours.version}


[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.reactor.MavenExecutionException: Cannot find parent: org.apache
.tuscany.sca:tuscany-sca for project: null:tuscany-scatours:pom:${scatours.versi
on} for project null:tuscany-scatours:pom:${scatours.version}
at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:37smilie
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:292)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:301)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)

at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.project.ProjectBuildingException: Cannot find parent
: org.apache.tuscany.sca:tuscany-sca for project: null:tuscany-scatours:pom:${sc
atours.version} for project null:tuscany-scatours:pom:${scatours.version}
at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(D
efaultMavenProjectBuilder.java:1369)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(Def
aultMavenProjectBuilder.java:820)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFi
leInternal(DefaultMavenProjectBuilder.java:505)
at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMave
nProjectBuilder.java:197)
at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:583)
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:461)
at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:365)
... 11 more
Caused by: org.apache.maven.project.ProjectBuildingException: POM 'org.apache.tu
scany.sca:tuscany-sca' not found in repository: Unable to download the artifact
from any repository

org.apache.tuscany.sca:tuscany-sca:pom:1.6-SNAPSHOT

from the specified remote repositories:
java.net (http://download.java.net/maven/1),
central (http://repo1.maven.org/maven2),
java.net2 (http://download.java.net/maven/2)

for project org.apache.tuscany.sca:tuscany-sca
at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepo
sitory(DefaultMavenProjectBuilder.java:602)
at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(D
efaultMavenProjectBuilder.java:1365)
... 17 more
Caused by: org.apache.maven.artifact.resolver.ArtifactNotFoundException: Unable
to download the artifact from any repository

org.apache.tuscany.sca:tuscany-sca:pom:1.6-SNAPSHOT

from the specified remote repositories:
java.net (http://download.java.net/maven/1),
central (http://repo1.maven.org/maven2),
java.net2 (http://download.java.net/maven/2)


at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(De
faultArtifactResolver.java:212)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(De
faultArtifactResolver.java:74)
at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepo
sitory(DefaultMavenProjectBuilder.java:555)
... 18 more
Caused by: org.apache.maven.wagon.ResourceDoesNotExistException: Unable to downl
oad the artifact from any repository
at org.apache.maven.artifact.manager.DefaultWagonManager.getArtifact(Def
aultWagonManager.java:332)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(De
faultArtifactResolver.java:200)
... 20 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Sat Nov 21 14:31:50 EST 2009
[INFO] Final Memory: 1M/4M
[INFO] ------------------------------------------------------------------------


I appreciate any help.
wayne.keenan (1) [Avatar] Offline
#2
Re: Error compiling samples
I have managed to find an Apache Maven repo with the 1.6-SNAPSHOT . Add this to the /pom.xml <repostiories> section:

<repository>
<id>apache.snapshots</id>
<name>Apache Snapshots Maven 2.x Repository</name>
<url> http://repository.apache.org/snapshots</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>

However, it still fails slight further on:


INFO] Scanning for projects...
[INFO] snapshot org.apache.tuscany.sca:tuscany-sca:1.6-SNAPSHOT: checking for updates from apache.snapshots
Downloading: http://repository.apache.org/snapshots/org/apache/tuscany/sca/tuscany-sca/1.6-SNAPSHOT/tuscany-sca-1.6-20090430.205555-1.pom
18K downloaded
Downloading: http://download.java.net/maven/1/org.apache/poms/apache-4.pom
Downloading: http://download.java.net/maven/2/org/apache/apache/4/apache-4.pom
Downloading: http://repository.apache.org/snapshots/org/apache/apache/4/apache-4.pom
Downloading: http://people.apache.org/repo/m2-incubating-repository/org/apache/apache/4/apache-4.pom
Downloading: http://ws.zones.apache.org/repository2/org/apache/apache/4/apache-4.pom

Downloading: http://ftp.ussg.iu.edu/eclipse/modeling/emf/emf/maven2//org/apache/apache/4/apache-4.pom
Downloading: http://ftp.osuosl.org/pub/eclipse/tools/emf/maven2/org/apache/apache/4/apache-4.pom
Downloading: http://repo1.maven.org/maven2/org/apache/apache/4/apache-4.pom
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).


Project ID: null:scatours-contributions:pom:1.0-SNAPSHOT

Reason: Cannot find parent: org.apache.tuscany.sca:tuscany-scatours for project: null:scatours-contributions:pom:1.0-SNAPSHOT for project null:scatours-contributions:pom:1.0-SNAPSHOT


[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.reactor.MavenExecutionException: Cannot find parent: org.apache.tuscany.sca:tuscany-scatours for project: null:scatours-contributions:pom:1.0-SNAPSHOT for project null:scatours-contributions:pom:1.0-SNAPSHOT
raymond.feng (7) [Avatar] Offline
#3
Re: Error compiling samples
Thanks. We have fixed the snapshot repo.

The build from an empty takes some time. Sometimes you will have to retry as the repo may be too busy.

We're looking into ways to improve this, for example, make the snapshot distribution available so that you don't have to build it. I'll keep you updated on this forum.
raymond.feng (7) [Avatar] Offline
#4
Re: Error compiling samples
I can successfully buid the code now from an empty maven repo with a change in the maven-jaxws-plugin version.

It takes a while to download all the plugins and dependencies for the first time. Maven will then cache them in the local repo. After that, you can run mvn -o to run it in offline mode.

Another tip is to run mvn clean install -fn to ignore some non-fatal issues.