Maven/Archiva

HomePage | Maven | RecentChanges | Preferences

Maven Archiva

Archiva09Alpha1Release

Archiva09Alpha2Release

Archiva10Alpha2Release

MRM-370

MRM-430

20070217

http://jira.codehaus.org/browse/MRM-283

This is controlled by plexus-security, and is configurable.

Here is the default config file in svn: http://svn.codehaus.org/plexus/plexus-security/trunk/configuration/src/main/resources/org/codehaus/plexus/security/config-defaults.properties

20070217

The Archiva build hung when downloading a pom, ctrl-break thread dump follows

[INFO] Building Archiva Repository Indexer
[INFO]    task-segment: [clean, install]
[INFO] -------------------------------------------------------------------------
---
[INFO] [clean:clean]
[INFO] Deleting directory c:\svn\maven\archiva\archiva-indexer\target
[INFO] Deleting directory c:\svn\maven\archiva\archiva-indexer\target\classes
[INFO] Deleting directory c:\svn\maven\archiva\archiva-indexer\target\test-class
es
[INFO] [plexus:descriptor {execution: default}]
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [plexus:merge-descriptors {execution: default}]
Downloading: http://repo1.maven.org/maven2/org/apache/maven/maven-project/2.0.5/
maven-project-2.0.5.pom
Full thread dump Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode, sharing):

"Low Memory Detector" daemon prio=6 tid=0x00a701a8 nid=0x2f0 runnable [0x0000000
0..0x00000000]

"CompilerThread0" daemon prio=10 tid=0x00a6ed78 nid=0x834 waiting on condition [
0x00000000..0x02bcf84c]

"Signal Dispatcher" daemon prio=10 tid=0x00a6e008 nid=0x35c waiting on condition
 [0x00000000..0x00000000]

"Finalizer" daemon prio=8 tid=0x0003f998 nid=0x7cc in Object.wait() [0x02b4f000.
.0x02b4fc68]
        at java.lang.Object.wait(Native Method)
        - waiting on <0x22f64cc0> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
        - locked <0x22f64cc0> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
        at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)

"Reference Handler" daemon prio=10 tid=0x00a48aa0 nid=0x9cc in Object.wait() [0x
02b0f000..0x02b0fce8]
        at java.lang.Object.wait(Native Method)
        - waiting on <0x22f64d40> (a java.lang.ref.Reference$Lock)
        at java.lang.Object.wait(Object.java:474)
        at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
        - locked <0x22f64d40> (a java.lang.ref.Reference$Lock)

"main" prio=6 tid=0x00037b10 nid=0x494 runnable [0x0007e000..0x0007fc40]
        at java.net.SocketInputStream.socketRead0(Native Method)
        at java.net.SocketInputStream.read(SocketInputStream.java:129)
        at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
        at java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
        at java.io.BufferedInputStream.read(BufferedInputStream.java:313)
        - locked <0x22b61cf8> (a java.io.BufferedInputStream)
        at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:606)
        at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:554)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon
nection.java:936)
        - locked <0x22b56f88> (a sun.net.www.protocol.http.HttpURLConnection)
        at org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputD
ata(LightweightHttpWagon.java:83)
        at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:68)
        at org.apache.maven.artifact.manager.DefaultWagonManager.getRemoteFile(D
efaultWagonManager.java:439)
        at org.apache.maven.artifact.manager.DefaultWagonManager.getArtifact(Def
aultWagonManager.java:330)
        at org.apache.maven.artifact.manager.DefaultWagonManager.getArtifact(Def
aultWagonManager.java:286)
        at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(De
faultArtifactResolver.java:185)
        at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(De
faultArtifactResolver.java:73)
        at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepo
sitory(DefaultMavenProjectBuilder.java:482)
        at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromReposito
ry(DefaultMavenProjectBuilder.java:228)
        at org.apache.maven.project.artifact.MavenMetadataSource.retrieve(MavenM
etadataSource.java:105)
        at org.apache.maven.artifact.resolver.DefaultArtifactCollector.recurse(D
efaultArtifactCollector.java:278)
        at org.apache.maven.artifact.resolver.DefaultArtifactCollector.collect(D
efaultArtifactCollector.java:70)
        at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTra
nsitively(DefaultArtifactResolver.java:284)
        at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTra
nsitively(DefaultArtifactResolver.java:272)
        at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTra
nsitively(DefaultArtifactResolver.java:243)
        at org.apache.maven.plugin.DefaultPluginManager.resolveTransitiveDepende
ncies(DefaultPluginManager.java:1142)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
nManager.java:374)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:539)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
fecycle(DefaultLifecycleExecutor.java:480)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:459)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:311)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:278)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.java:143)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:330)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:123)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
        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:585)
        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)

"VM Thread" prio=10 tid=0x00a683f8 nid=0x328 runnable

"VM Periodic Task Thread" prio=10 tid=0x00a713f8 nid=0x1f8 waiting on condition

Getting Started

Life on the bleeding edge, as usual. From a svn checkout of archiva: mvn install; cd archiva-webapp; mvn jetty:run

It defaults to port 9091. Visit http://localhost:9091/

It will redirect you to the 'Create Admin User' page. Fill that out. Then it redirects to the login page, so do that.

Now you can add a managed repository.

By default, no one has access to the repository, not even the admin user. Go to user maintenance and either give 'admin' the repository-observer role, or create another user and give it some rights.

There is a guest user. If you want to enable anonymous access, give 'guest' the appropriate roles.

On Effective Roles... if you are a repository manager, you are "effectively" also a repository observer.

/ArchivaJettyError

/ArchivaDerbyError

/ArchivaError20070128

/ArchivaError20070129

/ArchivaError20070302

/ArchivaError20070310

Notes

Proxied repos don't seem to actually proxy.

On IRC, maxb points out that the correct URL is http://localhost:9091/proxy

It works, but seems to ignore the fact that I've configured certain remote repositories to be proxied through certain managed repositories.

Now that I've configured the ASF Snapshot repo to be proxied through *one* managed repository, does that mean *everyone* has access to it with the /proxy url?

Deploying Artifacts

DAV is not supported yet (unless you build from source). See http://docs.codehaus.org/display/MAVENUSER/Upload+artifacts

I tried the http url, which gives an error 409.

$ mvn deploy:deploy-file -DgroupId=junit -DartifactId=junit -Dversion=3.8.1 -Dp
ackaging=jar -Dfile=junit-3.8.1.jar -Durl=http://localhost:9091/repository/myre
po -DrepositoryId=MYREPO
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'deploy'.
[INFO] -------------------------------------------------------------------------
---
[INFO] Building Maven Default Project
[INFO]    task-segment: [deploy:deploy-file] (aggregator-style)
[INFO] -------------------------------------------------------------------------
---
[INFO] [deploy:deploy-file]
Uploading: http://localhost:9091/repository/myrepo/junit/junit/3.8.1/junit-3.8.1
.jar
118K uploaded
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error deploying artifact: Unable to transfer file. HttpURLConnection retu
rned the response code: 409

[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Thu Nov 23 12:23:56 MST 2006
[INFO] Final Memory: 2M/5M
[INFO] ------------------------------------------------------------------------

Fair enough. Then I tried dav:http:// as shown in the pom snippet.

$ mvn deploy:deploy-file -DgroupId=junit -DartifactId=junit -Dversion=3.8.1 -Dpackaging=jar -Dfile=junit-3.8.1.jar -Durl=dav:http://localhost:9091/repository/
myrepo -DrepositoryId=MYREPO
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'deploy'.
[INFO] -------------------------------------------------------------------------
---
[INFO] Building Maven Default Project
[INFO]    task-segment: [deploy:deploy-file] (aggregator-style)
[INFO] -------------------------------------------------------------------------
---
[INFO] [deploy:deploy-file]
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error deploying artifact: Unsupported Protocol: 'dav': Cannot find wagon
which supports the requested protocol: dav

Component descriptor cannot be found in the component repository: org.apache.mav
en.wagon.Wagondav.
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Thu Nov 23 12:22:44 MST 2006
[INFO] Final Memory: 2M/4M
[INFO] ------------------------------------------------------------------------

Filesystem based URLs work, going with that for now...

   
 $ mvn deploy:deploy-file -DgroupId=junit -DartifactId=junit -Dversion=3.8.1 -Dpackaging=jar -Dfile=junit-3.8.1.jar    
 -Durl=file:///e:/svn/maven/archiva/archiva-webapp/target/my-managed-repository -DpomFile=junit-3.8.1.pom


HomePage | Maven | RecentChanges | Preferences
This page is read-only | View other revisions
Last edited July 11, 2007 8:20 pm by WendySmoak (diff)
Search: