"Eric Redmond" <[EMAIL PROTECTED]> writes:
> I wrote a little bit about it here - though I suppose it wouldn't hurt going
> into more depth.
>
> http://www.sonatype.com/book/repository.html#tips_and_tricks
>
> Please read, and request any clarifications so I can fix the book. Thanks :)
>
Hello,
Thanks for the pointer, I have read it before but could not put my
hands on it. I still have a problem. I defined the following custom
artifacthandler and lifecycle:
<component-set>
<components>
<!-- basic transporter -->
<component>
<role>oqube.maven.patch.mojo.Transporter</role>
<role-hint>default</role-hint>
<implementation>oqube.maven.patch.mojo.DefaultTransporter</implementation>
</component>
<!-- the custom lifecycle mapping -->
<component>
<role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
<role-hint>patch</role-hint>
<implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping</implementation>
<configuration>
<phases>
<generate-sources>oqube.maven:patch-maven-plugin:fetch,oqube.maven:patch-maven-plugin:patch</generate-sources>
<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>
org.apache.maven.plugins:maven-jar-plugin:jar
</package>
<install>org.apache.maven.plugins:maven-install-plugin:install</install>
<deploy>org.apache.maven.plugins:maven-deploy-plugin:deploy</deploy>
</phases>
</configuration>
</component>
<!-- custom artifact definition -->
<component>
<role>org.apache.maven.artifact.handler.ArtifactHandler</role>
<role-hint>patch</role-hint>
<implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
<configuration>
<classifier>patch</classifier>
<extension>jar</extension>
<type>patch</type>
<packaging>jar</packaging>
<language>java</language>
<addedToClasspath>true</addedToClasspath>
</configuration>
</component>
</components>
</component-set>
I also defined integration tests, with the following pom:
<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>oqube.maven.patch</groupId>
<artifactId>test-patch-plugin</artifactId>
<packaging>patch</packaging>
<version>1</version>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<groupId>oqube.maven</groupId>
<artifactId>patch-maven-plugin</artifactId>
<extensions>true</extensions>
<dependencies>
<dependency>
<groupId>oqube.maven</groupId>
<artifactId>patch-gnu</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
<version>1.0-it-SNAPSHOT</version>
<configuration>
<url>file:///${basedir}/src/resources/sources.jar</url>
<packing>jar</packing>
<patchs>
<patch>patch1.patch</patch>
<patch>patch2.patch</patch>
<patch>patch3.patch</patch>
</patchs>
</configuration>
</plugin>
</plugins>
</build>
</project>
The artifact gets installed as expected, which is great, but not with
the expected components; I have installed:
oqube.maven.patch/test-patch-plugin/1/test-patch-plugin-1.patch
but given the descriptor, I would have expected:
oqube.maven.patch/test-patch-plugin/1/test-patch-plugin-1-patch.jar
Are my expectations wrong ?
Thanks for your help.
--
OQube < software engineering \ génie logiciel >
Arnaud Bailly, Dr.
\web> http://www.oqube.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]