You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Thorsten Heit <th...@gmx.de> on 2007/03/13 19:00:42 UTC
[m2] Maven ignoring Artifactory proxy settings?
Hi all,
I just discovered a strange phenomenon:
Artifactory is running on port 4080 on my local machine in a Tomcat 5.5 environment, and is configured correctly in my settings.xml. Well, at least I think so:
<settings xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>my.releases</id>
<username>foo</username>
<password>foo</password>
</server>
<server>
<id>my.snapshots</id>
<username>foo</username>
<password>foo</password>
</server>
</servers>
<profiles>
<profile>
<id>default</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<artifactory.url>http://localhost:4080/artifactory</artifactory.url>
</properties>
<repositories>
<repository>
<id>central</id>
<url>http://localhost:4080/artifactory/repo</url>
</repository>
<repository>
<id>snapshots</id>
<url>http://localhost:4080/artifactory/repo</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>http://localhost:4080/artifactory/repo</url>
</pluginRepository>
<pluginRepository>
<id>snapshots</id>
<url>http://localhost:4080/artifactory/repo</url>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
</settings>
As long as I execute Maven commands in a directory which already contains a pom.xml, everything works as expected: Building, compiling, deploying etc. When I execute Maven commands in an empty directory, say, "mvn archetype:create -DgroupId=foo -DartifactId=bar", Maven obviously ignores my proxy settings and doesn't find plugins anymore:
$ mvn -e -X archetype:create
+ Error stacktraces are turned on.
Maven version: 2.0.5
[DEBUG] Building Maven user-level plugin registry from: 'D:\Dokumente und Einstellungen\H2841\.m2\plugin-registry.xml'
[DEBUG] Building Maven global-level plugin registry from: 'c:\maven-2.0.5\conf\plugin-registry.xml'
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[DEBUG] maven-archetype-plugin: using locally installed snapshot
[DEBUG] maven-archetype-plugin: using locally installed snapshot
[DEBUG] Artifact not found - using stub model: Unable to determine the latest version
org.apache.maven.plugins:maven-archetype-plugin:pom:LATEST
[DEBUG] Using defaults for missing POM org.apache.maven.plugins:maven-archetype-plugin:pom:LATEST
[DEBUG] maven-archetype-plugin: using locally installed snapshot
[DEBUG] Artifact not found - using stub model: Unable to determine the release version
org.apache.maven.plugins:maven-archetype-plugin:pom:RELEASE
[DEBUG] Using defaults for missing POM org.apache.maven.plugins:maven-archetype-plugin:pom:RELEASE
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] The plugin 'org.apache.maven.plugins:maven-archetype-plugin' does not exist or no valid version could be found
[INFO] ------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: The plugin 'org.apache.maven.plugins:maven-archetype-plugin' does not exist or no valid version could be found
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1286)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor(DefaultLifecycleExecutor.java:1522)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.segmentTaskListByAggregationNeeds(DefaultLifecycleExecutor.java:386)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:138)
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(DelegatingMethodAccessorImpl.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.plugin.version.PluginVersionNotFoundException: The plugin 'org.apache.maven.plugins:maven-archetype-plugin' does not exist or no valid version could be found
at org.apache.maven.plugin.version.DefaultPluginVersionManager.resolvePluginVersion(DefaultPluginVersionManager.java:228)
at org.apache.maven.plugin.version.DefaultPluginVersionManager.resolvePluginVersion(DefaultPluginVersionManager.java:90)
at org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPluginManager.java:161)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1257)
... 14 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Tue Mar 13 18:48:41 CET 2007
[INFO] Final Memory: 1M/4M
[INFO] ------------------------------------------------------------------------
~/foo
$
Using the following simple pom.xml in the same directory
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>foo</groupId>
<artifactId>bar</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
</project>
the output of the above command suddenly differs:
$ mvn -e -X archetype:create
+ Error stacktraces are turned on.
Maven version: 2.0.5
[DEBUG] Building Maven user-level plugin registry from: 'D:\Dokumente und Einstellungen\H2841\.m2\plugin-registry.xml'
[DEBUG] Building Maven global-level plugin registry from: 'c:\maven-2.0.5\conf\plugin-registry.xml'
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[DEBUG] maven-archetype-plugin: using locally installed snapshot
[DEBUG] maven-archetype-plugin: resolved to version 1.0-alpha-4 from repository snapshots
[DEBUG] Retrieving parent-POM: org.apache.maven.archetype:maven-archetype::1.0-alpha-4 for project: org.apache.maven.plugins:maven-archetype-plugin:maven-plugin:1.0-alpha-4 from the repository.
[DEBUG] Retrieving parent-POM: org.apache.maven:maven-parent::1 for project: org.apache.maven.archetype:maven-archetype:pom:1.0-alpha-4 from the repository.
[DEBUG] Retrieving parent-POM: org.apache:apache::1 for project: org.apache.maven:maven-parent:pom:1 from the repository.
[INFO] ----------------------------------------------------------------------------
[INFO] Building Unnamed - foo:bar:jar:1.0-SNAPSHOT
[INFO] task-segment: [archetype:create] (aggregator-style)
[INFO] ----------------------------------------------------------------------------
[DEBUG] org.apache.maven.plugins:maven-archetype-plugin:maven-plugin:1.0-alpha-4:runtime (selected for runtime)
[DEBUG] Retrieving parent-POM: org.apache.maven.archetype:maven-archetype::1.0-alpha-4 for project: null:maven-archetype-creator:jar:1.0-alpha-4 from the repository.
[DEBUG] Retrieving parent-POM: org.apache.maven:maven-parent::1 for project: org.apache.maven.archetype:maven-archetype:pom:1.0-alpha-4 from the repository.
[DEBUG] Retrieving parent-POM: org.apache:apache::1 for project: org.apache.maven:maven-parent:pom:1 from the repository.
[DEBUG] org.apache.maven.archetype:maven-archetype-creator:jar:1.0-alpha-4:runtime (selected for runtime)
[DEBUG] Retrieving parent-POM: org.apache.maven.archetype:maven-archetype::1.0-alpha-4 for project: null:maven-archetype-model:jar:1.0-alpha-4 from the repository.
[DEBUG] Retrieving parent-POM: org.apache.maven:maven-parent::1 for project: org.apache.maven.archetype:maven-archetype:pom:1.0-alpha-4 from the repository.
[DEBUG] Retrieving parent-POM: org.apache:apache::1 for project: org.apache.maven:maven-parent:pom:1 from the repository.
[DEBUG] org.apache.maven.archetype:maven-archetype-model:jar:1.0-alpha-4:runtime (selected for runtime)
[DEBUG] Retrieving parent-POM: org.codehaus.plexus:plexus::1.0.4 for project: null:plexus-utils:jar:1.1 from the repository.
[DEBUG] org.codehaus.plexus:plexus-utils:jar:1.1:runtime (selected for runtime)
[DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0 for project: null:maven-project:jar:2.0 from the repository.
[DEBUG] org.apache.maven:maven-project:jar:2.0:runtime (selected for runtime)
[DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0 for project: null:maven-profile:jar:2.0 from the repository.
[DEBUG] org.apache.maven:maven-profile:jar:2.0:runtime (selected for runtime)
[DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0 for project: org.apache.maven:maven-model:jar:2.0 from the repository.
[DEBUG] org.apache.maven:maven-model:jar:2.0:runtime (selected for runtime)
[DEBUG] org.codehaus.plexus:plexus-utils:jar:1.0.4:runtime (removed - nearer found: 1.1)
[DEBUG] org.codehaus.plexus:plexus-utils:jar:1.0.4:runtime (removed - nearer found: 1.1)
[DEBUG] org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-8:runtime (selected for runtime)
[DEBUG] org.codehaus.plexus:plexus-utils:jar:1.0.4:runtime (removed - nearer found: 1.1)
[DEBUG] junit:junit:jar:3.8.1:runtime (selected for runtime)
[DEBUG] classworlds:classworlds:jar:1.1-alpha-2:runtime (selected for runtime)
[DEBUG] org.apache.maven:maven-model:jar:2.0:runtime (selected for runtime)
[DEBUG] org.codehaus.plexus:plexus-utils:jar:1.0.4:runtime (removed - nearer found: 1.1)
[DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0 for project: org.apache.maven:maven-artifact-manager:jar:2.0 from the repository.
[DEBUG] org.apache.maven:maven-artifact-manager:jar:2.0:runtime (selected for runtime)
[DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0 for project: org.apache.maven:maven-repository-metadata:jar:2.0 from the repository.
[DEBUG] org.apache.maven:maven-repository-metadata:jar:2.0:runtime (selected for runtime)
[DEBUG] org.codehaus.plexus:plexus-utils:jar:1.0.4:runtime (removed - nearer found: 1.1)
[DEBUG] org.codehaus.plexus:plexus-utils:jar:1.0.4:runtime (removed - nearer found: 1.1)
[DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0 for project: org.apache.maven:maven-artifact:jar:2.0 from the repository.
[DEBUG] org.apache.maven:maven-artifact:jar:2.0:runtime (selected for runtime)
[DEBUG] org.codehaus.plexus:plexus-utils:jar:1.0.4:runtime (removed - nearer found: 1.1)
[DEBUG] org.apache.maven.wagon:wagon-provider-api:jar:1.0-alpha-5:runtime (selected for runtime)
[DEBUG] org.codehaus.plexus:plexus-utils:jar:1.0.4:runtime (removed - nearer found: 1.1)
[DEBUG] org.codehaus.plexus:plexus-utils:jar:1.0.4:runtime (removed - nearer found: 1.1)
[DEBUG] org.apache.maven:maven-artifact:jar:2.0:runtime (selected for runtime)
[DEBUG] org.codehaus.plexus:plexus-utils:jar:1.0.4:runtime (removed - nearer found: 1.1)
[DEBUG] org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-8:runtime (selected for runtime)
[DEBUG] org.codehaus.plexus:plexus-utils:jar:1.0.4:runtime (removed - nearer found: 1.1)
[DEBUG] junit:junit:jar:3.8.1:runtime (selected for runtime)
[DEBUG] classworlds:classworlds:jar:1.1-alpha-2:runtime (selected for runtime)
[DEBUG] Retrieving parent-POM: org.codehaus.plexus:plexus-containers::1.0.3 for project: null:plexus-container-default:jar:1.0-alpha-9 from the repository.
[DEBUG] Retrieving parent-POM: org.codehaus.plexus:plexus::1.0.4 for project: org.codehaus.plexus:plexus-containers:pom:1.0.3 from the repository.
[DEBUG] org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-8:runtime (removed - nearer found: 1.0-alpha-9)
[DEBUG] org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9:runtime (selected for runtime)
[DEBUG] junit:junit:jar:3.8.1:runtime (selected for runtime)
[DEBUG] org.codehaus.plexus:plexus-utils:jar:1.0.4:runtime (removed - nearer found: 1.1)
[DEBUG] classworlds:classworlds:jar:1.1-alpha-2:runtime (selected for runtime)
[DEBUG] Retrieving parent-POM: org.codehaus.plexus:plexus-components::1.1.4 for project: null:plexus-archiver:jar:1.0-alpha-5 from the repository.
[DEBUG] Retrieving parent-POM: org.codehaus.plexus:plexus::1.0.4 for project: org.codehaus.plexus:plexus-components:pom:1.1.4 from the repository.
[DEBUG] org.codehaus.plexus:plexus-archiver:jar:1.0-alpha-5:runtime (selected for runtime)
[DEBUG] org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-8:runtime (removed - nearer found: 1.0-alpha-9)
[DEBUG] oro:oro:jar:2.0.8:runtime (selected for runtime)
[DEBUG] org.apache.maven:maven-project:jar:2.0:runtime (selected for runtime)
[DEBUG] org.apache.maven:maven-profile:jar:2.0:runtime (selected for runtime)
[DEBUG] org.apache.maven:maven-model:jar:2.0:runtime (selected for runtime)
[DEBUG] org.codehaus.plexus:plexus-utils:jar:1.0.4:runtime (removed - nearer found: 1.1)
[DEBUG] org.codehaus.plexus:plexus-utils:jar:1.0.4:runtime (removed - nearer found: 1.1)
[DEBUG] org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-8:runtime (removed - nearer found: 1.0-alpha-9)
[DEBUG] org.apache.maven:maven-model:jar:2.0:runtime (selected for runtime)
[DEBUG] org.codehaus.plexus:plexus-utils:jar:1.0.4:runtime (removed - nearer found: 1.1)
[DEBUG] org.apache.maven:maven-artifact-manager:jar:2.0:runtime (selected for runtime)
[DEBUG] org.apache.maven:maven-repository-metadata:jar:2.0:runtime (selected for runtime)
[DEBUG] org.codehaus.plexus:plexus-utils:jar:1.0.4:runtime (removed - nearer found: 1.1)
[DEBUG] org.codehaus.plexus:plexus-utils:jar:1.0.4:runtime (removed - nearer found: 1.1)
[DEBUG] org.apache.maven:maven-artifact:jar:2.0:runtime (selected for runtime)
[DEBUG] org.codehaus.plexus:plexus-utils:jar:1.0.4:runtime (removed - nearer found: 1.1)
[DEBUG] org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-8:runtime (removed - nearer found: 1.0-alpha-9)
[DEBUG] org.apache.maven.wagon:wagon-provider-api:jar:1.0-alpha-5:runtime (selected for runtime)
[DEBUG] org.codehaus.plexus:plexus-utils:jar:1.0.4:runtime (removed - nearer found: 1.1)
[DEBUG] org.codehaus.plexus:plexus-utils:jar:1.1:runtime (removed - nearer found: 1.0.4)
[DEBUG] org.codehaus.plexus:plexus-utils:jar:1.0.4:runtime (selected for runtime)
[DEBUG] org.apache.maven:maven-artifact:jar:2.0:runtime (selected for runtime)
[DEBUG] org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-8:runtime (removed - nearer found: 1.0-alpha-9)
[DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0 for project: org.apache.maven:maven-plugin-api:jar:2.0 from the repository.
[DEBUG] org.apache.maven:maven-plugin-api:jar:2.0:runtime (selected for runtime)
[DEBUG] Retrieving parent-POM: org.apache.maven.archetype:maven-archetype::1.0-alpha-4 for project: org.apache.maven.archetype:maven-archetype-core:jar:1.0-alpha-4 from the repository.
[DEBUG] Retrieving parent-POM: org.apache.maven:maven-parent::1 for project: org.apache.maven.archetype:maven-archetype:pom:1.0-alpha-4 from the repository.
[DEBUG] Retrieving parent-POM: org.apache:apache::1 for project: org.apache.maven:maven-parent:pom:1 from the repository.
[DEBUG] org.apache.maven.archetype:maven-archetype-core:jar:1.0-alpha-4:runtime (selected for runtime)
[DEBUG] org.codehaus.plexus:plexus-velocity:jar:1.1.2:runtime (selected for runtime)
[DEBUG] Retrieving parent-POM: plexus:plexus-containers::1.0.2 for project: org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-7 from the repository.
[DEBUG] Retrieving parent-POM: plexus:plexus-root::1.0.3 for project: plexus:plexus-containers:pom:1.0.2 from the repository.
[DEBUG] org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-7:runtime (removed - nearer found: 1.0-alpha-9)
[DEBUG] Retrieving parent-POM: plexus:plexus-root::1.0.3 for project: plexus:plexus-utils:jar:1.0.2 from the repository.
[DEBUG] plexus:plexus-utils:jar:1.0.2:runtime (selected for runtime)
[DEBUG] commons-collections:commons-collections:jar:2.0:runtime (selected for runtime)
[DEBUG] commons-logging:commons-logging-api:jar:1.0.4:runtime (selected for runtime)
[DEBUG] velocity:velocity:jar:1.4:runtime (selected for runtime)
[DEBUG] velocity:velocity-dep:jar:1.4:runtime (selected for runtime)
[DEBUG] org.codehaus.plexus:plexus-utils:jar:1.1:runtime (removed - nearer found: 1.0.4)
[DEBUG] dom4j:dom4j:jar:1.6.1:runtime (selected for runtime)
[DEBUG] xml-apis:xml-apis:jar:1.0.b2:runtime (selected for runtime)
[DEBUG] org.apache.maven:maven-artifact:jar:2.0:runtime (selected for runtime)
[INFO] Setting property: classpath.resource.loader.class => 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
[INFO] Setting property: velocimacro.messages.on => 'false'.
[INFO] Setting property: resource.loader => 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound => 'false'.
[INFO] **************************************************************
[INFO] Starting Jakarta Velocity v1.4
[INFO] RuntimeInstance initializing.
[INFO] Default Properties File: org\apache\velocity\runtime\defaults\velocity.properties
[INFO] Default ResourceManager initializing. (class org.apache.velocity.runtime.resource.ResourceManagerImpl)
[INFO] Resource Loader Instantiated: org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader
[INFO] ClasspathResourceLoader : initialization starting.
[INFO] ClasspathResourceLoader : initialization complete.
[INFO] ResourceCache : initialized. (class org.apache.velocity.runtime.resource.ResourceCacheImpl)
[INFO] Default ResourceManager initialization complete.
[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Literal
[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Macro
[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Parse
[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Include
[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Foreach
[INFO] Created: 20 parsers.
[INFO] Velocimacro : initialization starting.
[INFO] Velocimacro : adding VMs from VM library template : VM_global_library.vm
[ERROR] ResourceManager : unable to find resource 'VM_global_library.vm' in any resource loader.
[INFO] Velocimacro : error using VM library template VM_global_library.vm : org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource 'VM_global_library.vm'
[INFO] Velocimacro : VM library template macro registration complete.
[INFO] Velocimacro : allowInline = true : VMs can be defined inline in templates
[INFO] Velocimacro : allowInlineToOverride = false : VMs defined inline may NOT replace previous VM definitions
[INFO] Velocimacro : allowInlineLocal = false : VMs defined inline will be global in scope if allowed.
[INFO] Velocimacro : initialization complete.
[INFO] Velocity successfully started.
[DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-archetype-plugin:1.0-alpha-4:create' -->
[DEBUG] (f) archetypeArtifactId = maven-archetype-quickstart
[DEBUG] (f) archetypeGroupId = org.apache.maven.archetypes
[DEBUG] (f) archetypeVersion = RELEASE
[DEBUG] (f) localRepository = [local] -> file://D:\Dokumente und Einstellungen\H2841\.m2\repository
[DEBUG] (f) pomRemoteRepositories = [[central] -> http://localhost:4080/artifactory/repo, [snapshots] -> http://localhost:4080/artifactory/repo]
[DEBUG] (f) project = org.apache.maven.project.MavenProject@943caa58
[DEBUG] (f) version = 1.0-SNAPSHOT
[DEBUG] -- end configuration --
[INFO] [archetype:create]
[INFO] Defaulting package to group ID: foo
[DEBUG] maven-archetype-quickstart: resolved to version 1.0 from repository snapshots
[INFO] ----------------------------------------------------------------------------
[INFO] Using following parameters for creating Archetype: maven-archetype-quickstart:RELEASE
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: foo
[INFO] Parameter: packageName, Value: foo
[INFO] Parameter: package, Value: foo
[INFO] Parameter: artifactId, Value: null
[INFO] Parameter: basedir, Value: C:\cygwin\home\H2841\asd\foo
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error creating from archetype
Embedded error: Artifact ID must be specified when creating a new project from an archetype.
[INFO] ------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error creating from archetype
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:564)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:493)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:463)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:224)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.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(DelegatingMethodAccessorImpl.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.plugin.MojoExecutionException: Error creating from archetype
at org.apache.maven.plugin.archetype.MavenArchetypeMojo.execute(MavenArchetypeMojo.java:201)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:420)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
... 16 more
Caused by: org.apache.maven.archetype.ArchetypeTemplateProcessingException: Artifact ID must be specified when creating a new project from an archetype.
at org.apache.maven.archetype.DefaultArchetype.createArchetype(DefaultArchetype.java:225)
at org.apache.maven.plugin.archetype.MavenArchetypeMojo.execute(MavenArchetypeMojo.java:188)
... 18 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Tue Mar 13 18:53:20 CET 2007
[INFO] Final Memory: 5M/9M
[INFO] ------------------------------------------------------------------------
~/foo
$
As you can see, suddenly there's a line showing the remote repository configuration from my settings.xml...
Can someone tell me what's going on here? Is this a bug?
Thorsten
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [m2] Maven ignoring Artifactory proxy settings?
Posted by Thorsten Heit <th...@gmx.de>.
> > To check it I fully removed the local repository cache and created a new
> empty directory that doesn't contain any pom.xml. Now when I start Maven
> from within that directory I'd expect that Maven first downloads the
> necessary plugins, but for some unknown reasons Maven doesn't (correctly?) use my
> settings - I'm always getting a build error message. Example:
> >
> > ~/asd/foo
> > $ ll
> > total 0
> > drwxr-xr-x+ 2 H2841 Kein 0 Mar 14 11:40 ./
> > drwxr-xr-x+ 5 H2841 Kein 0 Mar 13 10:38 ../
> >
> > ~/asd/foo
> > $ mvn -e -X package
> ...
> > As you can see in that stack trace there are no attempts to contact my
> proxy server...
>
> True, even mvn deploy:deploy-file downloads from central (rather than
> my proxy defined in settings.xml) when there are no plugins in my
> local repo and no pom.xml present. [1]
>
> But it does "see" settings.xml in order to get the info from <server>.
> I wonder whether that's Maven itself, or the deploy plugin.
I assume it is Maven itself because the same error occurred when with compile, site, package, jar:jar etc.
> > Any ideas what's wrong here?
>
> Probably http://jira.codehaus.org/browse/MNG-2261
Thanks, I'll watch this.
Thorsten
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [m2] Maven ignoring Artifactory proxy settings?
Posted by Wendy Smoak <ws...@gmail.com>.
On 3/14/07, Thorsten Heit <th...@gmx.de> wrote:
> To check it I fully removed the local repository cache and created a new empty directory that doesn't contain any pom.xml. Now when I start Maven from within that directory I'd expect that Maven first downloads the necessary plugins, but for some unknown reasons Maven doesn't (correctly?) use my settings - I'm always getting a build error message. Example:
>
> ~/asd/foo
> $ ll
> total 0
> drwxr-xr-x+ 2 H2841 Kein 0 Mar 14 11:40 ./
> drwxr-xr-x+ 5 H2841 Kein 0 Mar 13 10:38 ../
>
> ~/asd/foo
> $ mvn -e -X package
...
> As you can see in that stack trace there are no attempts to contact my proxy server...
True, even mvn deploy:deploy-file downloads from central (rather than
my proxy defined in settings.xml) when there are no plugins in my
local repo and no pom.xml present. [1]
But it does "see" settings.xml in order to get the info from <server>.
I wonder whether that's Maven itself, or the deploy plugin.
> Any ideas what's wrong here?
Probably http://jira.codehaus.org/browse/MNG-2261
[1] I need webdav for deployment, so I always have a pom.xml present
with the wagon-webdav build extension, and never noticed this.
--
Wendy
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [m2] Maven ignoring Artifactory proxy settings?
Posted by Thorsten Heit <th...@gmx.de>.
Hi Wendy,
> Archetype does not use settings.xml :
> http://jira.codehaus.org/browse/ARCHETYPE-59
>
> You can use -DremoteRepositories=... to tell it where to find
> repositories and other artifacts, (but that won't help you _override_
> the url for the central repo.)
>
> While Maven does pick up a pom.xml in the current directory [1], I
> don't think it's universally true that settings.xml is ignored unless
> there is a pom.xml file present.
>
> For example, try mvn deploy:deploy-file, which does not require
> pom.xml, but will use <server> from settings.xml for
> userid/password/privateKey.
To check it I fully removed the local repository cache and created a new empty directory that doesn't contain any pom.xml. Now when I start Maven from within that directory I'd expect that Maven first downloads the necessary plugins, but for some unknown reasons Maven doesn't (correctly?) use my settings - I'm always getting a build error message. Example:
~/asd/foo
$ ll
total 0
drwxr-xr-x+ 2 H2841 Kein 0 Mar 14 11:40 ./
drwxr-xr-x+ 5 H2841 Kein 0 Mar 13 10:38 ../
~/asd/foo
$ mvn -e -X package
+ Error stacktraces are turned on.
Maven version: 2.0.5
[DEBUG] Building Maven user-level plugin registry from: 'D:\Dokumente und Einstellungen\H2841\.m2\plugin-registry.xml'
[DEBUG] Building Maven global-level plugin registry from: 'c:\maven-2.0.5\conf\plugin-registry.xml'
[INFO] Scanning for projects...
[INFO] ----------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO] task-segment: [package]
[INFO] ----------------------------------------------------------------------------
[DEBUG] maven-resources-plugin: using locally installed snapshot
[DEBUG] maven-resources-plugin: using locally installed snapshot
[DEBUG] Artifact not found - using stub model: Unable to determine the latest version
org.apache.maven.plugins:maven-resources-plugin:pom:LATEST
[DEBUG] Using defaults for missing POM org.apache.maven.plugins:maven-resources-plugin:pom:LATEST
[DEBUG] maven-resources-plugin: using locally installed snapshot
[DEBUG] Artifact not found - using stub model: Unable to determine the release version
org.apache.maven.plugins:maven-resources-plugin:pom:RELEASE
[DEBUG] Using defaults for missing POM org.apache.maven.plugins:maven-resources-plugin:pom:RELEASE
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] The plugin 'org.apache.maven.plugins:maven-resources-plugin' does not exist or no valid version could be found
[INFO] ------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: The plugin 'org.apache.maven.plugins:maven-resources-plugin' does not exist or no valid version could be found
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1286)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor(DefaultLifecycleExecutor.java:1522)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.bindLifecycleForPackaging(DefaultLifecycleExecutor.java:1016)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.constructLifecycleMappings(DefaultLifecycleExecutor.java:980)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:458)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.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(DelegatingMethodAccessorImpl.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.plugin.version.PluginVersionNotFoundException: The plugin 'org.apache.maven.plugins:maven-resources-plugin' does not exist or no valid version could be found
at org.apache.maven.plugin.version.DefaultPluginVersionManager.resolvePluginVersion(DefaultPluginVersionManager.java:228)
at org.apache.maven.plugin.version.DefaultPluginVersionManager.resolvePluginVersion(DefaultPluginVersionManager.java:90)
at org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPluginManager.java:161)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1257)
... 18 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Wed Mar 14 11:50:20 CET 2007
[INFO] Final Memory: 1M/4M
[INFO] ------------------------------------------------------------------------
~/asd/foo
$
As you can see in that stack trace there are no attempts to contact my proxy server...
Any ideas what's wrong here?
Thorsten
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [m2] Maven ignoring Artifactory proxy settings?
Posted by Wendy Smoak <ws...@gmail.com>.
On 3/13/07, Thorsten Heit <th...@gmx.de> wrote:
> As long as I execute Maven commands in a directory which already contains a pom.xml, everything works as expected: Building, compiling, deploying etc. When I execute Maven commands in an empty directory, say, "mvn archetype:create -DgroupId=foo -DartifactId=bar", Maven obviously ignores my proxy settings and doesn't find plugins anymore:
Archetype does not use settings.xml :
http://jira.codehaus.org/browse/ARCHETYPE-59
You can use -DremoteRepositories=... to tell it where to find
repositories and other artifacts, (but that won't help you _override_
the url for the central repo.)
While Maven does pick up a pom.xml in the current directory [1], I
don't think it's universally true that settings.xml is ignored unless
there is a pom.xml file present.
For example, try mvn deploy:deploy-file, which does not require
pom.xml, but will use <server> from settings.xml for
userid/password/privateKey.
[1] and thus you may have found a workaround for ARCHETYPE-59
--
Wendy
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org