Build instructions

1 view
Skip to first unread message

Matt

unread,
Mar 3, 2008, 2:42:33 PM3/3/08
to bering
Can someone post a set of build instrucitons for the source? I keep
getting a "unable to download from repository" error when running
maven on the src directory.

Thanks,

Matt

Rhett Sutphin

unread,
Mar 3, 2008, 2:58:51 PM3/3/08
to ber...@googlegroups.com
Hi Matt,

Here's what works for me. I have bering's trunk checked out in ~/
bering/svn/main; i.e.:

~/bering/svn/main$ ls
.svn/ README bering-all.iws
CHANGELOG bering/ bering-maven-plugin/
LGPL.txt bering-all.iml pom.xml
LICENSE bering-all.ipr target/

(you probably won't have those bering-all.i* files, but the rest
should be there). I can execute any maven command from there:

~/bering/svn/main$ mvn test
... lots of output ...

If you are working on a dialect, you probably only want to build the
main "bering" artifact most of the time, which you can do from its
subdirectory:

~/bering/svn/main$ cd bering
~/bering/svn/main/bering$ mvn test
... lots of output, but less than before ...

Can you be more specific about the command you're using to build, and
maybe copy-and-paste the output including the error message?

Rhett

Matt

unread,
Mar 3, 2008, 4:16:32 PM3/3/08
to bering
I check out the current version using subclipse, and it is in c:\docs
and settings\...\workspace\bering..

C:\Documents and Settings\...\Desktop\caeers_workspace\bering>dir
Volume in drive C has no label.
Volume Serial Number is F01B-D0C5

Directory of C:\Documents and Settings\...\Desktop\caeers_workspace
\berin
g

02/29/2008 10:32 AM <DIR> .
02/29/2008 10:32 AM <DIR> ..
02/29/2008 10:32 AM 210 .project
03/03/2008 01:38 PM 5,218 pom.xml
02/29/2008 10:32 AM <DIR> src
2 File(s) 5,428 bytes
3 Dir(s) 128,146,321,408 bytes free

C:\Documents and Settings\...\Desktop\caeers_workspace\bering>mvn test
[INFO] Scanning for projects...
[INFO]
------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

GroupId: edu.northwestern.bioinformatics
ArtifactId: bering-all
Version: 0.7-SNAPSHOT

Reason: Unable to download the artifact from any repository

edu.northwestern.bioinformatics:bering-all:pom:0.7-SNAPSHOT

from the specified remote repositories:
central (http://repo1.maven.org/maven2)


[INFO]
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.reactor.MavenExecutionException: Cannot find parent:
edu.northw
estern.bioinformatics:bering-all for project: null:bering:jar:null for
project n
ull:bering:jar:null
at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:
376)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:
289)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:
126)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:282)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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
: edu.northwestern.bioinformatics:bering-all for project:
null:bering:jar:null f
or project null:bering:jar:null
at
org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(D
efaultMavenProjectBuilder.java:1259)
at
org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(Def
aultMavenProjectBuilder.java:745)
at
org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFi
leInternal(DefaultMavenProjectBuilder.java:476)
at
org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMave
nProjectBuilder.java:197)
at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:
548)
at
org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:458)
at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:
362)
... 11 more
Caused by: org.apache.maven.project.ProjectBuildingException: POM
'edu.northwest
ern.bioinformatics:bering-all' not found in repository: Unable to
download the a
rtifact from any repository

edu.northwestern.bioinformatics:bering-all:pom:0.7-SNAPSHOT

from the specified remote repositories:
central (http://repo1.maven.org/maven2)
for project edu.northwestern.bioinformatics:bering-all
at
org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepo
sitory(DefaultMavenProjectBuilder.java:571)
at
org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(D
efaultMavenProjectBuilder.java:1255)
... 17 more
Caused by:
org.apache.maven.artifact.resolver.ArtifactNotFoundException: Unable
to download the artifact from any repository

edu.northwestern.bioinformatics:bering-all:pom:0.7-SNAPSHOT

from the specified remote repositories:
central (http://repo1.maven.org/maven2)

at
org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(De
faultArtifactResolver.java:206)
at
org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(De
faultArtifactResolver.java:73)
at
org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepo
sitory(DefaultMavenProjectBuilder.java:524)
... 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:324)
at
org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(De
faultArtifactResolver.java:194)
... 20 more
[INFO]
------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Mon Mar 03 15:14:20 CST 2008
[INFO] Final Memory: 1M/2M
[INFO]
------------------------------------------------------------------------




I get the same thing if I just run "mvn".

Thanks.

Rhett Sutphin

unread,
Mar 3, 2008, 4:44:18 PM3/3/08
to ber...@googlegroups.com
Hi Matt,

I think I know what the problem is. You don't have a copy of the top-
level (bering-all) pom in your local repository. Unfortunately, that
top-level POM contains the global configuration, including where to go
to download the snapshots, so maven can't resolve this automatically.
It's a chicken/egg problem.

What you need to do is (if you haven't already) check out the project
from the top level ( http://bering.googlecode.com/svn/trunk/ , _not_ http://bering.googlecode.com/svn/trunk/bering
). Then, in the root of that working copy, run

mvn install

This will put initial snapshots of all the bering artifacts in your
local maven repository. Then you will be able to switch into the
bering subdirectory and build it on its own as you are working on it.

Rhett

Reply all
Reply to author
Forward
0 new messages