You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Michael Osipov (JIRA)" <ji...@codehaus.org> on 2014/11/25 21:32:21 UTC

[jira] (MECLIPSE-467) problem with the way the _ and - get transformed

     [ https://jira.codehaus.org/browse/MECLIPSE-467?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Osipov closed MECLIPSE-467.
-----------------------------------

    Resolution: Won't Fix

Please refer to https://cwiki.apache.org/confluence/display/MAVEN/The+Great+JIRA+Cleanup+of+2014 if you're wondering why this issue was closed out.

> problem with the way the _ and - get transformed
> ------------------------------------------------
>
>                 Key: MECLIPSE-467
>                 URL: https://jira.codehaus.org/browse/MECLIPSE-467
>             Project: Maven Eclipse Plugin
>          Issue Type: Bug
>          Components: OSGi, Manifest
>            Reporter: charles prevot
>            Priority: Critical
>
> I am having some troubles building an RCP application with maven. I had to modify DefaultMaven2OsgiConverter. 
> Here is a brief explanation of my problem:
> * I have {{org.eclipse.core.commands_3.4.0.I20080509-2000.jar}} in my {{eclipse/plugins}} directory
> * After a {{mvn eclipse:to-maven}}, I have {{org/eclipse/core/commands/3.4.0-I20080509-2000/commands-3.4.0-I20080509-2000.jar}} in my repository.
> *Then I try to build a target platform against which I would build my application, so I run {{mvn eclipse:install-plugins}} and it generates me a {{org.eclipse.core.commands_3.4.0.I20080509_2000.jar}} (notice the {{_}} instead of the {{-}} in the qualifier part) .
> Doing {{mvn eclipse:to-maven}} followed by {{mvn eclipse :install-plugins}} should end up with the same jar names.
> I modfied DefaultMaven2OsgiConverter.java to remove the conversions. Though it is definitely not a fix, here is the patch:
> {noformat}Index: src/main/java/org/apache/maven/shared/osgi/DefaultMaven2OsgiConverter.java
> ===================================================================
> --- src/main/java/org/apache/maven/shared/osgi/DefaultMaven2OsgiConverter.java	(revision 677553)
> +++ src/main/java/org/apache/maven/shared/osgi/DefaultMaven2OsgiConverter.java	(working copy)
> @@ -257,7 +257,8 @@
>              String major = m.group( 1 );
>              String minor = ( m.group( 3 ) != null ) ? m.group( 3 ) : "0";
>              String service = ( m.group( 5 ) != null ) ? m.group( 5 ) : "0";
> -            String qualifier = m.group( 6 ).replaceAll( "-", "_" ).replaceAll( "\\.", "_" );
> +            String qualifier = m.group( 6 );
> +            //String qualifier = m.group( 6 ).replaceAll( "-", "_" ).replaceAll( "\\.", "_" );
>              osgiVersion = major + "." + minor + "." + service + "." + qualifier;
>          }
>  
> @@ -263,7 +264,7 @@
>  
>          /* else transform first - to . and others to _ */
>          osgiVersion = osgiVersion.replaceFirst( "-", "\\." );
> -        osgiVersion = osgiVersion.replaceAll( "-", "_" );
> +        //osgiVersion = osgiVersion.replaceAll( "-", "_" );
>          m = OSGI_VERSION_PATTERN.matcher( osgiVersion );
>          if ( m.matches() )
>          {
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)