<commit_before><?xml version="1.0" encoding="UTF-8"?>

<!--
 *
 * See the NOTICE file distributed with this work for additional
 * information regarding copyright ownership.
 *
 * This is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 *
-->

<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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.xwiki.enterprise</groupId>
    <artifactId>xwiki-enterprise-installers</artifactId>
    <version>4.2-SNAPSHOT</version>
  </parent>
  <artifactId>xwiki-enterprise-installer-windows</artifactId>
  <name>XWiki Enterprise - Installers - Windows</name>
  <packaging>pom</packaging>
  <description>XWiki Enterprise - Installers - Windows</description>
  <dependencies>
    <dependency>
      <groupId>org.xwiki.enterprise</groupId>
      <artifactId>xwiki-enterprise-installer-generic</artifactId>
      <version>${project.version}</version>
      <classifier>standard</classifier>
    </dependency>
    
    <!-- Even though this dependency is defined in Launch4J's pom.xml we still need it to
         construct the correct maven.compile.classpath for executing the Launch4J Ant task below -->
    <dependency>
      <groupId>com.thoughtworks.xstream</groupId>
      <artifactId>xstream</artifactId>
      <version>1.2</version>
      <optional>true</optional>
    </dependency>
  </dependencies>
  <build>
    <resources>
      <!-- Copy and filter the launch4j.xml file -->
      <resource>
        <directory>${basedir}/src/main/resources</directory>
        <includes>
          <include>launch4j.xml</include>
        </includes>
        <filtering>true</filtering>
      </resource>
      <!-- Copy and don't filter the other resource files -->
      <resource>
        <directory>${basedir}/src/main/resources</directory>
        <excludes>
          <exclude>launch4j.xml</exclude>
        </excludes>
        <filtering>false</filtering>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <executions>
          <execution>
            <phase>process-resources</phase>
            <goals>
              <goal>resources</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>copy</id>
            <phase>package</phase>
            <goals>
              <goal>copy</goal>
            </goals>
            <configuration>
              <stripVersion>true</stripVersion>
              <artifactItems>
                <artifactItem>
                  <groupId>launch4j</groupId>
                  <artifactId>launch4j</artifactId>
                  <version>3.0.2</version>
                </artifactItem>
                <artifactItem>
                  <groupId>org.xwiki.enterprise</groupId>
                  <artifactId>xwiki-enterprise-installer-generic</artifactId>
                  <version>${project.version}</version>
                  <classifier>standard</classifier>
                </artifactItem>
              </artifactItems>
            </configuration>
          </execution>
          <execution>
            <id>unpack</id>
            <phase>package</phase>
            <goals>
              <goal>unpack</goal>
            </goals>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>launch4j</groupId>
                  <artifactId>launch4j</artifactId>
                  <version>3.0.2</version>
                  <classifier>${launch4jOs}</classifier>
                  <type>zip</type>
                </artifactItem>
              </artifactItems>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <id>run-launch4j</id>
            <phase>package</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <tasks>
                <!-- Dependency plugin discards file permissions so we need to set them back
                     manually. See http://jira.codehaus.org/browse/MDEP-109 -->
                <chmod file="${project.build.directory}/dependency/bin/windres" perm="ugo+rx" />
                <chmod file="${project.build.directory}/dependency/bin/ld" perm="ugo+rx" />
                
                <property name="classpath.compile" refid="maven.compile.classpath" />
                <taskdef name="launch4j" classname="net.sf.launch4j.ant.Launch4jTask" classpath="${classpath.compile}:${project.build.directory}/dependency/launch4j.jar" />
                <launch4j configFile="${project.build.directory}/classes/launch4j.xml" />
              </tasks>
            </configuration>
          </execution>
        </executions>
      </plugin>      
      <!-- Use the Maven build-helper plugin to attach the generated installer EXE to this
           project's main artifact -->
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>attach-artifact</goal>
            </goals>
            <configuration>
              <artifacts>
                <artifact>
                  <file>${project.build.directory}/${project.artifactId}-${project.version}.exe</file>
                  <type>exe</type>
                </artifact>
              </artifacts>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>unix</id>
      <activation>
        <os>
          <family>unix</family>
        </os>        
      </activation>
      <properties>
        <launch4jOs>linux</launch4jOs>
      </properties>
    </profile>
    <profile>
      <id>mac</id>
      <activation>
        <os>
          <family>mac</family>
        </os>        
      </activation>
      <properties>
        <launch4jOs>macosx-x86</launch4jOs>
      </properties>
    </profile>
    <profile>
      <id>windows</id>
      <activation>
        <os>
          <family>windows</family>
        </os>        
      </activation>
      <properties>
        <launch4jOs>win32</launch4jOs>
      </properties>
    </profile>
  </profiles>
