8 Replies Latest reply on Aug 5, 2008 4:00 PM by clebert.suconic

    How does version.properties get copied

    timfox

      Ok, I am probably being stupid here, but I can't work this out.

      In src/config we have a file version.properties which gets copied to build/classes before the jar is built using ant jar.

      But I can't find the line in the ant script which does the copy. It's like it gets there by magic, any ideas?

        • 1. Re: How does version.properties get copied
          ataylor

           

          • 2. Re: How does version.properties get copied
            ataylor

             

            • 3. Re: How does version.properties get copied
              ataylor

               

              <echo message="messaging.version.versionName=${messaging.version.name}${line.separator}messaging.version.majorVersion=${messaging.version.major}${line.separator}messaging.version.minorVersion=${messaging.version.minor}${line.separator}messaging.version.microVersion=${messaging.version.micro}${line.separator}messaging.version.incrementingVersion=${messaging.version.incrementing}${line.separator}messaging.version.versionSuffix=${messaging.version.suffix}${line.separator}"
               file="${build.classes.dir}/version.properties"/>



              • 4. Re: How does version.properties get copied
                timfox

                I think the file should be copied not recreated.

                • 5. Re: How does version.properties get copied
                  clebert.suconic

                  AFAIK version.properties is generated based on the version attributes maintained on build-messaging.xml. So on that case (unless we change it), it should be generated.

                  • 6. Re: How does version.properties get copied
                    clebert.suconic

                    I thought version.properties was being generated from build-messaging.xml, and it is actually committed.

                    As I said before, it should be generated. For instance I'll later add some version control between the native and java layer. I will throw some errors if the native layer is on an older version than the java layer, but for that to work well it would be better to have a single point where the version is maintained, and I guess the best place for that is build-messaging.xml.

                    Any counter opinion?

                    • 7. Re: How does version.properties get copied
                      timfox

                      I prefer having a real version.properties file (not generated), and build-messaging.xml can load those properties if it needs them from that file.

                      During the build process we need to copy other files too e.g. jbm-connector-factories.properties, and it seems cleaner to me to just have them all as real files instead of some generated and some not.

                      • 8. Re: How does version.properties get copied
                        clebert.suconic

                        I will just keep the native version counter separated. That way I will only change the native version when we need to. That way the native library from JBM 2 GA would later work fine with JBM 2.1 GA as long as we didn't make any change on native.

                        I guess this would be better since I don't expect many changes on the AIO native layer.