Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-3715

Resource filtering fails when run from Hudson

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • maven-plugin
    • None
    • Platform: PC, OS: Solaris

      This morning, we upgraded to 1.306

      We had some shell scripts being filtered during packaging. A few properties in
      them (like installation directory) were being filtered and leaving things such
      as CLASSPATH and JAVA_HOME alone (because they are not defined properties).

      As of today, those get filtered to match the values on the Hudson server. We can
      not replicate this from the command-line, even from the same machine. It only
      happens when run from within Hudson.

      We were using the maven-assembly-plugin to do the filtering. The
      maven-resources-plugin is doing the same thing.... but only from Hudson.

          [JENKINS-3715] Resource filtering fails when run from Hudson

          mdonohue added a comment -

          Is 'resource filtering' a maven feature? I'm thinking this should be moved to
          the maven2 subcomponent

          mdonohue added a comment - Is 'resource filtering' a maven feature? I'm thinking this should be moved to the maven2 subcomponent

          malachid added a comment -

          It is turning on filtering with maven-resources-plugin or using the filters on
          the maven-assembly-plugin. It does not fail unless Hudson launches it.

          malachid added a comment - It is turning on filtering with maven-resources-plugin or using the filters on the maven-assembly-plugin. It does not fail unless Hudson launches it.

          mdonohue added a comment -

          In Hudson is this a freestyle build, or a maven2 build?

          mdonohue added a comment - In Hudson is this a freestyle build, or a maven2 build?

          malachid added a comment -

          maven2 build

          malachid added a comment - maven2 build

          mdonohue added a comment -

          Moving to Maven2 subcomponent.

          mdonohue added a comment - Moving to Maven2 subcomponent.

          Zachary Young added a comment -

          I'm seeing this behavior, too. Is this considered a "non"-issue, now?

          Zachary Young added a comment - I'm seeing this behavior, too. Is this considered a "non"-issue, now?

          Jim Divine added a comment -

          FWIW, if anyone happens to run across this, it appears that this happens when a build runs in Jenkins (but not when run outside Jenkins) because Jenkins is setting environment variables as Java system properties as well. I was seeing exactly the same behavior with the maven resources plugin and <filtering>true</filtering>. I could not reproduce this outside Jenkins until I tried setting MAVEN_OPTS to include "-DJAVA_HOME=XYZ".

          Jim Divine added a comment - FWIW, if anyone happens to run across this, it appears that this happens when a build runs in Jenkins (but not when run outside Jenkins) because Jenkins is setting environment variables as Java system properties as well. I was seeing exactly the same behavior with the maven resources plugin and <filtering>true</filtering>. I could not reproduce this outside Jenkins until I tried setting MAVEN_OPTS to include "-DJAVA_HOME=XYZ".

            Unassigned Unassigned
            malachid malachid
            Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: