3 Replies Latest reply on Sep 25, 2008 8:06 AM by Aleksandar Kostadinov

    how to change classpath

    Aleksandar Kostadinov Novice

      Hallo,

      I need to change the jboss.server.manager.classpath in AS5. But I can't find out how.

      Currently it includes only one jar - the server manager. Now I need it to include 2 more jars that are new dependencies of the server manager. After maven generates thirdparty with my snapshot version of server manager I see the classpath being the same without the two new dependencies.
      Shouldn't maven detect the dependencies automatically, or I need to instruct it somehow?

      As well I think that server manager is only a test suite dependency. I'm planning to set its scope to test (after testing it works).

      Thanks much!

        • 1. Re: how to change classpath
          Paul Gier Master

          Looks like that dependency is mapped from maven to libraries.ent with this config

           <dependency>
           <groupId>org.jboss.jbossas</groupId>
           <artifactId>jboss-server-manager</artifactId>
           <mapping>
           <componentId>jboss.server.manager</componentId>
           </mapping>
           </dependency>
          

          If you want to add additional jars to the jboss.server.manager.classpath you would just have to map those dependencies to the same componentId. The maven plugin that generates libraries.ent doesn't understand maven transitive dependencies, so it won't automatically figure those out. By default it will just translate groupId to componentId so dependencies with the same groupId (that are not mapped to a different componentId) are combined into one component with the associated properties in libraries.ent.

          • 2. Re: how to change classpath
            Aleksandar Kostadinov Novice

            I suspected that for the groupId but didn't understand mapping would do the same.

            So if I need additional jars that don't currently specify mapping, I will have to include their groupId as a mapping additionaly to "jboss.server.manager", right?

            What about scope? "jboss.server.manager" is only for tests but its dependencies are not. Can I still pecify scope to server manager and expect it works?

            I'll try anyways,
            thanks :)

            • 3. Re: how to change classpath
              Aleksandar Kostadinov Novice

              I see how the scope works.

              As well I realized that I don't need to have these libraries taken from outside but need these built now. I'll start another thread about it.

              Thanks for the help!