You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Eugene Kuleshov (JIRA)" <ji...@apache.org> on 2007/10/18 04:21:50 UTC

[jira] Commented: (FELIX-395) Plugin packages classes when inline=false is specified

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

Eugene Kuleshov commented on FELIX-395:
---------------------------------------

Second issue related to same inline=false flag is that generated manifest has Import-Package attribute for all included classes. Those classes should not be imported, because they came from jars listed in the Bundle-ClassPath.

Manifest-Version: 1.0
Created-By: 1.5.0_08 (Sun Microsystems Inc.)
Import-Package: javax.swing,javax.swing.border,javax.swing.event,javax
 .swing.text,javax.swing.tree,junit.awtui,junit.extensions,junit.frame
 work,junit.runner,junit.swingui,junit.swingui.icons,junit.textui
Embed-Transitive: true
Embed-StripGroup: true
Include-Resource: jars\junit-3.8.1.jar=C:\repo\junit\junit\3.8.1\junit
 -3.8.1.jar
Bnd-LastModified: 1192673520734
Export-Package: junit.swingui;uses:="javax.swing.text,javax.swing.tree
 ,junit.extensions,javax.swing.border,javax.swing.event,junit.runner,j
 unit.framework,javax.swing",junit.swingui.icons,junit.runner;uses:=ju
 nit.framework,junit.extensions;uses:=junit.framework,junit.framework,
 junit.textui;uses:="junit.runner,junit.framework",junit.awtui;uses:="
 junit.runner,junit.framework"
Bundle-Version: 1.0.0.SNAPSHOT
Bundle-Name: test OSGi bundle
Bundle-ClassPath: .,jars\junit-3.8.1.jar
Originally-Created-By: Ant 1.4.1
Embed-Directory: jars
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.test
Tool: Bnd-0.0.203
Embed-Dependency: *;scope=compile|runtime;inline=false



