Skip to content

Add MANIFEST.MF so this project can be used as an eclipse plugin.#72

Merged
mperry merged 5 commits into
functionaljava:masterfrom
dobesv:eclipse-plugin
Feb 7, 2015
Merged

Add MANIFEST.MF so this project can be used as an eclipse plugin.#72
mperry merged 5 commits into
functionaljava:masterfrom
dobesv:eclipse-plugin

Conversation

@dobesv

@dobesv dobesv commented Jan 4, 2015

Copy link
Copy Markdown
Contributor

I've been using functionaljava in my eclipse projects, this change might be handy for others as well.

Comment thread META-INF/MANIFEST.MF Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dobesv I don't know about Eclipse's use of manifests, but should the bundle version above be 4.2 for the last release?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm it's a good point
Also I have since learned that gradle is generating the manifest
currently. I should redo this one.
On Jan 4, 2015 5:02 PM, "Mark Perry" notifications@github.com wrote:

In META-INF/MANIFEST.MF
#72 (diff)
:

@@ -0,0 +1,21 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Functional Java
+Bundle-SymbolicName: org.functionaljava
+Bundle-Version: 4.3.0.qualifier

@dobesv https://github.com/dobesv I don't know about Eclipse's use of
manifests, but should the bundle version above be 4.2 for the last release?


Reply to this email directly or view it on GitHub
https://github.com/functionaljava/functionaljava/pull/72/files#r22444882
.

@mperry

mperry commented Jan 5, 2015

Copy link
Copy Markdown
Contributor

@dobesv Ok, let us know when you have reviewed and updated the PR.

@mperry

mperry commented Jan 10, 2015

Copy link
Copy Markdown
Contributor

@dobesv You might have figured this out, but you can set the attributes in the manifest by editing the core/build.gradle file and adding:

jar {
    manifest {
        attributes("attribute1": "attribute1 value", "attribute2": "attribute2 value")
    }
}

How does Eclipse use the manifest file for a library?

@dobesv

dobesv commented Jan 15, 2015

Copy link
Copy Markdown
Contributor Author

Yes, I did see that. But on further reflection I realized that if I am
working with the project in eclipse I actually want the MANIFEST.MF to be a
static file so that eclipse can use it.

I have convinced gradle to build an OSGI jar file and also output a
MANIFEST.MF for eclipse to use. I'll sit on it a little longer, though, to
think about possible repurcussions. Do you think it's a problem if
functionaljava is always built as an OSGI jar? AFAIK you can use them as
normal jar files.

On Fri, Jan 9, 2015 at 7:01 PM, Mark Perry notifications@github.com wrote:

You might have figured this out, but you can set the attributes in the
manifest by editing the core/build.gradle file and adding this:

manifest {
attributes("attribute1": "attribute1 value", "attribute2": "attribute2
value")
}
}

—
Reply to this email directly or view it on GitHub
https://github.com/functionaljava/functionaljava/pull/72#issuecomment-69435763
.

@mperry

mperry commented Jan 15, 2015

Copy link
Copy Markdown
Contributor

I haven't used Eclipse for more than 3 years, can you explain why you want to use projects as plugins in Eclipse? A quick Google search wasn't helpful.

@dobesv

dobesv commented Jan 15, 2015

Copy link
Copy Markdown
Contributor Author

I am using it in an eclipse plugin, so converting the jar to an eclipse
plugin seemed to make it easier to get on the class path of my plugin.

I can probably maintain this as a little fork of my own indefinitely. I'm
not sure it will ever be of use to anyone else.
On Jan 14, 2015 8:07 PM, "Mark Perry" notifications@github.com wrote:

I haven't used Eclipse for more than 3 years, can you explain why you want
to use projects as plugins in Eclipse? A quick Google search wasn't helpful.


Reply to this email directly or view it on GitHub
#72 (comment)
.

@mperry

mperry commented Jan 15, 2015

Copy link
Copy Markdown
Contributor

I spent 10 minutes reading around and it looks like the extra info in the manifest required for an OSGI bundle is ignored in most applications. I think generating the info from the Gradle build is feasible.

@dobesv

dobesv commented Jan 15, 2015

Copy link
Copy Markdown
Contributor Author

Yes, I have this working locally now, I think it will work fine in and out
of eclipse.

One hiccup I ran into is that the OSGI plugin for gradle doesn't like the
tests project because it doesn't create the folder to contain the main
class files. Do we actually need to build and distribute jar files for the
tests? I added a workaround to create the missing folder first, which
works, but I wonder if I could disable building jar files for the tests
altogether.
On Jan 15, 2015 4:40 AM, "Mark Perry" notifications@github.com wrote:

I spent 10 minutes reading around and it looks like the extra info in the
manifest required for an OSGI bundle is ignored in most applications. I
think generating the info from the Gradle build is feasible.


Reply to this email directly or view it on GitHub
#72 (comment)
.

@mperry

mperry commented Jan 16, 2015

Copy link
Copy Markdown
Contributor

The tests project is separate because of the various different support for Scala in IDEs. Putting them in a separate Gradle module allows us to exclude that module temporarily (if necessary).

We don't need to build the jar, just to run the tests.

@mperry

mperry commented Jan 23, 2015

Copy link
Copy Markdown
Contributor

So where do we go from here?

@dobesv

dobesv commented Jan 23, 2015

Copy link
Copy Markdown
Contributor Author

Hi Mark,

Sorry I have been a bit slow on my PR updates, I've just been a bit busy
work other things. I think I will make the changes to generate an OSGI
compatible jar for the projects except tests, plus generate a MANIFEST.MF
if you run the eclipse target, and update the PR with those changes for
review.
On Jan 23, 2015 3:36 AM, "Mark Perry" notifications@github.com wrote:

So where do we go from here?


Reply to this email directly or view it on GitHub
#72 (comment)
.

mperry and others added 4 commits January 27, 2015 09:18
Compiles all projects except "tests" as an OSGI compatible jar file, and
changes the "eclipse" target to generate a MANIFEST.MF and a "plugin"
project to use in eclipse.
@dobesv

dobesv commented Jan 27, 2015

Copy link
Copy Markdown
Contributor Author

OK so I updated it so that it builds an OSGI jar for each subproject except tests. Hopefully this doesn't interfere with anyone else's needs. Take a look and tell me what you think.

@mperry

mperry commented Jan 27, 2015

Copy link
Copy Markdown
Contributor

FYI, I probably won't get to looking at this until the weekend.

@mperry

mperry commented Feb 7, 2015

Copy link
Copy Markdown
Contributor

I think this is ok, everyone else will just see a more detailed manifest in their jar where the keys will be ignored.

mperry added a commit that referenced this pull request Feb 7, 2015
Add MANIFEST.MF so this project can be used as an eclipse plugin.
@mperry
mperry merged commit b76019f into functionaljava:master Feb 7, 2015
@mperry mperry added this to the v4.3 milestone Feb 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants