7 Replies Latest reply on Nov 20, 2015 9:36 AM by tcunning

    Maven issue with SwitchYard project on Jboss Developer Studio

    nitinkalra2000

      I am trying to create a fresh SwitchYard project on JBoss Developer studio. I am using JBoss developer studio 8 Maven 3.3 Java 8

      I am referring settings.xml file in Windows->preferences->maven->user settings. Content of settings.xml are

       

      <settings>
      <profiles>
         <profile>
         <id>jboss-public-repository-group</id>
         <activation>
         <activeByDefault>true</activeByDefault>
         </activation>
         <repositories>
         <repository>
         <id>jboss-public-repository-group</id>
         <name>JBoss Public Repository Group</name>
         <url>http://repository.jboss.org/nexus/content/groups/public/</url>
         <layout>default</layout>
         <releases>
         <enabled>true</enabled>
         <updatePolicy>never</updatePolicy>
         </releases>
         <snapshots>
         <enabled>true</enabled>
         <updatePolicy>never</updatePolicy>
         </snapshots>
         </repository>
         <repository>
         <id>jboss-enterprise-repository-group</id>
         <name>JBoss Enterprise Maven Repository Group</name>
         <url>http://maven.repository.redhat.com/techpreview/all/</url>
         <layout>default</layout>
         <releases>
         <enabled>true</enabled>
         <updatePolicy>never</updatePolicy>
         </releases>
         <snapshots>
         <enabled>true</enabled>
         <updatePolicy>never</updatePolicy>
         </snapshots>
         </repository>
         <repository>
         <id>fusesource-public-release-repository-group</id>
         <url>https://repository.jboss.org/nexus/content/repositories/fs-releases</url>
         <releases>
         <enabled>true</enabled>
         <updatePolicy>never</updatePolicy>
         </releases>
         <snapshots>
         <enabled>true</enabled>
         <updatePolicy>never</updatePolicy>
         </snapshots>
         </repository>
         </repositories>
         <pluginRepositories>
         <pluginRepository>
         <id>jboss-public-repository-group</id>
         <name>JBoss Public Maven Repository Group</name>
         <url>https://repository.jboss.org/nexus/content/groups/public/</url>
         <layout>default</layout>
         <releases>
         <enabled>true</enabled>
         <updatePolicy>never</updatePolicy>
         </releases>
         <snapshots>
         <enabled>true</enabled>
         <updatePolicy>never</updatePolicy>
         </snapshots>
         </pluginRepository>
         </pluginRepositories>
         </profile>
      </profiles>
      
      

       

      After this, when I create a new SwitchYard project in JBoss DS 8, I get below notification.

       

      Error_SwitchYard_Maven.PNG


      Project gets created but with errors. Because nothing got downloaded from Maven repository. Below are the errors :


      Errors_SwitchYard.PNG

      Error

      Failure to transfer org.switchyard:Switchyard-plugin:Pom:2.0.0.Final from https://repository.jboss.org/nexus/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of jboss-public-repository-group has elapsed or updates are forced. Original error: Could not transfer artifact org.switchyard:Switchyard-plugin:Pom:2.0.0.Final from/to jboss-public-repository-group (https://repository.jboss.org/nexus/content/groups/public/): repository.jboss.org
      
      
      
      

      When I am doing same steps on my laptop, there isn't problem. The issue is coming when I am using my office machine. Even on my laptop there are different library versions being shown in dropdown while creating switchyard project but on office machine where I am getting the issue there is only one library version 2.0.0.Final.

      Can anybody please point out the mistake ?

      Thanks Nitin

        • 1. Re: Maven issue with SwitchYard project on Jboss Developer Studio
          tcunning

          I don't know that this is the error or not, but it seems weird to me that the artifactId and the packaging have capital letters in them ("Switchyard-plugin", "Pom").   Can you try lower-casing them?

           

          org.switchyard:Switchyard-plugin:Pom:2.0.0.Final


          • 2. Re: Maven issue with SwitchYard project on Jboss Developer Studio
            bfitzpat

            Seems that your office machine's maven repo may be corrupted somehow. Can you try right-clicking on your project in the tooling and selecting Maven->Update Project, then checking "Force Update of Snapshots/Releases" in addition to "Update project configuration from pom.xml", "Refresh workspace resources from local filesystem" and "Clean projects" to see if that shakes things loose?

            • 3. Re: Maven issue with SwitchYard project on Jboss Developer Studio
              nitinkalra2000

              Both of above solutions are not working.

              • 4. Re: Maven issue with SwitchYard project on Jboss Developer Studio
                bfitzpat

                Does your office machine work on a different network than your laptop? Could this be caused by VPN or network issues?

                 

                I'm grasping at straws here unfortunately. Our support folks may have better ideas if you open a ticket.

                • 5. Re: Maven issue with SwitchYard project on Jboss Developer Studio
                  nitinkalra2000

                  Yes both are on different network and using different internet connection.

                   

                  Now I am facing one more issue on my laptop where there wasn't any problem during creation of SwitchYard project.

                  I dragged a component on canvas and I started getting below error.

                  component_error.PNG

                   

                  cvc-complex-type.2.4.b: The content of element 'sca:component' is not complete. One of '{"http://docs.oasis-open.org/ns/opencsa/sca/200912":documentation, "http://docs.oasis-open.org/ns/opencsa/sca/200912":implementation}' is expected.
                  
                  

                   

                  my switchyard.xml is :

                  <?xml version="1.0" encoding="UTF-8"?>
                  <sy:switchyard xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912" 
                    xmlns:sy="urn:switchyard-config:switchyard:2.0" name="switchyard-example" 
                    targetNamespace="urn:com.example.switchyard:switchyard-example:1.0">
                  
                    <sca:composite name="switchyard-example" targetNamespace="urn:com.example.switchyard:switchyard-example:1.0">
                      <sca:component name="Component"/>
                    </sca:composite>
                  
                  
                  </sy:switchyard>
                  

                   

                  Any idea about this ?

                  • 6. Re: Maven issue with SwitchYard project on Jboss Developer Studio
                    bfitzpat

                    That's what I suspected. It may be that the maven repositories that are available on your laptop are not available on your work PC. But I'm not sure how to get you over that issue.

                     

                    As for the other issue, the SwitchYard tooling does some validation of the configuration as you create it. When you drag an empty Component to the composite, it is lacking an implementation and services or references, so it's just telling you that your configuration isn't ready to go yet.

                     

                    I recommend going through the tutorial here - Tutorial - SwitchYard - Project Documentation Editor - it might be a little out of date (they're working on new documentation for 2.0.1) but it should get you to a testable service pretty quickly.

                     

                    Hope that helps!

                    • 7. Re: Maven issue with SwitchYard project on Jboss Developer Studio
                      tcunning

                      One thing you can do is make sure that all of the URLs in your settings.xml work on your work's network (and make sure that you're not using a proxied browser when testing that).