4 Replies Latest reply on Jul 27, 2011 6:58 AM by kcbabo

    Release dependent on environment variables??

    dward

      My build of jboss-switchyard/release dies:

       

      Caused by: java.lang.IllegalArgumentException: Path to the pom.xml file must be defined and accessible
          at org.jboss.shrinkwrap.resolver.impl.maven.Validate.isReadable(Validate.java:96)
          at org.jboss.shrinkwrap.resolver.impl.maven.MavenBuilderImpl.loadReposFromPom(MavenBuilderImpl.java:143)
          at org.switchyard.test.ArquillianUtil.createDeployment(ArquillianUtil.java:90)
          at org.switchyard.test.ArquillianUtil.createQSDeployment(ArquillianUtil.java:66)
          at org.switchyard.test.quickstarts.CamelBindingQuickstartTest.createDeployment(CamelBindingQuickstartTest.java:38)
      

       

      , because I don't have the $JBOSS_HOME environment variable set.  It depends upon it (and the SWITCHYARD_HOME environment variable) in the createDeployment method here: http://goo.gl/8AONC

       

      Why are we relying on environment variables? What value should the $JBOSS_HOME env var have? If it should be set to the distribution we're releasing (AS6 or AS7), shouldn't we already have this as a maven property somewhere?

       

      I can't really fix SWITCHYARD-277 until this gets resolved... Thanks!

        • 1. Re: Release dependent on environment variables??
          kcbabo

          I don't have either of those environment variables set and the release build works A-OK for me.   The class does say that the variable is required, but like I said, it doesn't seem to cramp my style.  I would prefer it if we don't have environment variable dependencies unless absolutely necessary.

           

          One other thing I noticed is that there are two versions of org.switchyard.test.ArquillianUtil in the release repository.  If we really need two different versions, then we should name them differently.  Also, the package name should be org.switchyard.release.test as the org.swtichyard.test package is used in the core/switchyard-test module, IIRC.

          • 2. Re: Release dependent on environment variables??
            mageshbk

            The environment variables are necessary for Arquillian to run properly. These are configured in the surefire-plugin

             

            http://goo.gl/z9vh1

             

            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
                <environmentVariables>
                <JBOSS_HOME>${switchyard.jboss.home}</JBOSS_HOME>
                <SWITCHYARD_VERSION>${project.version}</SWITCHYARD_VERSION>
                </environmentVariables>
                <systemProperties>
                <property>
                  <name>jboss.home</name>
                  <value>${switchyard.jboss.home}</value>
                </property>
                <property>
                  <name>module.path</name>
                  <value>${switchyard.jboss.home}/modules</value>
                </property>
                </systemProperties>
                <trimStackTrace>false</trimStackTrace>
                <printSummary>true</printSummary>
                <forkMode>once</forkMode>
            </configuration>
            
            
            • 3. Re: Release dependent on environment variables??
              mageshbk

              If we really need two different versions, then we should name them differently.  Also, the package name should be org.switchyard.release.test as the org.swtichyard.test package is used in the core/switchyard-test module, IIRC.

              https://issues.jboss.org/browse/SWITCHYARD-362

              • 4. Re: Release dependent on environment variables??
                kcbabo

                Magesh Bojan wrote:

                 

                The environment variables are necessary for Arquillian to run properly. These are configured in the surefire-plugin

                 

                So if environment variables are required, I think this is the best way to handle it.