> Plugin packages classes when inline=false is specified
> ------------------------------------------------------
>
>                 Key: FELIX-395
>                 URL: https://issues.apache.org/jira/browse/FELIX-395
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven Bundle Plugin
>            Reporter: Eugene Kuleshov
>            Priority: Critical
>
> I've been playing with Felix's Maven Bundle Plugin from trunk and there is a critical issue 
> <project
>     xmlns="http://maven.apache.org/POM/4.0.0"
>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
>   <modelVersion>4.0.0</modelVersion>
>   <groupId>org.test</groupId>
>   <artifactId>test</artifactId>
>   <name>test OSGi bundle</name>
>   <version>1.0.0-SNAPSHOT</version>
>   <packaging>bundle</packaging>
>   <dependencies>
>     <dependency>
>       <groupId>junit</groupId>
>       <artifactId>junit</artifactId>
>       <version>3.8.1</version>
>     </dependency>
>   </dependencies>
>   <build>
>     <defaultGoal>org.apache.felix:maven-bundle-plugin:bundle</defaultGoal>
>     
>     <plugins>
>       <plugin>
>         <groupId>org.apache.felix</groupId>
>         <artifactId>maven-bundle-plugin</artifactId>
>         <version>1.1.0-SNAPSHOT</version>
>         <extensions>true</extensions>
>         <configuration>
>           <instructions>
>             <Export-Package>*</Export-Package>
>             <Embed-Dependency>*;scope=compile|runtime;inline=false</Embed-Dependency>
>             <Embed-Transitive>true</Embed-Transitive>
>             <Embed-StripGroup>true</Embed-StripGroup>
>             <Embed-Directory>jars</Embed-Directory>
>           </instructions>
>         </configuration>
>       </plugin>
>     </plugins>
>   </build>
> </project>
> When running "mvn" command in the above pom it will create test-1.0.0-SNAPSHOT.jar with the following content. As you can see, jar file have an original junit-3.8.1.jar, but it also have all classes from junit-3.8.1.jar repackaged:
> Archive:  test-1.0.0-SNAPSHOT.jar
>     testing: META-INF/MANIFEST.MF     OK
>     testing: META-INF/                OK
>     testing: META-INF/maven/          OK
>     testing: META-INF/maven/org.test/   OK
>     testing: META-INF/maven/org.test/test/   OK
>     testing: META-INF/maven/org.test/test/pom.properties   OK
>     testing: META-INF/maven/org.test/test/pom.xml   OK
>     testing: jars\junit-3.8.1.jar     OK
>     testing: junit/                   OK
>     testing: junit/awtui/             OK
>     testing: junit/awtui/AboutDialog$1.class   OK
>     testing: junit/awtui/AboutDialog$2.class   OK
>     testing: junit/awtui/AboutDialog.class   OK
>     testing: junit/awtui/Logo.class   OK
>     testing: junit/awtui/ProgressBar.class   OK
>     testing: junit/awtui/TestRunner$1.class   OK
>     testing: junit/awtui/TestRunner$10.class   OK
>     testing: junit/awtui/TestRunner$2.class   OK
>     testing: junit/awtui/TestRunner$3.class   OK
>     testing: junit/awtui/TestRunner$4.class   OK
>     testing: junit/awtui/TestRunner$5.class   OK
>     testing: junit/awtui/TestRunner$6.class   OK
>     testing: junit/awtui/TestRunner$7.class   OK
>     testing: junit/awtui/TestRunner$8.class   OK
>     testing: junit/awtui/TestRunner$9.class   OK
>     testing: junit/awtui/TestRunner.class   OK
>     testing: junit/extensions/        OK
>     testing: junit/extensions/ActiveTestSuite$1.class   OK
>     testing: junit/extensions/ActiveTestSuite.class   OK
>     testing: junit/extensions/ExceptionTestCase.class   OK
>     testing: junit/extensions/RepeatedTest.class   OK
>     testing: junit/extensions/TestDecorator.class   OK
>     testing: junit/extensions/TestSetup$1.class   OK
>     testing: junit/extensions/TestSetup.class   OK
>     testing: junit/framework/         OK
>     testing: junit/framework/Assert.class   OK
>     testing: junit/framework/AssertionFailedError.class   OK
>     testing: junit/framework/ComparisonFailure.class   OK
>     testing: junit/framework/Protectable.class   OK
>     testing: junit/framework/Test.class   OK
>     testing: junit/framework/TestCase.class   OK
>     testing: junit/framework/TestFailure.class   OK
>     testing: junit/framework/TestListener.class   OK
>     testing: junit/framework/TestResult$1.class   OK
>     testing: junit/framework/TestResult.class   OK
>     testing: junit/framework/TestSuite$1.class   OK
>     testing: junit/framework/TestSuite.class   OK
>     testing: junit/runner/            OK
>     testing: junit/runner/BaseTestRunner.class   OK
>     testing: junit/runner/ClassPathTestCollector.class   OK
>     testing: junit/runner/FailureDetailView.class   OK
>     testing: junit/runner/LoadingTestCollector.class   OK
>     testing: junit/runner/ReloadingTestSuiteLoader.class   OK
>     testing: junit/runner/SimpleTestCollector.class   OK
>     testing: junit/runner/Sorter$Swapper.class   OK
>     testing: junit/runner/Sorter.class   OK
>     testing: junit/runner/StandardTestSuiteLoader.class   OK
>     testing: junit/runner/TestCaseClassLoader.class   OK
>     testing: junit/runner/TestCollector.class   OK
>     testing: junit/runner/TestRunListener.class   OK
>     testing: junit/runner/TestSuiteLoader.class   OK
>     testing: junit/runner/Version.class   OK
>     testing: junit/runner/excluded.properties   OK
>     testing: junit/runner/logo.gif    OK
>     testing: junit/runner/smalllogo.gif   OK
>     testing: junit/swingui/           OK
>     testing: junit/swingui/AboutDialog$1.class   OK
>     testing: junit/swingui/AboutDialog$2.class   OK
>     testing: junit/swingui/AboutDialog.class   OK
>     testing: junit/swingui/CounterPanel.class   OK
>     testing: junit/swingui/DefaultFailureDetailView$StackEntryRenderer.class   OK
>     testing: junit/swingui/DefaultFailureDetailView$StackTraceListModel.class   OK
>     testing: junit/swingui/DefaultFailureDetailView.class   OK
>     testing: junit/swingui/FailureRunView$1.class   OK
>     testing: junit/swingui/FailureRunView$FailureListCellRenderer.class   OK
>     testing: junit/swingui/FailureRunView.class   OK
>     testing: junit/swingui/ProgressBar.class   OK
>     testing: junit/swingui/StatusLine.class   OK
>     testing: junit/swingui/TestHierarchyRunView$1.class   OK
>     testing: junit/swingui/TestHierarchyRunView.class   OK
>     testing: junit/swingui/TestRunContext.class   OK
>     testing: junit/swingui/TestRunView.class   OK
>     testing: junit/swingui/TestRunner$1.class   OK
>     testing: junit/swingui/TestRunner$10.class   OK
>     testing: junit/swingui/TestRunner$11.class   OK
>     testing: junit/swingui/TestRunner$12.class   OK
>     testing: junit/swingui/TestRunner$13.class   OK
>     testing: junit/swingui/TestRunner$14.class   OK
>     testing: junit/swingui/TestRunner$15.class   OK
>     testing: junit/swingui/TestRunner$16.class   OK
>     testing: junit/swingui/TestRunner$17.class   OK
>     testing: junit/swingui/TestRunner$18.class   OK
>     testing: junit/swingui/TestRunner$19.class   OK
>     testing: junit/swingui/TestRunner$2.class   OK
>     testing: junit/swingui/TestRunner$3.class   OK
>     testing: junit/swingui/TestRunner$4.class   OK
>     testing: junit/swingui/TestRunner$5.class   OK
>     testing: junit/swingui/TestRunner$6.class   OK
>     testing: junit/swingui/TestRunner$7.class   OK
>     testing: junit/swingui/TestRunner$8.class   OK
>     testing: junit/swingui/TestRunner$9.class   OK
>     testing: junit/swingui/TestRunner.class   OK
>     testing: junit/swingui/TestSelector$1.class   OK
>     testing: junit/swingui/TestSelector$2.class   OK
>     testing: junit/swingui/TestSelector$3.class   OK
>     testing: junit/swingui/TestSelector$4.class   OK
>     testing: junit/swingui/TestSelector$DoubleClickListener.class   OK
>     testing: junit/swingui/TestSelector$KeySelectListener.class   OK
>     testing: junit/swingui/TestSelector$ParallelSwapper.class   OK
>     testing: junit/swingui/TestSelector$TestCellRenderer.class   OK
>     testing: junit/swingui/TestSelector.class   OK
>     testing: junit/swingui/TestSuitePanel$1.class   OK
>     testing: junit/swingui/TestSuitePanel$TestTreeCellRenderer.class   OK
>     testing: junit/swingui/TestSuitePanel.class   OK
>     testing: junit/swingui/TestTreeModel.class   OK
>     testing: junit/swingui/icons/     OK
>     testing: junit/swingui/icons/error.gif   OK
>     testing: junit/swingui/icons/failure.gif   OK
>     testing: junit/swingui/icons/hierarchy.gif   OK
>     testing: junit/swingui/icons/ok.gif   OK
>     testing: junit/textui/            OK
>     testing: junit/textui/ResultPrinter.class   OK
>     testing: junit/textui/TestRunner.class   OK
>     testing: stylesheet.css           OK

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.