</project>
<commit_msg>XCOMMONS-241: Upgrade to Maven Dependency plugin v2.5<commit_after><?xml version="1.0" encoding="UTF-8"?>

<!--
 *
 * See the NOTICE file distributed with this work for additional
 * information regarding copyright ownership.
 *
 * This is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 *
-->

<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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.xwiki.enterprise</groupId>
    <artifactId>xwiki-enterprise-installers</artifactId>
    <version>4.2-SNAPSHOT</version>
  </parent>
  <artifactId>xwiki-enterprise-installer-windows</artifactId>
  <name>XWiki Enterprise - Installers - Windows</name>
  <packaging>pom</packaging>
  <description>XWiki Enterprise - Installers - Windows</description>
  <dependencies>
    <dependency>
      <groupId>org.xwiki.enterprise</groupId>
      <artifactId>xwiki-enterprise-installer-generic</artifactId>
      <version>${project.version}</version>
      <classifier>standard</classifier>
    </dependency>
    
    <!-- Even though this dependency is defined in Launch4J's pom.xml we still need it to
         construct the correct maven.compile.classpath for executing the Launch4J Ant task below -->
    <dependency>
      <groupId>com.thoughtworks.xstream</groupId>
      <artifactId>xstream</artifactId>
      <version>1.2</version>
      <optional>true</optional>
    </dependency>
  </dependencies>
  <build>
    <resources>
      <!-- Copy and filter the launch4j.xml file -->
      <resource>
        <directory>${basedir}/src/main/resources</directory>
        <includes>
          <include>launch4j.xml</include>
        </includes>
        <filtering>true</filtering>
      </resource>
      <!-- Copy and don't filter the other resource files -->
      <resource>
        <directory>${basedir}/src/main/resources</directory>
        <excludes>
          <exclude>launch4j.xml</exclude>
        </excludes>
        <filtering>false</filtering>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <executions>
          <execution>
            <phase>process-resources</phase>
            <goals>
              <goal>resources</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>copy</id>
            <phase>package</phase>
            <goals>
              <goal>copy</goal>
            </goals>
            <configuration>
              <stripVersion>true</stripVersion>
              <artifactItems>
                <artifactItem>
                  <groupId>launch4j</groupId>
                  <artifactId>launch4j</artifactId>
                  <version>3.0.2</version>
                </artifactItem>
                <artifactItem>
                  <groupId>org.xwiki.enterprise</groupId>
                  <artifactId>xwiki-enterprise-installer-generic</artifactId>
                  <version>${project.version}</version>
                  <classifier>standard</classifier>
                </artifactItem>
              </artifactItems>
            </configuration>
          </execution>
          <execution>
            <id>unpack</id>
            <phase>package</phase>
            <goals>
              <goal>unpack</goal>
            </goals>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>launch4j</groupId>
                  <artifactId>launch4j</artifactId>
                  <version>3.0.2</version>
                  <classifier>${launch4jOs}</classifier>
                  <type>zip</type>
                </artifactItem>
              </artifactItems>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <id>run-launch4j</id>
            <phase>package</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <tasks>
                <property name="classpath.compile" refid="maven.compile.classpath" />
                <taskdef name="launch4j" classname="net.sf.launch4j.ant.Launch4jTask" classpath="${classpath.compile}:${project.build.directory}/dependency/launch4j.jar" />
                <launch4j configFile="${project.build.directory}/classes/launch4j.xml" />
              </tasks>
            </configuration>
          </execution>
        </executions>
      </plugin>      
      <!-- Use the Maven build-helper plugin to attach the generated installer EXE to this
           project's main artifact -->
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>attach-artifact</goal>
            </goals>
            <configuration>
              <artifacts>
                <artifact>
                  <file>${project.build.directory}/${project.artifactId}-${project.version}.exe</file>
                  <type>exe</type>
                </artifact>
              </artifacts>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>unix</id>
      <activation>
        <os>
          <family>unix</family>
        </os>        
      </activation>
      <properties>
        <launch4jOs>linux</launch4jOs>
      </properties>
    </profile>
    <profile>
      <id>mac</id>
      <activation>
        <os>
          <family>mac</family>
        </os>        
      </activation>
      <properties>
        <launch4jOs>macosx-x86</launch4jOs>
      </properties>
    </profile>
    <profile>
      <id>windows</id>
      <activation>
        <os>
          <family>windows</family>
        </os>        
      </activation>
      <properties>
        <launch4jOs>win32</launch4jOs>
      </properties>
    </profile>
  </profiles>
</project>

{'fraction_non_alphanumeric': 0.12732436270200825, 'fraction_numerical': 0.010007437960646426, 'mean_word_length': 1.9171597633136095, 'pattern_counts': {'":': 0, '<': 512, '<?xml version=': 2, '>': 512, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 16}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3110873', 'n_tokens_mistral': 4450, 'n_tokens_neox': 4032, 'n_words': 805}