I create a new packaging type call tb-war and I define
DefaultArtifactHandler related to it.

> <component>
>
<role>
>
org.apache.maven.artifact.handler.ArtifactHandler
>
</role>
>
<role-hint>tb-war</role-hint>
>
<implementation>
>
org.apache.maven.artifact.handler.DefaultArtifactHandler
>
</implementation>
>
<configuration>
>
<language>java</language>
>
<extension>war</extension>
>
<addedToClasspath>false</addedToClasspath>
>
<includesDependencies>ture</includesDependencies>
>
<type>tb-war</type>
>
</configuration>
>
</component>

my own packaging type works, can I can use tb-war in my new pom.xml, but
the DefaultArtifactHandler dont work, and I debug into the source code, and
found:my configuration dont works. maven create new
DefaultArtifactHandler every
time himself, and my own extension cant works.
Is this a maven bug or my configuration error?,some one can help me ?

    public ArtifactHandler getArtifactHandler( String type )
>
    {
>
        ArtifactHandler handler = (ArtifactHandler) artifactHandlers.get(
> type );
>

>         if ( handler == null )
>
        {
>
            handler = new DefaultArtifactHandler( type );
>
        }
>

>         return handler;
>
    }
>
<component-set>
	<components>
		<component>
			<role>
				org.apache.maven.lifecycle.mapping.LifecycleMapping
			</role>
			<role-hint>tb-war</role-hint>
			<implementation>
				org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping
			</implementation>
			<configuration>
				<lifecycles>
					<lifecycle>
						<id>default</id>
						<phases>
							<process-resources>
								org.apache.maven.plugins:maven-resources-plugin:resources
							</process-resources>
							<compile>
								org.apache.maven.plugins:maven-compiler-plugin:compile
							</compile>
							<process-test-resources>
								org.apache.maven.plugins:maven-resources-plugin:testResources
							</process-test-resources>
							<test-compile>
							    org.apache.maven.plugins:maven-compiler-plugin:testCompile
							</test-compile>
							<test>
							 	org.apache.maven.plugins:maven-surefire-plugin:test
							</test>
							<package>
								com.taobao.maventool:maven-tbwar-plugin:tbwar
							</package>
							<install>
								org.apache.maven.plugins:maven-install-plugin:install
							</install>
							<deploy>
								org.apache.maven.plugins:maven-deploy-plugin:deploy
							</deploy>
						</phases>
					</lifecycle>
				</lifecycles>
			</configuration>
		</component>

		<component>
			<role>
				org.apache.maven.artifact.handler.ArtifactHandler
			</role>
			<role-hint>tb-war</role-hint>
			<implementation>
				org.apache.maven.artifact.handler.DefaultArtifactHandler
			</implementation>
			<configuration>
				<language>java</language>
				<extension>war</extension>
				<addedToClasspath>false</addedToClasspath>
				<includesDependencies>ture</includesDependencies>
				<type>tb-war</type>
			</configuration>
		</component>
	</components>
</component-set>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to