pom.xml 10.5 KB
Newer Older
1
<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">
K
kohsuke 已提交
2 3 4 5
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.jvnet.hudson.main</groupId>
    <artifactId>pom</artifactId>
6
    <version>1.69-SNAPSHOT</version>
K
kohsuke 已提交
7 8 9 10 11 12 13 14 15
    <relativePath>../pom.xml</relativePath>
  </parent>
  
  <artifactId>hudson-core</artifactId>
  <packaging>jar</packaging>
  <name>Hudson core</name>
  
  <build>
    <plugins>
K
kohsuke 已提交
16 17 18 19 20 21 22 23 24 25 26
      <plugin>
        <groupId>org.kohsuke.stapler</groupId>
        <artifactId>maven-stapler-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>stapler</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
K
kohsuke 已提交
27 28 29 30 31 32 33 34 35 36 37 38 39 40
      <plugin>
        <artifactId>maven-antlr-plugin</artifactId>
        <configuration>
          <sourceDirectory>${basedir}/src/main/grammar</sourceDirectory>
          <grammars>crontab.g</grammars>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>generate</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
41 42 43 44 45 46 47 48 49 50 51 52 53 54
      <!--
        Generate retrotranslated 1.4 jar "on the side". I tried various approaches like
        "profile" (like http://testng.googlecode.com/svn/trunk/pom.xml), but in the
        end using Ant seems to be the easiest.
      -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <id>create14jar</id>
            <phase>package</phase>
            <configuration>
              <tasks>
55 56
                <taskdef name="retrotranslator" classpathref="maven.test.classpath" classname="net.sf.retrotranslator.transformer.RetrotranslatorTask" />
                <mkdir dir="target/classes14" />
K
kohsuke 已提交
57
                <retrotranslator destdir="target/classes14"><!-- verify="true" detects false-positive errors against some references to remoting-->
58
                  <src path="target/classes" />
59 60 61 62 63 64 65 66
                </retrotranslator>
                <jar basedir="target/classes14" destfile="target/${artifactId}-${version}-jdk14.jar" />
              </tasks>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
K
kohsuke 已提交
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
          <execution>
            <phase>generate-resources</phase>
            <configuration>
              <tasks>
                <tstamp>
                  <format property="now" pattern="MM/dd/yyyy hh:mm" unit="hour" />
                </tstamp>
                <property name="build.version" value="${version} (private-${now}-${user.name})" /><!-- default to release version -->
                <!-- put the version file -->
                <echo message="The build id is: ${build.version}" />
                <mkdir dir="target/classes/hudson" />
                <echo file="target/classes/hudson/hudson-version.properties">version=${build.version}
                </echo>
                <mkdir dir="target/classes14/hudson" />
                <echo file="target/classes14/hudson/hudson-version.properties">version=${build.version}
                </echo>
              </tasks>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
        </executions>
      </plugin>
      <!--
        Attach the generated 1.4 jar to the build so that it gets deployed to the repo.
      -->
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-artifacts</id>
            <phase>package</phase>
            <goals>
              <goal>attach-artifact</goal>
            </goals>
            <configuration>
              <artifacts>
                <artifact>
                  <file>target/${artifactId}-${version}-jdk14.jar</file>
                  <type>jar</type>
                  <classifier>jdk14</classifier>
                </artifact>
              </artifacts>
            </configuration>
          </execution>
        </executions>
      </plugin>
K
kohsuke 已提交
116 117
    </plugins>
  </build>
118 119 120 121 122 123 124

  <profiles>
    <profile>
      <id>debug</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
125 126 127 128 129 130 131
      <dependencies>
        <dependency>
          <groupId>org.jvnet.hudson.main</groupId>
          <artifactId>remoting</artifactId>
          <version>${version}</version>
        </dependency>
      </dependencies>
132 133 134
    </profile>
    <profile>
      <id>release</id>
135 136
      <build>
        <plugins>
137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163
          <!--
            To build the remoting and core modules both retrotranslated
            (and still while writing the core code with generics),
            it is necessary to build both in one compilation. So in
            the release mode, we add the remoting source tree as a part
            of the core.
            
            Instead, in the debug profile we depends on the separately built remoting module,
            so that IDEs won't get confused with "duplicate code"
          -->
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>build-helper-maven-plugin</artifactId>
            <configuration>
              <sources>
                <source>../remoting/src/main/java</source>
              </sources>
            </configuration>
            <executions>
              <execution>
                <goals>
                  <goal>add-source</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <!-- run retrotranslator only during the release, so that debug build gets faster -->
164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>retrotranslator-maven-plugin</artifactId>
            <executions>
              <execution>
                <phase>process-classes</phase>
                <goals>
                  <goal>translate</goal>
                </goals>
                <configuration>
                  <includes>
                    <include>
                      <directory>target/classes</directory>
                    </include>
                  </includes>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
185 186 187 188
      <properties>
        <!-- for releases, just use the POM version. See above ant-run plugin for how this gets used. -->
        <build.version>${version}</build.version>
      </properties>
189 190 191
    </profile>
  </profiles>

K
kohsuke 已提交
192
  <dependencies>
K
kohsuke 已提交
193 194 195 196 197
    <dependency>
      <groupId>net.sf.retrotranslator</groupId>
      <artifactId>retrotranslator-runtime</artifactId>
      <version>1.0.8</version>
    </dependency>
198 199 200 201 202 203 204 205 206 207
    <dependency>
      <!--
        marked as test dependency so that I can still use it in the antrun plugin but
        it won't show up as a public dependency
      -->
      <groupId>net.sf.retrotranslator</groupId>
      <artifactId>retrotranslator-transformer</artifactId>
      <version>1.0.8</version>
      <scope>test</scope>
    </dependency>
K
kohsuke 已提交
208 209 210
    <dependency>
      <groupId>org.kohsuke.stapler</groupId>
      <artifactId>stapler</artifactId>
K
kohsuke 已提交
211
      <version>1.15</version>
K
kohsuke 已提交
212 213 214 215 216 217 218 219 220 221 222 223 224 225
    </dependency>
    <dependency>
      <groupId>antlr</groupId>
      <artifactId>antlr</artifactId>
      <version>2.7.6</version>
    </dependency>
    <dependency>
      <groupId>xstream</groupId>
      <artifactId>xstream</artifactId>
      <version>1.1.3</version>
    </dependency>
    <dependency>
      <groupId>jfree</groupId>
      <artifactId>jfreechart</artifactId>
226
      <version>1.0.3</version>
K
kohsuke 已提交
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273
    </dependency>
    <dependency>
      <groupId>ant</groupId>
      <artifactId>ant-junit</artifactId>
      <version>1.6.2</version>
    </dependency>
    <dependency>
      <groupId>ant</groupId>
      <artifactId>ant</artifactId>
      <version>1.6.2</version>
    </dependency>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>servlet-api</artifactId>
      <version>2.4</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>commons-fileupload</groupId>
      <artifactId>commons-fileupload</artifactId>
      <version>1.1</version>
    </dependency>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <version>1.2</version>
    </dependency>
    <dependency>
      <groupId>commons-digester</groupId>
      <artifactId>commons-digester</artifactId>
      <version>1.7</version>
    </dependency>
    <dependency><!-- is this Java 1.4 compatible? -->
      <groupId>javax.mail</groupId>
      <artifactId>mail</artifactId>
      <version>1.4</version>
    </dependency>
    <dependency>
      <groupId>javax.activation</groupId>
      <artifactId>activation</artifactId>
      <version>1.1</version>
    </dependency>
    <dependency>
      <groupId>dom4j</groupId>
      <artifactId>dom4j</artifactId>
      <version>1.6.1</version>
    </dependency>
274 275 276 277 278
    <dependency>
      <groupId>jaxen</groupId>
      <artifactId>jaxen</artifactId>
      <version>1.1-beta-11</version>
    </dependency>
K
kohsuke 已提交
279 280 281 282 283 284 285 286 287 288 289 290 291
    <dependency>
      <groupId>commons-jelly</groupId>
      <artifactId>commons-jelly-tags-fmt</artifactId>
      <version>1.0</version>
    </dependency>
    <dependency>
      <groupId>commons-jelly</groupId>
      <artifactId>commons-jelly-tags-xml</artifactId>
      <version>1.1</version>
    </dependency>
    <dependency>
      <groupId>commons-jelly</groupId>
      <artifactId>commons-jelly-tags-define</artifactId>
K
kohsuke 已提交
292
      <version>1.0.1-hudson-20061106</version>
K
kohsuke 已提交
293 294 295 296
    </dependency>
    <dependency>
      <groupId>commons-jexl</groupId>
      <artifactId>commons-jexl</artifactId>
K
kohsuke 已提交
297 298 299 300 301 302
      <version>1.1-hudson-20061106</version>
    </dependency>
    <dependency>
      <groupId>commons-jelly</groupId>
      <artifactId>commons-jelly</artifactId>
      <version>1.1-hudson-20061106</version>
K
kohsuke 已提交
303 304 305
    </dependency>
    <dependency>
      <groupId>groovy</groupId>
K
kohsuke 已提交
306
      <artifactId>groovy-all-1.0-jsr</artifactId>
K
kohsuke 已提交
307 308 309 310 311 312 313 314 315 316 317 318
      <version>06</version>
    </dependency>
    <dependency>
      <groupId>xpp3</groupId>
      <artifactId>xpp3</artifactId>
      <version>1.1.3.3</version>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8</version>
    </dependency>
K
kohsuke 已提交
319 320 321 322 323
    <dependency><!-- needed by Jelly -->
      <groupId>jstl</groupId>
      <artifactId>jstl</artifactId>
      <version>1.1.0</version>
    </dependency>
K
kohsuke 已提交
324 325
  </dependencies>
</project>