Question about bundling ?

Open
#89 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
java
Domain
build-system

Research direction

Start by reproducing the GenStar build with goomph 1.7.0, the shown bnd manifest configuration, and gradle build; inspect the osgiBndManifest task and the generated JAR and manifest. Done means determining why Conditional-Package does not bundle the expected classes and documenting or correcting the behavior with a verifiable build result.

Written by the indexing model from the issue text.

Description

bug

Hi

I'm upgrading the GenStar repository with latest version of goomph plugin 1.7.0, and i see something strange.

I have a specific way to bundle my sources after compilation, i use this bnd to create a manifest :


// configure the OSGi bundle
jar.manifest.attributes(
        //'-exportcontents': 'core.*, gospl.*, spin.*, spll.*, gaml.*, genstar.*',
        '-removeheaders': 'Bnd-LastModified,Bundle-Name,Created-By,Tool,Private-Package,Require-Capability',
        'Conditional-Package': '!org.w3c.*, !org.xml.*, !javax.*, !org.jfree.*, !org.graphstream.*, !msi.*, *',
        'Import-Package': '!*',
        'Require-Bundle': 'msi.gama.core',
        'Export-Package': 'gama.genstar.plugin',
        'Bundle-Version': '1.0.0.${tstamp;yyyyMMddHHmm}',
        'Bundle-SymbolicName': project.name +";singleton:=true",
        'Bundle-RequiredExecutionEnvironment': 'JavaSE-1.8',
        'Require-Capability': 'osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.8))"',
        'Bundle-Vendor': 'Gama team',
        'Bundle-License': "http://www.apache.org/licenses/LICENSE-2.0"
)

osgiBndManifest {
    copyTo 'META-INF/MANIFEST.MF'
}

Normally this code generate a big Jar with all java classes statically linked when i run gradle build ( effect of conditional Package option), but this is not the case.

Any idea ? Some bugs ?

Dominant language
Java
Stars
137
Forks
33
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from diffplug/goomph

All issues in diffplug/goomph

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.