Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-2689

<type>ejb-client</type> dependency not working properly as reactor build

    XMLWordPrintableJSON

Details

    Description

      I've attached an tarball in standard IT test format.

      If an artifact of <type>ejb-client</type> is built, it cannot be properly used as a dependency by other builds in a reactor build without also having improper access to the rest of the EJB libs.

      The reason is somewhat disturbing, when the client project is built under reactor, the compile plugin classpath includes the target/classes directory of the EJB project. Take a look at it with -X:

      [INFO] ----------------------------------------------------------------------------
      [INFO] Building client
      [INFO] task-segment: [install]
      [INFO] ----------------------------------------------------------------------------
      [DEBUG] maven-jar-plugin: resolved to version 2.1 from repository central
      [DEBUG] Retrieving parent-POM: org.apache.maven.plugins:maven-plugins::3 for project: null:maven-jar-plugin:maven-plugin:2.1 from the repository.
      [DEBUG] Retrieving parent-POM: org.apache.maven:maven-parent::4 for project: org.apache.maven.plugins:maven-plugins:pom:3 from the repository.
      [DEBUG] Retrieving parent-POM: org.apache:apache::3 for project: org.apache.maven:maven-parent:pom:4 from the repository.
      [DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-resources-plugin:2.2:resources' -->
      [DEBUG] (f) filters = []
      [DEBUG] (f) outputDirectory = /Users/briantopping/dev/it200x/client/target/classes
      [DEBUG] (f) project = org.apache.maven.project.MavenProject@118ea538
      [DEBUG] (f) resources = [org.apache.maven.model.Resource@aa91ef]
      [DEBUG] – end configuration –
      [INFO] [resources:resources]
      [INFO] Using default encoding to copy filtered resources.
      [DEBUG] org.apache.maven.it:client:jar:1-SNAPSHOT (selected for null)
      [DEBUG] org.apache.maven.it:ejb:ejb-client:client:1-SNAPSHOT:compile (selected for compile)
      [DEBUG] junit:junit:jar:3.8.1:test (selected for test)
      [DEBUG] Skipping disabled repository central
      [DEBUG] ejb: using locally installed snapshot
      [DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-compiler-plugin:2.0.1:compile' -->
      [DEBUG] (f) basedir = /Users/briantopping/dev/it200x/client
      [DEBUG] (f) buildDirectory = /Users/briantopping/dev/it200x/client/target
      [DEBUG] (f) classpathElements = [/Users/briantopping/dev/it200x/client/target/classes, /Users/briantopping/dev/it200x/ejb/target/classes]
      [DEBUG] (f) compileSourceRoots = [/Users/briantopping/dev/it200x/client/src/main/java]
      [DEBUG] (f) compilerId = javac
      [DEBUG] (f) debug = true
      [DEBUG] (f) fork = false
      [DEBUG] (f) optimize = false
      [DEBUG] (f) outputDirectory = /Users/briantopping/dev/it200x/client/target/classes
      [DEBUG] (f) outputFileName = client-1-SNAPSHOT
      [DEBUG] (f) projectArtifact = org.apache.maven.it:client:jar:1-SNAPSHOT
      [DEBUG] (f) showDeprecation = false
      [DEBUG] (f) showWarnings = false
      [DEBUG] (f) staleMillis = 0
      [DEBUG] (f) verbose = false
      [DEBUG] – end configuration –
      [INFO] [compiler:compile]
      [DEBUG] Using compiler 'javac'.
      [DEBUG] Source directories: [/Users/briantopping/dev/it200x/client/src/main/java]
      [DEBUG] Classpath: [/Users/briantopping/dev/it200x/client/target/classes
      /Users/briantopping/dev/it200x/ejb/target/classes]
      [DEBUG] Output directory: /Users/briantopping/dev/it200x/client/target/classes
      [DEBUG] Classpath:
      [DEBUG] /Users/briantopping/dev/it200x/client/target/classes
      [DEBUG] /Users/briantopping/dev/it200x/ejb/target/classes
      [DEBUG] Source roots:
      [DEBUG] /Users/briantopping/dev/it200x/client/src/main/java
      Compiling 2 source files to /Users/briantopping/dev/it200x/client/target/classes

      Note the boldfaced text.

      Now let's try again, but inside the client directory of the attached IT test:

      [INFO] ----------------------------------------------------------------------------
      [INFO] Building client
      [INFO] task-segment: [clean, install]
      [INFO] ----------------------------------------------------------------------------
      [DEBUG] maven-clean-plugin: resolved to version 2.1 from repository central
      [DEBUG] Retrieving parent-POM: org.apache.maven.plugins:maven-plugin-parent::2.0 for project: null:maven-clean-plugin:maven-plugin:2.1 from the repository.
      [DEBUG] org.apache.maven.plugins:maven-clean-plugin:maven-plugin:2.1:runtime (selected for runtime)
      [DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0 for project: org.apache.maven:maven-plugin-api:jar:2.0 from the repository.
      [DEBUG] org.apache.maven:maven-plugin-api:jar:2.0:runtime (selected for runtime)
      [DEBUG] Retrieving parent-POM: org.apache.maven.shared:shared-components-parent::1 for project: null:file-management:jar:1.0 from the repository.
      [DEBUG] org.apache.maven.shared:file-management:jar:1.0:runtime (selected for runtime)
      [DEBUG] org.codehaus.plexus:plexus-utils:jar:1.0.4:runtime (selected for runtime)
      [DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-clean-plugin:2.1:clean' -->
      [DEBUG] (f) directory = /Users/briantopping/dev/it200x/client/target
      [DEBUG] (f) outputDirectory = /Users/briantopping/dev/it200x/client/target/classes
      [DEBUG] (f) testOutputDirectory = /Users/briantopping/dev/it200x/client/target/test-classes
      [DEBUG] – end configuration –
      [INFO] [clean:clean]
      [INFO] Deleting directory /Users/briantopping/dev/it200x/client/target
      [DEBUG] Originally marked for delete: [classes, ]
      [DEBUG] Marked for preserve (with followSymlinks == false): []
      [DEBUG] Symlinks marked for deletion (originally mismarked): []
      [DEBUG] Originally marked for delete: [classes, ]
      [DEBUG] Marked for preserve (with followSymlinks == false): []
      [DEBUG] Symlinks marked for deletion (originally mismarked): []
      [DEBUG] Found deletable paths: [classes
      ]
      [DEBUG] Checking for symlink:
      Parent file's canonical path: /Users/briantopping/dev/it200x/client/target
      My canonical path: /Users/briantopping/dev/it200x/client/target/classes
      [DEBUG] Checking for symlink:
      Parent file's canonical path: /Users/briantopping/dev/it200x/client
      My canonical path: /Users/briantopping/dev/it200x/client/target
      [INFO] Deleting directory /Users/briantopping/dev/it200x/client/target/classes
      [DEBUG] Found deletable paths: []
      [INFO] Deleting directory /Users/briantopping/dev/it200x/client/target/test-classes
      [DEBUG] Found deletable paths: []
      [DEBUG] maven-resources-plugin: resolved to version 2.2 from repository central
      [DEBUG] Retrieving parent-POM: org.apache.maven.plugins:maven-plugins::1 for project: null:maven-resources-plugin:maven-plugin:2.2 from the repository.
      [DEBUG] Retrieving parent-POM: org.apache.maven:maven-parent::1 for project: org.apache.maven.plugins:maven-plugins:pom:1 from the repository.
      [DEBUG] Retrieving parent-POM: org.apache:apache::1 for project: org.apache.maven:maven-parent:pom:1 from the repository.
      [DEBUG] maven-compiler-plugin: resolved to version 2.0.1 from repository central
      [DEBUG] Retrieving parent-POM: org.apache.maven.plugins:maven-plugins::1 for project: null:maven-compiler-plugin:maven-plugin:2.0.1 from the repository.
      [DEBUG] Retrieving parent-POM: org.apache.maven:maven-parent::1 for project: org.apache.maven.plugins:maven-plugins:pom:1 from the repository.
      [DEBUG] Retrieving parent-POM: org.apache:apache::1 for project: org.apache.maven:maven-parent:pom:1 from the repository.
      [DEBUG] maven-surefire-plugin: resolved to version 2.2 from repository central
      [DEBUG] Retrieving parent-POM: org.apache.maven.plugins:maven-plugins::1 for project: null:maven-surefire-plugin:maven-plugin:2.2 from the repository.
      [DEBUG] Retrieving parent-POM: org.apache.maven:maven-parent::1 for project: org.apache.maven.plugins:maven-plugins:pom:1 from the repository.
      [DEBUG] Retrieving parent-POM: org.apache:apache::1 for project: org.apache.maven:maven-parent:pom:1 from the repository.
      [DEBUG] maven-jar-plugin: resolved to version 2.1 from repository central
      [DEBUG] Retrieving parent-POM: org.apache.maven.plugins:maven-plugins::3 for project: null:maven-jar-plugin:maven-plugin:2.1 from the repository.
      [DEBUG] Retrieving parent-POM: org.apache.maven:maven-parent::4 for project: org.apache.maven.plugins:maven-plugins:pom:3 from the repository.
      [DEBUG] Retrieving parent-POM: org.apache:apache::3 for project: org.apache.maven:maven-parent:pom:4 from the repository.
      [DEBUG] maven-install-plugin: resolved to version 2.1 from repository central
      [DEBUG] Retrieving parent-POM: org.apache.maven.plugins:maven-plugin-parent::2.0 for project: null:maven-install-plugin:maven-plugin:2.1 from the repository.
      [DEBUG] org.apache.maven.plugins:maven-resources-plugin:maven-plugin:2.2:runtime (selected for runtime)
      [DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0 for project: org.apache.maven:maven-model:jar:2.0 from the repository.
      [DEBUG] org.apache.maven:maven-model:jar:2.0:runtime (selected for runtime)
      [DEBUG] org.codehaus.plexus:plexus-utils:jar:1.0.4:runtime (selected for runtime)
      [DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0 for project: null:maven-project:jar:2.0 from the repository.
      [DEBUG] org.apache.maven:maven-project:jar:2.0:runtime (selected for runtime)
      [DEBUG] org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-8:runtime (selected for runtime)
      [DEBUG] classworlds:classworlds:jar:1.1-alpha-2:runtime (selected for runtime)
      [DEBUG] junit:junit:jar:3.8.1:runtime (selected for runtime)
      [DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0 for project: org.apache.maven:maven-artifact:jar:2.0 from the repository.
      [DEBUG] org.apache.maven:maven-artifact:jar:2.0:runtime (selected for runtime)
      [DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0 for project: org.apache.maven:maven-artifact-manager:jar:2.0 from the repository.
      [DEBUG] org.apache.maven:maven-artifact-manager:jar:2.0:runtime (selected for runtime)
      [DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0 for project: org.apache.maven:maven-repository-metadata:jar:2.0 from the repository.
      [DEBUG] org.apache.maven:maven-repository-metadata:jar:2.0:runtime (selected for runtime)
      [DEBUG] org.apache.maven.wagon:wagon-provider-api:jar:1.0-alpha-5:runtime (selected for runtime)
      [DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0 for project: null:maven-profile:jar:2.0 from the repository.
      [DEBUG] org.apache.maven:maven-profile:jar:2.0:runtime (selected for runtime)
      [DEBUG] org.apache.maven:maven-plugin-api:jar:2.0:runtime (selected for runtime)
      [DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-resources-plugin:2.2:resources' -->
      [DEBUG] (f) filters = []
      [DEBUG] (f) outputDirectory = /Users/briantopping/dev/it200x/client/target/classes
      [DEBUG] (f) project = org.apache.maven.project.MavenProject@118ea538
      [DEBUG] (f) resources = [org.apache.maven.model.Resource@1654]
      [DEBUG] – end configuration –
      [INFO] [resources:resources]
      [INFO] Using default encoding to copy filtered resources.
      [DEBUG] org.apache.maven.it:client:jar:1-SNAPSHOT (selected for null)
      [DEBUG] Skipping disabled repository central
      [DEBUG] ejb: using locally installed snapshot
      [DEBUG] Retrieving parent-POM: org.apache.maven.it:it200x::1-SNAPSHOT for project: org.apache.maven.it:ejb:ejb:1-SNAPSHOT from the repository.
      [DEBUG] Skipping disabled repository central
      [DEBUG] it200x: using locally installed snapshot
      [DEBUG] org.apache.maven.it:ejb:ejb-client:client:1-SNAPSHOT:compile (selected for compile)
      [DEBUG] junit:junit:jar:3.8.1:test (selected for test)
      [DEBUG] ejb: using locally installed snapshot
      [DEBUG] org.apache.maven.plugins:maven-compiler-plugin:maven-plugin:2.0.1:runtime (selected for runtime)
      [DEBUG] Retrieving parent-POM: org.codehaus.plexus:plexus-compiler::1.5.2 for project: null:plexus-compiler-api:jar:1.5.2 from the repository.
      [DEBUG] Retrieving parent-POM: org.codehaus.plexus:plexus-components::1.1.5 for project: null:plexus-compiler:pom:1.5.2 from the repository.
      [DEBUG] Retrieving parent-POM: org.codehaus.plexus:plexus::1.0.5 for project: org.codehaus.plexus:plexus-components:pom:1.1.5 from the repository.
      [DEBUG] org.codehaus.plexus:plexus-compiler-api:jar:1.5.2:runtime (selected for runtime)
      [DEBUG] org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-8:runtime (selected for runtime)
      [DEBUG] org.codehaus.plexus:plexus-utils:jar:1.0.4:runtime (selected for runtime)
      [DEBUG] classworlds:classworlds:jar:1.1-alpha-2:runtime (selected for runtime)
      [DEBUG] junit:junit:jar:3.8.1:runtime (selected for runtime)
      [DEBUG] org.codehaus.plexus:plexus-utils:jar:1.0.4:runtime (selected for runtime)
      [DEBUG] Retrieving parent-POM: org.codehaus.plexus:plexus-compiler::1.5.2 for project: null:plexus-compiler-manager:jar:1.5.2 from the repository.
      [DEBUG] Retrieving parent-POM: org.codehaus.plexus:plexus-components::1.1.5 for project: null:plexus-compiler:pom:1.5.2 from the repository.
      [DEBUG] Retrieving parent-POM: org.codehaus.plexus:plexus::1.0.5 for project: org.codehaus.plexus:plexus-components:pom:1.1.5 from the repository.
      [DEBUG] org.codehaus.plexus:plexus-compiler-manager:jar:1.5.2:runtime (selected for runtime)
      [DEBUG] Retrieving parent-POM: org.codehaus.plexus:plexus-compilers::1.5.2 for project: null:plexus-compiler-javac:jar:1.5.2 from the repository.
      [DEBUG] Retrieving parent-POM: org.codehaus.plexus:plexus-compiler::1.5.2 for project: org.codehaus.plexus:plexus-compilers:pom:1.5.2 from the repository.
      [DEBUG] Retrieving parent-POM: org.codehaus.plexus:plexus-components::1.1.5 for project: null:plexus-compiler:pom:1.5.2 from the repository.
      [DEBUG] Retrieving parent-POM: org.codehaus.plexus:plexus::1.0.5 for project: org.codehaus.plexus:plexus-components:pom:1.1.5 from the repository.
      [DEBUG] org.codehaus.plexus:plexus-compiler-javac:jar:1.5.2:runtime (selected for runtime)
      [DEBUG] Retrieving parent-POM: org.codehaus.plexus:plexus::1.0.4 for project: null:plexus-utils:jar:1.0.5 from the repository.
      [DEBUG] org.codehaus.plexus:plexus-utils:jar:1.0.5:runtime (removed - nearer found: 1.0.4)
      [DEBUG] org.apache.maven:maven-plugin-api:jar:2.0:runtime (selected for runtime)
      [DEBUG] org.apache.maven:maven-artifact:jar:2.0:runtime (selected for runtime)
      [DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-compiler-plugin:2.0.1:compile' -->
      [DEBUG] (f) basedir = /Users/briantopping/dev/it200x/client
      [DEBUG] (f) buildDirectory = /Users/briantopping/dev/it200x/client/target
      [DEBUG] (f) classpathElements = [/Users/briantopping/dev/it200x/client/target/classes, /Users/briantopping/.m2/repository/org/apache/maven/it/ejb/1-SNAPSHOT/ejb-1-SNAPSHOT-client.jar]
      [DEBUG] (f) compileSourceRoots = [/Users/briantopping/dev/it200x/client/src/main/java]
      [DEBUG] (f) compilerId = javac
      [DEBUG] (f) debug = true
      [DEBUG] (f) fork = false
      [DEBUG] (f) optimize = false
      [DEBUG] (f) outputDirectory = /Users/briantopping/dev/it200x/client/target/classes
      [DEBUG] (f) outputFileName = client-1-SNAPSHOT
      [DEBUG] (f) projectArtifact = org.apache.maven.it:client:jar:1-SNAPSHOT
      [DEBUG] (f) showDeprecation = false
      [DEBUG] (f) showWarnings = false
      [DEBUG] (f) staleMillis = 0
      [DEBUG] (f) verbose = false
      [DEBUG] – end configuration –
      [INFO] [compiler:compile]
      [DEBUG] Using compiler 'javac'.
      [DEBUG] Source directories: [/Users/briantopping/dev/it200x/client/src/main/java]
      [DEBUG] Classpath: [/Users/briantopping/dev/it200x/client/target/classes
      /Users/briantopping/.m2/repository/org/apache/maven/it/ejb/1-SNAPSHOT/ejb-1-SNAPSHOT-client.jar]
      [DEBUG] Output directory: /Users/briantopping/dev/it200x/client/target/classes
      [DEBUG] Classpath:
      [DEBUG] /Users/briantopping/dev/it200x/client/target/classes
      [DEBUG] /Users/briantopping/.m2/repository/org/apache/maven/it/ejb/1-SNAPSHOT/ejb-1-SNAPSHOT-client.jar
      [DEBUG] Source roots:
      [DEBUG] /Users/briantopping/dev/it200x/client/src/main/java

      Attachments

        1. it200x.tgz
          10 kB
          Brian Topping

        Activity

          People

            snicoll Stephane Nicoll
            topping Brian Topping
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: