Skip to content
This repository has been archived by the owner on Nov 10, 2017. It is now read-only.

Fix Android container not exported in m2e 1.6 #363

Merged

Conversation

WonderCsabo
Copy link
Contributor

@rgladwell check this out.

m2e 1.6 runs less configurator calls, which is a good thing, but has a
bad side effect for m2e-android: our configurator will be called
earlier, and the Android libraries container will not be found in the
classpath, because it is only added after m2e-android ran. We call
FixerWorkspaceConfigurer first, so we can make sure the container is
added, then mark it as exported.

https://github.com/rgladwell/m2e-android/issues/360
https://github.com/rgladwell/m2e-android/issues/353
@rgladwell
Copy link
Owner

👍 GREEN!!!! NICE!!!

@@ -44,7 +46,9 @@ protected void configure() {
classpathConfigurers.add(new ModifySourceFolderOutputClasspathConfigurer());
classpathConfigurers.add(new RemoveJREClasspathContainerConfigurer());
classpathConfigurers.add(new MarkMavenClasspathContianerExportedConfigurer());
classpathConfigurers.add(new MarkAndroidClasspathContainerNotExportedConfigurer());
if (!AndroidMavenProjectConfigurator.usesM2E1_6OrNewer()) {
Copy link
Owner

Choose a reason for hiding this comment

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

👍 Nice way of maintaining backwards compatibility.

@rgladwell
Copy link
Owner

Other than the minor things I noted this looks excellent.

@WonderCsabo
Copy link
Contributor Author

I am glad this PR makes you happy. I think this is the most ugliest PR i ever wrote for this project. ;)

@rgladwell
Copy link
Owner

Like I said before, this project is a lot of hacks.

But I think this is how code evolves: we create a hack, then another, we see a similarity between hacks and create a common pattern, and slowly the code becomes safe.

rgladwell added a commit that referenced this pull request Jul 3, 2015
Fix Android container not exported in m2e 1.6
@rgladwell rgladwell merged commit 0185958 into rgladwell:master Jul 3, 2015
@WonderCsabo WonderCsabo deleted the fixAndroidContainerNotExported branch July 3, 2015 10:28
@WonderCsabo
Copy link
Contributor Author

OK, thanks for the review!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants