1 2 Previous Next 15 Replies Latest reply on Feb 14, 2017 5:17 AM by malys

    ear manifest file access

    zoso1900

      New to JBOSS, wondering once I deploy a ear can I still access the manifest file? Looks like WAR files are still on the system but not the ear files.

       

      Reason being the manifest file contains revision/version information that I'd like to extract using a script?

        • 1. Re: ear manifest file access
          cfang

          I dont' see how.  You may need to provide teh same info in a resource file loadable by the deployed app classloader.  Or contain it in <env-entry> in application.xml or web.xml

          • 2. Re: ear manifest file access
            zoso1900

            Ok. Is there a way to know which version of a ear file has been loaded? Presently we load about 30 ear files, hence it is possible to replace a single ear file.

             

            Before on Glassfish we could see all the ear files and there manifest files deployed in a system since it was kept in a deploy directory.

            • 3. Re: ear manifest file access
              sfcoy

              I think that reading application manifest attributes using the CLI (and by extension the management console) would be a useful feature request.

               

              Incidentally, as we build our applications with maven, all of our deployed artifacts are versioned by name. The use of EAR file names in JNDI these days makes this less useful now, however.

              • 4. Re: ear manifest file access
                zoso1900

                so there is no way to obtain the following type on information on JBOSS presently?

                 

                To retrieve product information on each application, run the following:

                # unzip -c <deployable_component> META-INF/MANIFEST.MF |

                grep Product

                • 5. Re: ear manifest file access
                  zoso1900

                  Is it possible to create a deploy directory which keeps all the ear files?

                  • 6. Re: ear manifest file access
                    zoso1900

                    hi. Thank you for your reply, not sure I completely understood it. How do you keep version information of ear files? In JBOSS managed deployment/runtime I can see all the ear files deployed, we presently rename the ear files to contain the version for example

                    bandwidth-ear-10.1.1.ear.

                     

                    The idea was to make it available through a script, there must be some JBOSS CLI command to obtain this information?

                    (wsdl files ear and manifest are available on the system.)

                     

                    Is there another way of tracking the version of the application deployed? Without having to go through the JBOSS GUI?

                    • 7. Re: ear manifest file access
                      sfcoy

                      You can issue the following jboss-cli command to list deployments:

                       

                      {code}[standalone@localhost:9999 /] deployment=* :read-resource{code}

                      • 8. Re: ear manifest file access
                        zoso1900

                        what worked for me was

                         

                        ./deployment=* :read-resource

                         

                        But is there a way with the cli to display the manifest files?

                        • 9. Re: ear manifest file access
                          sfcoy

                          Not that I'm aware of.

                           

                          See my response #3 above.

                          • 10. Re: ear manifest file access
                            zoso1900

                            ok. if I want to undeploy and redeploy ear file, shouldn't there be a deploy directory (domain) that keeps the ear files on the system?

                            • 11. Re: ear manifest file access
                              sfcoy

                              Why? It's not specified anywhere how an application server implementation should persist it's deployments.

                              • 12. Re: ear manifest file access
                                zoso1900

                                I searched the system assuming I'd find a directory where the deployed ear files are located, but nothing...

                                • 13. Re: ear manifest file access
                                  zoso1900

                                  Managed to find the ear files in a deployment current directory, not very nice to grep on.

                                   

                                  How can I place a requirement on jboss-cli to display also the contents of the manifest file?

                                  • 14. Re: ear manifest file access
                                    mlybarger

                                    i'd like to be able to do this as well.  currently, we use maven to deploy from a jenkins job to the remote server. there's nothing in the deployments folder.  it'd be nice to be able to pull the ear file and introspect information from inside to verify what's running is what you think is running.

                                    1 2 Previous Next