[ 
https://issues.apache.org/jira/browse/FELIX-6460?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17419120#comment-17419120
 ] 

Tuomas Kiviaho commented on FELIX-6460:
---------------------------------------

[FELIX-6073] Upgrade to Maven 3  by [~gnodet] has introduced a regression by 
changing from using {{configuration/outputDirectory}} to 
{{$\{project.build.outputDirectory}}} which can't be changed during plugin 
execution like the previous approach was.

{code:java|title=BundlePlugin#getClassPath}
+        String d = currentProject.getBuild() != null ? 
currentProject.getBuild().getOutputDirectory() : null;
-        if ( getOutputDirectory() != null && getOutputDirectory().exists() )
+        if ( d != null )
         {
-            list.add( new Jar( ".", getOutputDirectory() ) );
+            list.add( new Jar( ".", d ) );
         }
{code}

I hope that this would get fixed as well since otherwise standalone test 
bundles can't be produced as they used to be.

The only thing that comes to my mind why this could have been done is the 
{{unpackBundle}} that uses also {{configuration/outputDirectory}} so one might 
get odd results when changing the parameter that was named a bit misleadingly

I would not mind having a new configuration parameter for controlling the dot 
classpath but having separate goals for test bundle/manifest is just an 
overkill in my opinion.

PS. Note that exported/private packages are still based on 
{{$\{project.build.outputDirectory}}} so they should be also be fixed.


> {maven-test-sources} not working as expected
> --------------------------------------------
>
>                 Key: FELIX-6460
>                 URL: https://issues.apache.org/jira/browse/FELIX-6460
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven Bundle Plugin
>    Affects Versions: maven-bundle-plugin-2.5.0, maven-bundle-plugin-5.1.2
>            Reporter: Tuomas Kiviaho
>            Priority: Blocker
>
> I seem to have introduced a bug along my patch for FELIX-3381.
> Edit: I've actually failed to verify the actual patch patch  
> https://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java?revision=1602812&view=markup&pathrev=1695270
> There is should be a test in BundlePlugin.java whether \{maven-sources} 
> and/or \{maven-test-sources} placeholders are present but instead I've 
> managed miss a typo \{maven-test-resources} that was patched there instead.
> Could this simple typo be fixed
> {code:java|title=BundlePlugin.java}
> @@ -2143,7 +2143,7 @@
>          final String sourcePath = analyzer.getProperty( Analyzer.SOURCEPATH 
> );
>          if ( sourcePath != null )
>          {
> -            if ( sourcePath.contains(MAVEN_SOURCES) || 
> sourcePath.contains(MAVEN_TEST_RESOURCES) )
> +            if ( sourcePath.contains(MAVEN_SOURCES) || 
> sourcePath.contains(MAVEN_TEST_SOURCES) )
>              {
>                  String combinedSource = StringUtils.replace( sourcePath, 
> MAVEN_SOURCES, mavenSourcePaths.toString() );
>                  combinedSource = StringUtils.replace( combinedSource, 
> MAVEN_TEST_SOURCES, mavenTestSourcePaths.toString() );
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to