« Return to Thread: Created: (MSHARED-103) custom classpath layout type using layout ${artifact.artifactId}.${artifact.extension} generate null.null

Commented: (MSHARED-103) custom classpath layout type using layout ${artifact.artifactId}.${artifact.extension} generate null.null

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View in Thread


    [ http://jira.codehaus.org/browse/MSHARED-103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=182398#action_182398 ]

Ronald van de Kuil commented on MSHARED-103:
--------------------------------------------

It works fine for me:

                        <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
                                <artifactId>maven-jar-plugin</artifactId>
                                <version>2.2</version>
                                <configuration>
                                        <finalName>HbrLibrary</finalName>
                                        <archive>
                                                <index>true</index>
                                                <!-- currently, log4j -->
                                                <manifest>
                                                        <addClasspath>true</addClasspath>
                                                        <classpathLayoutType>custom</classpathLayoutType>
                                                        <customClasspathLayout>$${artifact.artifactId}.$${artifact.extension}</customClasspathLayout>
                                                </manifest>
                                                <manifestEntries>
                                                        <ServiceLibrary>true</ServiceLibrary>
                                                </manifestEntries>
                                               
                                                <!-- do not update the archive when its timestamp is older than any of the included files -->
                                                <forced>false</forced>
                                               
                                        </archive>
                                </configuration>
                                <!--  support for the customClasspathLayout -->
                                <dependencies>
                                        <dependency>
                                                <groupId>org.apache.maven</groupId>
                                                <artifactId>maven-archiver</artifactId>
                                                <version>2.4</version>
                                        </dependency>
                                </dependencies>
                        </plugin>

> custom classpath layout type using layout ${artifact.artifactId}.${artifact.extension} generate null.null
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: MSHARED-103
>                 URL: http://jira.codehaus.org/browse/MSHARED-103
>             Project: Maven Shared Components
>          Issue Type: Bug
>          Components: maven-archiver
>    Affects Versions: maven-archiver-2.4
>         Environment: windows XP, maven 2.0.9, jdk 1.4.2_11
>            Reporter: Herve FARGETON
>
> Hello,
> My need is to dynamically create the Manifest, based on pom datas. For classpath, I'd like to list dependencies using only their artifactId (without version).
> so, on maven2 jar plugin, I've tried to add the configuration, as defined at http://maven.apache.org/shared/maven-archiver/examples/classpath.html#Custom
> Dependency to version 2.4 of maven-archiver is well managed.
> Using it, I generate the following entry in the MANIFEST.MF :
> ...
> Class-Path: null.null null.null null.null null.null
> ...
> As you can see, I have 4 dependencies. Where is the problem ?
> ... I've tried to use it with maven-artifact:2.0.9 - no more success.
> Have you an idea ? Does it works for you ?
> Thinks for your help
> Herve

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

 « Return to Thread: Created: (MSHARED-103) custom classpath layout type using layout ${artifact.artifactId}.${artifact.extension} generate null.null