You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Arnaud Heritier (JIRA)" <ji...@codehaus.org> on 2008/07/21 19:11:26 UTC
[jira] Commented: (MECLIPSE-467) problem with the way the _ and -
get transformed
[ http://jira.codehaus.org/browse/MECLIPSE-467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=142657#action_142657 ]
Arnaud Heritier commented on MECLIPSE-467:
------------------------------------------
Maven standards are to have '-' between the name of the artifact and its release.
That's why the to-maven goal change it.
The problem I think is in the install-plugins goal.
> problem with the way the _ and - get transformed
> ------------------------------------------------
>
> Key: MECLIPSE-467
> URL: http://jira.codehaus.org/browse/MECLIPSE-467
> Project: Maven 2.x 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 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