Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: bb4d3acdffd3f674e73ecbea63628fdf7c877d8d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<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">
  <parent>
      <groupId>org.eclipse.jetty.toolchain.setuid</groupId>
    <artifactId>jetty-setuid-parent</artifactId>
    <version>1.0.2-SNAPSHOT</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>libsetuid-osx</artifactId>
  <name>Jetty :: SetUID OSX Native</name>
  <packaging>so</packaging>
  <properties>
    <native-source-dir>target/generated</native-source-dir>
    <jetty-setuid-linkerStartOption>-lc -ldl -dynamiclib -undefined
      dynamic_lookup -single_module</jetty-setuid-linkerStartOption>
    <jetty-setuid-linkerEndOption>target/libsetuid-osx.so</jetty-setuid-linkerEndOption>
  </properties>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>unpack</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>unpack</goal>
            </goals>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>org.eclipse.jetty.toolchain.setuid</groupId>
                  <artifactId>jetty-setuid-native</artifactId>
                  <version>${project.version}</version>
                  <overWrite>true</overWrite>
                  <outputDirectory>${native-source-dir}/</outputDirectory>
                </artifactItem>
              </artifactItems>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>native-maven-plugin</artifactId>
        <extensions>true</extensions>
        <configuration>
          <javahOS>mac</javahOS>
          <jdkIncludePath>/System/Library/Frameworks/JavaVM.framework/Headers</jdkIncludePath>
          <compilerStartOptions>
            <compilerStartOption>-fPIC -O</compilerStartOption>
          </compilerStartOptions>
          <sources>
            <source>
              <directory>target/generated</directory>
              <fileNames>
                <fileName>org_eclipse_jetty_setuid_SetUID.c</fileName>
              </fileNames>
            </source>
          </sources>
          <linkerStartOptions>
            <linkerStartOption>${jetty-setuid-linkerStartOption}</linkerStartOption>
          </linkerStartOptions>
          <linkerEndOptions>
            <linkerEndOptions>-o
              ${project.build.directory}/libsetuid-osx.so</linkerEndOptions>
          </linkerEndOptions>
        </configuration>
        <executions>
          <execution>
            <id>javah</id>
            <phase>generate-sources</phase>
            <configuration>
              <classNames>
                <className>org.eclipse.jetty.setuid.SetUID</className>
              </classNames>
              <outputDirectory>target/generated</outputDirectory>
            </configuration>
            <goals>
              <goal>javah</goal>
            </goals>
          </execution>
          <execution>
            <id>compile</id>
            <phase>compile</phase>
            <goals>
              <goal>compile</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <dependencies>
    <dependency>
      <groupId>org.eclipse.jetty.toolchain</groupId>
      <artifactId>jetty-test-helper</artifactId>
      <version>${jetty-test-helper-version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty.toolchain.setuid</groupId>
      <artifactId>jetty-setuid-java</artifactId>
      <version>${project.version}</version>
    </dependency>  
    <dependency>
      <groupId>org.eclipse.jetty.toolchain.setuid</groupId>
      <artifactId>jetty-setuid-native</artifactId>
      <version>${project.version}</version>
    </dependency>
  </dependencies>

</project>

Back to the top