Uploaded image for project: 'Maven Eclipse Plugin (RETIRED)'
  1. Maven Eclipse Plugin (RETIRED)
  2. MECLIPSE-467

problem with the way the _ and - get transformed

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Won't Fix
    • None
    • None
    • OSGi, Manifest
    • None

    Description

      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:

      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() )
               {
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            mr.magne charles prevot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: