pom.xml 11.9 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.90-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" />
57 58 59 60
                
                <!-- pick up the manfiest -->
                <unjar src="target/${artifactId}-${version}.jar" dest="target">
                  <patternset>
61
                    <include name="META-INF/MANIFEST.MF" />
62 63 64
                  </patternset>
                </unjar>
                
K
kohsuke 已提交
65
                <retrotranslator destdir="target/classes14"><!-- verify="true" detects false-positive errors against some references to remoting-->
66
                  <src path="target/classes" />
67
                </retrotranslator>
68
                <jar basedir="target/classes14" destfile="target/${artifactId}-${version}-jdk14.jar" manifest="target/META-INF/MANIFEST.MF" />
69 70 71 72 73 74
              </tasks>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
K
kohsuke 已提交
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
          <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>
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123
        </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>
124 125 126 127 128 129 130 131
      <!-- set main class -->
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifest>
              <mainClass>hudson.Main</mainClass>
              <addClasspath>true</addClasspath>
132
              <classpathPrefix />
133 134 135 136
            </manifest>
          </archive>
        </configuration>
      </plugin>
K
kohsuke 已提交
137 138
    </plugins>
  </build>
139 140 141 142 143 144 145

  <profiles>
    <profile>
      <id>debug</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
146 147 148 149 150 151 152
      <dependencies>
        <dependency>
          <groupId>org.jvnet.hudson.main</groupId>
          <artifactId>remoting</artifactId>
          <version>${version}</version>
        </dependency>
      </dependencies>
153 154 155
    </profile>
    <profile>
      <id>release</id>
156 157
      <build>
        <plugins>
158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184
          <!--
            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 -->
185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205
          <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>
206 207 208 209
      <properties>
        <!-- for releases, just use the POM version. See above ant-run plugin for how this gets used. -->
        <build.version>${version}</build.version>
      </properties>
210 211 212
    </profile>
  </profiles>

K
kohsuke 已提交
213
  <dependencies>
214 215 216 217 218
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-embedder</artifactId>
      <version>2.0.4</version>
    </dependency>
K
kohsuke 已提交
219 220 221 222 223
    <dependency>
      <groupId>com.svnkit</groupId>
      <artifactId>svnkit</artifactId>
      <version>1.1.0</version>
    </dependency>
224 225 226 227 228
    <dependency>
      <groupId>${groupId}</groupId>
      <artifactId>maven-agent</artifactId>
      <version>${version}</version>
    </dependency>
K
kohsuke 已提交
229 230 231 232 233
    <dependency>
      <groupId>net.sf.retrotranslator</groupId>
      <artifactId>retrotranslator-runtime</artifactId>
      <version>1.0.8</version>
    </dependency>
234 235 236 237 238 239 240 241 242 243
    <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 已提交
244 245 246
    <dependency>
      <groupId>org.kohsuke.stapler</groupId>
      <artifactId>stapler</artifactId>
K
kohsuke 已提交
247
      <version>1.23</version>
K
kohsuke 已提交
248
    </dependency>
249 250 251 252 253 254
    <dependency>
      <groupId>org.kohsuke</groupId>
      <artifactId>graph-layouter</artifactId>
      <classifier>jdk14</classifier>
      <version>1.0</version>
    </dependency>
K
kohsuke 已提交
255 256 257 258 259 260 261 262 263 264 265 266 267
    <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>
268
      <version>1.0.3</version>
K
kohsuke 已提交
269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315
    </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>
316 317 318 319 320
    <dependency>
      <groupId>jaxen</groupId>
      <artifactId>jaxen</artifactId>
      <version>1.1-beta-11</version>
    </dependency>
K
kohsuke 已提交
321 322 323 324 325 326 327 328 329 330 331 332 333
    <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 已提交
334
      <version>1.0.1-hudson-20061106</version>
K
kohsuke 已提交
335 336 337 338
    </dependency>
    <dependency>
      <groupId>commons-jexl</groupId>
      <artifactId>commons-jexl</artifactId>
K
kohsuke 已提交
339 340 341 342 343 344
      <version>1.1-hudson-20061106</version>
    </dependency>
    <dependency>
      <groupId>commons-jelly</groupId>
      <artifactId>commons-jelly</artifactId>
      <version>1.1-hudson-20061106</version>
K
kohsuke 已提交
345 346 347
    </dependency>
    <dependency>
      <groupId>groovy</groupId>
K
kohsuke 已提交
348
      <artifactId>groovy-all-1.0-jsr</artifactId>
K
kohsuke 已提交
349 350 351 352 353 354 355 356 357 358 359 360
      <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 已提交
361 362 363 364 365
    <dependency><!-- needed by Jelly -->
      <groupId>jstl</groupId>
      <artifactId>jstl</artifactId>
      <version>1.1.0</version>
    </dependency>
K
kohsuke 已提交
366 367
  </dependencies>
</project>