Issue Type: Bug Bug
Affects Versions: 1.0
Assignee: Keith Babo
Components: tooling
Created: 19/Aug/13 12:16 PM
Description:

While working through some configuration issues reported against imported SwitchYard quickstarts, I noticed that the SwitchYard->Configure Capabilities menu was making changes to the pom.xml file beyond simply adding/removing selected capabilities.

As an example, here's the before:

<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright 2013 Red Hat Inc. and/or its affiliates and other contributors.
-
- Licensed under the Apache License, Version 2.0 (the "License")
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.switchyard.quickstarts</groupId>
        <artifactId>switchyard-quickstart-parent</artifactId>
        <version>1.1.0-SNAPSHOT</version>
        <relativePath>../pom.xml</relativePath>
    </parent>
    <artifactId>switchyard-quickstart-transform-xslt</artifactId>
    <packaging>jar</packaging>
    <name>Quickstart : XSLT Transformation</name>
    <properties>
        <switchyard.version>1.1.0-SNAPSHOT</switchyard.version>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.switchyard</groupId>
            <artifactId>switchyard-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.switchyard</groupId>
            <artifactId>switchyard-plugin</artifactId>
        </dependency>
        <dependency>
            <groupId>org.switchyard.components</groupId>
            <artifactId>switchyard-component-bean</artifactId>
        </dependency>
        <dependency>
            <groupId>org.switchyard.components</groupId>
            <artifactId>switchyard-component-soap</artifactId>
        </dependency>
        <dependency>
            <groupId>org.switchyard.components</groupId>
            <artifactId>switchyard-component-camel</artifactId>
        </dependency>
        <dependency>
            <groupId>org.switchyard</groupId>
            <artifactId>switchyard-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.switchyard.components</groupId>
            <artifactId>switchyard-component-test-mixin-cdi</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.switchyard.components</groupId>
            <artifactId>switchyard-component-test-mixin-http</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>commons-httpclient</groupId>
            <artifactId>commons-httpclient</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <build>
        <finalName>${project.artifactId}</finalName>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                    <debug>true</debug>
                    <showWarnings>true</showWarnings>
                    <showDeprecation>true</showDeprecation>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.switchyard</groupId>
                <artifactId>switchyard-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>configure</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <configuration>
                    <mainClass>org.switchyard.quickstarts.transform.xslt.XSLTClient</mainClass>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

And here's the after:

<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.switchyard.quickstarts</groupId>
    <artifactId>switchyard-quickstart-parent</artifactId>
    <version>1.1.0-SNAPSHOT</version>
  </parent>
  <artifactId>switchyard-quickstart-transform-xslt</artifactId>
  <name>Quickstart : XSLT Transformation</name>
  <properties>
    <switchyard.version>1.1.0-SNAPSHOT</switchyard.version>
  </properties>
  <dependencies>
    <dependency>
      <groupId>org.switchyard</groupId>
      <artifactId>switchyard-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.switchyard</groupId>
      <artifactId>switchyard-plugin</artifactId>
    </dependency>
    <dependency>
      <groupId>org.switchyard.components</groupId>
      <artifactId>switchyard-component-bean</artifactId>
    </dependency>
    <dependency>
      <groupId>org.switchyard.components</groupId>
      <artifactId>switchyard-component-soap</artifactId>
    </dependency>
    <dependency>
      <groupId>org.switchyard</groupId>
      <artifactId>switchyard-test</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.switchyard.components</groupId>
      <artifactId>switchyard-component-test-mixin-cdi</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.switchyard.components</groupId>
      <artifactId>switchyard-component-test-mixin-http</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>commons-httpclient</groupId>
      <artifactId>commons-httpclient</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.switchyard</groupId>
      <artifactId>switchyard-transform</artifactId>
    </dependency>
    <dependency>
      <groupId>org.switchyard</groupId>
      <artifactId>switchyard-validate</artifactId>
    </dependency>
  </dependencies>
  <repositories>
    <repository>
      <id>jboss-public-repository</id>
      <name>JBoss Public Maven Repository</name>
      <url>http://repository.jboss.org/nexus/content/groups/public</url>
    </repository>
  </repositories>
  <pluginRepositories>
    <pluginRepository>
      <id>jboss-public-repository</id>
      <name>JBoss Public Maven Repository</name>
      <url>http://repository.jboss.org/nexus/content/groups/public</url>
    </pluginRepository>
  </pluginRepositories>
  <build>
    <finalName>${project.artifactId}</finalName>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>1.6</source>
          <target>1.6</target>
          <debug>true</debug>
          <showWarnings>true</showWarnings>
          <showDeprecation>true</showDeprecation>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.switchyard</groupId>
        <artifactId>switchyard-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>configure</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <scannerClassNames>
            <param>org.switchyard.transform.config.model.TransformSwitchYardScanner</param>
          </scannerClassNames>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <configuration>
          <mainClass>org.switchyard.quickstarts.transform.xslt.XSLTClient</mainClass>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>

Among the differences:

  • Copyright header is stripped
  • parent relativePath removed
  • jar packaging removed
  • switchyard-transform and switchyard-validate dependencies added
  • plugin repository section added
  • groupId removed from maven-compiler-plugin artifact definition
  • TransformSwitchYardScanner added

Though these changes do not hamper the ability to deploy and test the quickstart, users may be concerned by some of them.

Are these changes minor enough that they're ok? I just worry that if the user has other configuration in the pom and that gets stomped on somehow we'll run into issues.

Project: SwitchYard
Priority: Minor Minor
Reporter: Brian Fitzpatrick
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira