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

Some minor updates #8

Open
wants to merge 1 commit into
base: flexmojos-7.x
Choose a base branch
from

Conversation

magnayn
Copy link

@magnayn magnayn commented Jun 13, 2014

No description provided.

@chrisdutz
Copy link
Owner

Actually currently it allready builds against all versions of Maven ... I did some changes and it built niceley. I think Java 8 didn't work because of the aspectj compiler not yet being Java 8 capable ...

@magnayn
Copy link
Author

magnayn commented Jun 19, 2014

It seemed to work for me under JDK8, but the part that's most important is maven compatibility.

Currently if you use maven > 3.0, flexmojos will fail in copy-flex-resources (this is making us unable to compile our project). Upgrading the maven dependency seems to fix that.

@magnayn
Copy link
Author

magnayn commented Jun 19, 2014

I.E: compile a project with FM 7.0 with the following stanza:

   <plugin>
            <groupId>net.flexmojos.oss</groupId>
            <artifactId>flexmojos-maven-plugin</artifactId>

            <executions>
              <execution>
                <goals>
                  <goal>copy-flex-resources</goal>
                </goals>
                <configuration>
                   <stripVersion>true</stripVersion>
                </configuration>
              </execution>
            </executions>
          </plugin>

This works fine if you compile (mvn install) your project with maven 3.0.5.

If you compile (mvn install) your project with maven 3.2.1, you get the following terminal error:

[ERROR] Failed to execute goal net.flexmojos.oss:flexmojos-maven-plugin:7.0.0:copy-flex-resources (default) on project realtime-app-ui: Execution default of goal net.flexmojos.oss:flexmojos-maven-plugin:7.0.0:copy-flex-resources failed: An API incompatibility was encountered while executing net.flexmojos.oss:flexmojos-maven-plugin:7.0.0:copy-flex-resources: java.lang.NoSuchMethodError: org.apache.maven.execution.MavenSession.getRepositorySession()Lorg/sonatype/aether/RepositorySystemSession;

Upgrading the maven dependency fixes this.

@chrisdutz
Copy link
Owner

I'll investigate this a little more as soon as I have finished the major refactoring of Flexmojos 7.1.0. I am currently applying some major changes regarding updated mavenizer.

@chrisdutz
Copy link
Owner

Well I think I had updated FM 7.1 in a way that it was able to work with any Maven version I came across. I don't want to raise the maven version used to compile the plugin as this would probably cause problems with older Maven versions ... Usually you set the versions to the minimum requirements in order to have backward compatability with as old versions as possible. We needed some bugfixes that were part of 3.0.4, but we don't actually need any improvements from then on. I did add the aspectj version upgrade and removed the upper bound on the compiler however ... currently I'm running some final tests.

@magnayn
Copy link
Author

magnayn commented Jun 27, 2014

If it's available from somewhere as a SNAPSHOT, I can try it (I find compiling FM locally practically impossible).

The code in 7.0.x is relying on maven providing a repository class that does not exist. I don't believe that upping the version to build against breaks compatibility with older versions - but either way, it's not good that it's stuck against an obsolete version of maven.

@chrisdutz
Copy link
Owner

If you have a look at the poms of some of the default maven plugins, you will see that they are usually built against really old versions of maven. So relying on older versions of maven if we don't need any of the improvements of a newer version, we are on the safe side ... you can trust me on that issue. So I won't update maven unless there is a reason requiring this. Currently I can't see this requirement.

I will provide a SNAPSHOT binary build as soon as I have time (Probably this weekend). Then too I will re-check if I'm able to build my projects with Maven 3.2.2 and Java 8.

@magnayn
Copy link
Author

magnayn commented Jun 27, 2014

So I won't update maven unless there is a reason requiring this. Currently I can't see this requirement.

Apart from the fact that copy-flex-resources is totally broken for users of maven > 3.0.5, you mean.

@chrisdutz
Copy link
Owner

Ok ... so I can confirm your observation ... the problem is that some libraries have been changed from sonatype to eclipse breaking some internal stuff. So I'll probably follow your path with upgrading to 3.1.1 but I still have to do some work on this as it breaks some tests of the testsuite. So I have to sort these out first.

@chrisdutz
Copy link
Owner

So I have to admit that I haven't managed to get everything running with Maven 3.1.1. While most of flexmojos functionality is working there are some major problems with the reporting. Unfortunately this is where Velo introduced a combination of AspectJ + Scala + Whatsoever so debugging this is a total nightmare. Actually I am thinking about simply leaving Flexmojos ar 3.0.5 and focussing on the Apache Flex Maven plugin I started setting up last year but halted development on this in order to have Flexmojos running first.

@chrisdutz
Copy link
Owner

So you are always welcome to help, but I am expecting the pull requests to work. While this pull request semmed to have addressed the core problem, it breaks other parts. As long as there is no fix for these, I won't apply the patch.

@bcmedeiros
Copy link

AFAICS, plugins shouldn't depend on maven's internals. Maybe the fix is to remove this dependency instead of bumping the maven requirement.

@chrisdutz
Copy link
Owner

Well I generally agree, but as Flexmojos has to do quite a lot of resolving, downloading, and stuff like that, there is no alternative to using the maven infrastructure and this is where it's breaking. From 3.0.x to 3.1.x the way dependencies are resolved has changed. Simply basing FM on a newer version would make me have to refactor the dependency resolution code which I would like to avoid for now.

@chrisdutz
Copy link
Owner

Just a small update here ... while working on supporting the new Apache Falcon compiler I updated a lot of stuff and now Flexmojos requires Maven 3.1 (Switch from plexus to guice). So I think this problem might be resolved as soon as I get the testsuite running again.

it cannot find the framework ZIP, and consequently the build does not
include the correct namespaces section.

This is the case when specifying the dependencies directly rather than
through a frameowrk POM dependency (which has problems in maven because
of the fact that it does not understand the custom scopes)

By using some defaults and looking at other dependencies instead, we can
fix this.

Signed-off-by: Nigel Magnay <[email protected]>
@wadacoder
Copy link

I have been following this issue, and does the fix for FLEXMOJOS-887 fix this issue?

I have been following this project/branch for some time and I have seen a lot of updates happening to this fork, but haven't seen an updated version of flexmojos published to maven repositories since 7.0.1.

Should I make pull request on this fork of Flexmojos and create artifacts locally?

@magnayn
Copy link
Author

magnayn commented Oct 19, 2015

I doubt it.

Last time I checked, FM-7.x still does not work entirely correctly if your POM doesn't declare a direct dependency on the flex framework (which is bad, as pom dependencies don't understand the extra flex metadata required when you want to include the framework as an RSL).

https://github.com/magnayn/flexmojos-1 fixes it, possibly at the expense of support for the apache falcon compiler, which I don't care about.

@wadacoder
Copy link

Thanks @magnayn !
I will check it out.

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

Successfully merging this pull request may close these issues.

4 participants