Menu

#12 mvn compile issue on mac with fix

1.0
closed
None
2019-03-16
2019-03-14
No

current master faiils to compile with mvn on Mac. it reports ...

[DEBUG] Looking up lifecycle mappings for packaging so from ClassRealm[project>net.sf.yad2xx:libFTDIInterface:1.0, parent: ClassRealm[maven.api, parent: null]]
[ERROR] [ERROR] Project 'net.sf.yad2xx:libFTDIInterface:1.0' is duplicated in the reactor @
[ERROR] Project 'net.sf.yad2xx:libFTDIInterface:1.0' is duplicated in the reactor -> [Help 1]
org.apache.maven.project.DuplicateProjectException: Project 'net.sf.yad2xx:libFTDIInterface:1.0' is duplicated in the reactor
at org.apache.maven.project.ProjectSorter.<init> (ProjectSorter.java:96)
at org.apache.maven.graph.DefaultProjectDependencyGraph.<init> (DefaultProjectDependencyGraph.java:61)
at org.apache.maven.graph.DefaultGraphBuilder.reactorDependencyGraph (DefaultGraphBuilder.java:121)
at org.apache.maven.graph.DefaultGraphBuilder.build (DefaultGraphBuilder.java:83)
at org.apache.maven.DefaultMaven.buildGraph (DefaultMaven.java:507)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:219)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DuplicateProjectException</init></init>

this happens (i think) because both the Mac and unix modules are compiled on Mac with the yad2xx-master/pom.xml code. both modules use the net.sf.yad2xx:libFTDIInterface:1.0 and mvn does not like having a module twice in the project hierarchy/tree.

the solution is to specify the <name> tag in addition to the <family> tag in the module info. i have confirmed that this fixes the compile problem on mac and i am submitting a pull request on github for you to check out.</family></name>

Discussion

  • Stephen Davies

    Stephen Davies - 2019-03-14

    Hi,
    which version of macOS are you running?

    Today I upgraded to Mojave. I then synched my local git repo with GitHub (was already up to date).

    I tried running mvn and got a weird error, need to run 'xcode-select --install'. Once that had run ok I executed 'mvn clean install', ran just fine.

     
  • Robert Huber

    Robert Huber - 2019-03-15

    Hi Stephen, i am on 10.11.6 El Capitan. That OS definitely activates the unix module in the pom.xml in my hands. i dont think there is much need for a cross-compile, so restricting the linux build in the <family>unix</family> to <name>Linux</name> will do no harm but solves the problem I ran into. P.S. Yes, the Xcode CLI is used in a lot of the installs like Macports and others. Be well,

     
  • Stephen Davies

    Stephen Davies - 2019-03-16
    • status: open --> closed
    • assigned_to: Stephen Davies
     
  • Stephen Davies

    Stephen Davies - 2019-03-16

    Your pull request has been merged.

    Thanks Robert.

     

Log in to post a comment.