Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Source jars with Eclipse source bundle Manifest entries #81

Open
mcculls opened this issue Jun 22, 2015 · 1 comment
Open

Source jars with Eclipse source bundle Manifest entries #81

mcculls opened this issue Jun 22, 2015 · 1 comment

Comments

@mcculls
Copy link
Member

mcculls commented Jun 22, 2015

Originally reported on Google Code with ID 83

For Eclipse consumers, it is handy if source jars are valid Eclipse source bundles.
(Otherwise we have to re-bundle for are development target platform).

The maven-source-plugin configured something like below will do the trick.

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-source-plugin</artifactId>
    <executions>
        <execution>
            <id>attach-sources</id>
            <phase>verify</phase>
            <goals>
                <goal>jar-no-fork</goal>
            </goals>
            <configuration>
                <archive>
                    <manifest>
                        <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                        <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                    </manifest>
                    <manifestEntries>
                        <Bundle-ManifestVersion>2</Bundle-ManifestVersion>
                        <Bundle-Description>${project.name}
                            Source</Bundle-Description>
                        <Bundle-SymbolicName>${project.artifactId}.source</Bundle-SymbolicName>
                        <Eclipse-SourceBundle>${project.artifactId};version="${project.version}"</Eclipse-SourceBundle>
                        <Bundle-Version>${project.version}</Bundle-Version>
                    </manifestEntries>
                </archive>
            </configuration>
        </execution>
    </executions>
</plugin>

Reported by dmeibusch on 2013-07-17 01:17:40

@mcculls
Copy link
Member Author

mcculls commented Jun 22, 2015

Thanks for the suggestion

Reported by mcculls on 2013-07-17 01:19:40

  • Status changed: Accepted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant