added a comment - I am still seeing this issue in version 2.3 of the maven-install-plugin with the original attached pom.xml. I am not seeing a classified pom installed in my local maven repository. I tried both maven 2.2.1 and 2.0.10 and got the same result. Here is the debug log produced from the plugin:
{{
[DEBUG] Plugin dependencies for:
org.apache.maven.plugins:maven-install-plugin:2.3
are:
org.apache.maven:maven-plugin-api:jar:2.0.6:runtime
org.apache.maven:maven-project:jar:2.0.6:runtime
org.apache.maven:maven-model:jar:2.0.6:runtime
org.apache.maven:maven-artifact-manager:jar:2.0.6:runtime
org.apache.maven:maven-artifact:jar:2.0.6:runtime
org.codehaus.plexus:plexus-utils:jar:1.5.6:runtime
org.codehaus.plexus:plexus-digest:jar:1.0:runtime
[DEBUG] org.apache.maven.plugins:maven-install-plugin:maven-plugin:2.3:runtime (selected for runtime)
[DEBUG] org.apache.maven:maven-plugin-api:jar:2.0.6:runtime (selected for runtime)
[DEBUG] org.apache.maven:maven-project:jar:2.0.6:runtime (selected for runtime)
[DEBUG] org.apache.maven:maven-settings:jar:2.0.6:runtime (selected for runtime)
[DEBUG] org.apache.maven:maven-model:jar:2.0.6:runtime (selected for runtime)
[DEBUG] org.codehaus.plexus:plexus-utils:jar:1.4.1:runtime (selected for runtime)
[DEBUG] org.codehaus.plexus:plexus-utils:jar:1.4.1:runtime (selected for runtime)
[DEBUG] org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1: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.4.1)
[DEBUG] classworlds:classworlds:jar:1.1-alpha-2:runtime (selected for runtime)
[DEBUG] org.apache.maven:maven-profile:jar:2.0.6:runtime (selected for runtime)
[DEBUG] org.apache.maven:maven-model:jar:2.0.6:runtime (selected for runtime)
[DEBUG] org.apache.maven:maven-artifact-manager:jar:2.0.6:runtime (selected for runtime)
[DEBUG] org.apache.maven:maven-repository-metadata:jar:2.0.6:runtime (selected for runtime)
[DEBUG] org.apache.maven:maven-artifact:jar:2.0.6:runtime (selected for runtime)
[DEBUG] org.apache.maven.wagon:wagon-provider-api:jar:1.0-beta-2:runtime (selected for runtime)
[DEBUG] org.codehaus.plexus:plexus-utils:jar:1.0.4:runtime (removed - nearer found: 1.4.1)
[DEBUG] org.apache.maven:maven-plugin-registry:jar:2.0.6:runtime (selected for runtime)
[DEBUG] org.codehaus.plexus:plexus-utils:jar:1.4.1:runtime (selected for runtime)
[DEBUG] org.apache.maven:maven-artifact:jar:2.0.6:runtime (selected for runtime)
[DEBUG] org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1: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.4.1)
[DEBUG] classworlds:classworlds:jar:1.1-alpha-2:runtime (selected for runtime)
[DEBUG] org.apache.maven:maven-model:jar:2.0.6:runtime (selected for runtime)
[DEBUG] org.apache.maven:maven-artifact-manager:jar:2.0.6:runtime (selected for runtime)
[DEBUG] org.apache.maven:maven-repository-metadata:jar:2.0.6:runtime (selected for runtime)
[DEBUG] org.apache.maven.wagon:wagon-provider-api:jar:1.0-beta-2:runtime (selected for runtime)
[DEBUG] org.codehaus.plexus:plexus-utils:jar:1.0.4:runtime (removed - nearer found: 1.4.1)
[DEBUG] org.apache.maven:maven-artifact:jar:2.0.6:runtime (selected for runtime)
[DEBUG] org.codehaus.plexus:plexus-utils:jar:1.4.1:runtime (removed - nearer found: 1.5.6)
[DEBUG] org.codehaus.plexus:plexus-utils:jar:1.5.6:runtime (selected for runtime)
[DEBUG] Retrieving parent-POM: org.codehaus.plexus:plexus-components:pom:1.1.7 for project: null:plexus-digest:jar:1.0 from the repository.
[DEBUG] org.codehaus.plexus:plexus-digest:jar:1.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-stable-1)
[DEBUG] The following artifacts were filtered out for plugin: org.apache.maven.plugins:maven-install-plugin:2.3 because they're already in the core of Maven:
org.apache.maven:maven-plugin-api:jar:2.0.6:runtime
org.apache.maven:maven-project:jar:2.0.6:runtime
org.apache.maven:maven-model:jar:2.0.6:runtime
org.apache.maven:maven-artifact-manager:jar:2.0.6:runtime
org.apache.maven:maven-artifact:jar:2.0.6:runtime
These will use the artifact files already in the core ClassRealm instead, to allow them to be included in PluginDescriptor.getArtifacts().
[DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-install-plugin:2.3:install' -->
[DEBUG] (f) artifact = foo.bar.B:foobar-b:jar:1.0-SNAPSHOT
[DEBUG] (f) attachedArtifacts = []
[DEBUG] (f) createChecksum = false
[DEBUG] (f) localRepository =
[local] ->
file://C:\Users\Eduard\.m2\repository
[DEBUG] (f) packaging = jar
[DEBUG] (f) pomFile = G:\Projects\Test\testjar\pom.xml
[DEBUG] (f) updateReleaseInfo = false
[DEBUG] – end configuration –
[INFO] [install:install]
[INFO] Installing G:\Projects\Test\testjar\target\foobar-b-1.0-SNAPSHOT.jar to C:\Users\Eduard\.m2\repository\foo\bar\B\foobar-b\1.0-SNAPSHOT\foobar-b-1.0-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3 seconds
[INFO] Finished at: Sat Feb 06 20:33:15 EST 2010
[INFO] Final Memory: 18M/245M
[INFO] ------------------------------------------------------------------------
}}
I think it is a BUG because it is recommended to use classifier to distinguish between different deployment environments. Look Building For Different Environments with Maven 2 - http://maven.apache.org/guides/mini/guide-building-for-different-environments.html.
I have similar experience with ejb, war and ear project types.