Maven
  1. Maven
  2. MNG-2345

mvn -fn install fails when a module could not be found

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None
    • Complexity:
      Intermediate
    • Number of attachments :
      0

      Description

      mvn -fn install fails when you have a mother project which reference a module in its modules section and the corresponding directory does not contain a pom.xml. This should not happen when you have the fail never option turned on.

      G:\si\serviceinfrastructure>mvn clean install | tee build.txt
      [INFO] Scanning for projects...
      [INFO] ------------------------------------------------------------------------
      [ERROR] FATAL ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Error building POM (may not be this project's POM).

      Project ID: unknown

      Reason: Could not find the model file 'G:\si\serviceinfrastructure\si-adapter-co
      mmon\pom.xml'.

      [INFO] ------------------------------------------------------------------------
      [INFO] Trace
      org.apache.maven.reactor.MavenExecutionException: Could not find the model file
      'G:\si\serviceinfrastructure\si-adapter-common\pom.xml'.
      at org.apache.maven.DefaultMaven.getProjects(Lorg/apache/maven/execution
      /MavenExecutionRequest;Lorg/apache/maven/profiles/ProfileManager;)Ljava/util/Lis
      t;(DefaultMaven.java:365)
      at org.apache.maven.DefaultMaven.doExecute(Lorg/apache/maven/execution/M
      avenExecutionRequest;Lorg/apache/maven/monitor/event/EventDispatcher;)Lorg/apach
      e/maven/execution/ReactorManager;(DefaultMaven.java:278)
      at org.apache.maven.DefaultMaven.execute(Lorg/apache/maven/execution/Mav
      enExecutionRequest;)V(DefaultMaven.java:115)
      at org.apache.maven.cli.MavenCli.main([Ljava/lang/String;Lorg/codehaus/c
      lassworlds/ClassWorld;)I(MavenCli.java:256)
      at jrockit.reflect.NativeMethodInvoker.invoke0(Ljava/lang/Object;ILjava/
      lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;(Unknown Source)
      at jrockit.reflect.NativeMethodInvoker.invoke(Ljava/lang/Object;[Ljava/l
      ang/Object;)Ljava/lang/Object;(Unknown Source)
      at java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;
      I)Ljava/lang/Object;(Unknown Source)
      at org.codehaus.classworlds.Launcher.launchEnhanced([Ljava/lang/String
      V(Launcher.java:315)
      at org.codehaus.classworlds.Launcher.launch([Ljava/lang/String;)V(Launch
      er.java:255)
      at org.codehaus.classworlds.Launcher.mainWithExitCode([Ljava/lang/String
      ;)I(Launcher.java:430)
      at org.codehaus.classworlds.Launcher.main([Ljava/lang/String;)V(Launcher
      .java:375)
      Caused by: org.apache.maven.project.ProjectBuildingException: Could not find the
      model file 'G:\si\serviceinfrastructure\si-adapter-common\pom.xml'.
      at org.apache.maven.project.DefaultMavenProjectBuilder.readModel(Ljava/l
      ang/String;Ljava/io/File;Z)Lorg/apache/maven/model/Model;(DefaultMavenProjectBui
      lder.java:1274)
      at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFi
      leInternal(Ljava/io/File;Lorg/apache/maven/artifact/repository/ArtifactRepositor
      y;Lorg/apache/maven/profiles/ProfileManager;Z)Lorg/apache/maven/project/MavenPro
      ject;(DefaultMavenProjectBuilder.java:414)
      at org.apache.maven.project.DefaultMavenProjectBuilder.build(Ljava/io/Fi
      le;Lorg/apache/maven/artifact/repository/ArtifactRepository;Lorg/apache/maven/pr
      ofiles/ProfileManager;)Lorg/apache/maven/project/MavenProject;(DefaultMavenProje
      ctBuilder.java:192)
      at org.apache.maven.DefaultMaven.getProject(Ljava/io/File;Lorg/apache/ma
      ven/artifact/repository/ArtifactRepository;Lorg/apache/maven/settings/Settings;L
      org/apache/maven/profiles/ProfileManager;)Lorg/apache/maven/project/MavenProject
      ;(DefaultMaven.java:515)
      at org.apache.maven.DefaultMaven.collectProjects(Ljava/util/List;Lorg/ap
      ache/maven/artifact/repository/ArtifactRepository;ZLorg/apache/maven/settings/Se
      ttings;Lorg/apache/maven/profiles/ProfileManager;Z)Ljava/util/List;(DefaultMaven
      .java:447)
      at org.apache.maven.DefaultMaven.collectProjects(Ljava/util/List;Lorg/ap
      ache/maven/artifact/repository/ArtifactRepository;ZLorg/apache/maven/settings/Se
      ttings;Lorg/apache/maven/profiles/ProfileManager;Z)Ljava/util/List;(DefaultMaven
      .java:491)
      at org.apache.maven.DefaultMaven.getProjects(Lorg/apache/maven/execution
      /MavenExecutionRequest;Lorg/apache/maven/profiles/ProfileManager;)Ljava/util/Lis
      t;(DefaultMaven.java:351)
      ... 10 more
      Caused by: java.io.FileNotFoundException: G:\si\serviceinfrastructure\si-adapter
      -common\pom.xml: The system cannot find the file specified
      at jrockit.io.FileNativeIO.open0(Ljava/lang/String;I)I(Unknown Source)
      at jrockit.io.FileNativeIO.open(Ljava/lang/String;I)Ljava/io/FileDescrip
      tor;(Unknown Source)
      at java.io.FileInputStream.<init>(Ljava/lang/String;)V(Unknown Source)
      at java.io.FileInputStream.<init>(Ljava/io/File;)V(Unknown Source)
      at java.io.FileReader.<init>(Ljava/io/File;)V(FileReader.java:55)
      at org.apache.maven.project.DefaultMavenProjectBuilder.readModel(Ljava/l
      ang/String;Ljava/io/File;Z)Lorg/apache/maven/model/Model;(DefaultMavenProjectBui
      lder.java:1269)
      ... 16 more
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 2 seconds
      [INFO] Finished at: Tue Jun 06 17:51:40 CEST 2006
      [INFO] Final Memory: 10M/64M
      [INFO] ------------------------------------------------------------------------

        Activity

        Hide
        Benjamin Bentmann added a comment -

        The reactor failure modes apply to the actual build process, not to the fundamental metadata describing the participating projects. I don't see a good reason to not fail if not even the POMs can be properly read.

        Show
        Benjamin Bentmann added a comment - The reactor failure modes apply to the actual build process, not to the fundamental metadata describing the participating projects. I don't see a good reason to not fail if not even the POMs can be properly read.

          People

          • Assignee:
            Benjamin Bentmann
            Reporter:
            Lars Rosenberg
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: