File tree Expand file tree Collapse file tree
src/main/kotlin/dev/elide/maven/compiler Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Elide Maven Plugin
2+
3+ This plugin can be consumed in a Maven project to use [ Elide] ( https://elide.dev ) .
4+
5+ > [ !WARNING]
6+ > This plugin is currently under development.
7+
8+ ## Features
9+
10+ - [x] Swap out ` javac ... ` for ` elide javac -- ... `
11+ - [x] Supports explicit path to ` elide `
12+ - [ ] Resolve ` elide ` via the ` PATH `
13+ - [ ] Swap out ` kotlinc ... ` for ` elide kotlinc -- ... `
14+ - [ ] Usability of Elide as a Maven toolchain
15+
16+ ## Usage
17+
18+ Configuring Elide as your ` javac ` compiler:
19+
20+ ** ` pom.xml ` **
21+ ``` xml
22+ <build >
23+ <plugins >
24+ <plugin >
25+ <artifactId >maven-compiler-plugin</artifactId >
26+ <version >3.13.0</version >
27+ <dependencies >
28+ <dependency >
29+ <groupId >dev.elide</groupId >
30+ <artifactId >elide-plexus-compilers</artifactId >
31+ <version >1.0.0-SNAPSHOT</version >
32+ </dependency >
33+ </dependencies >
34+ <configuration >
35+ <compilerId >elide</compilerId >
36+ </configuration >
37+ </plugin >
38+ </plugins >
39+ </build >
40+ ```
41+
42+ Properties needed:
43+ ``` xml
44+ <properties >
45+ <maven .compiler.executable>/path/to/elide</maven .compiler.executable>
46+ <maven .compiler.source>24</maven .compiler.source>
47+ <maven .compiler.target>24</maven .compiler.target>
48+ <project .build.sourceEncoding>UTF-8</project .build.sourceEncoding>
49+ </properties >
50+ ```
51+
52+ > [ !TIP]
53+ > See the [ sample project] ( ./sample ) for a usage example. Elide also provides a [ Gradle plugin] ( https://github.com/elide-dev/gradle ) .
Original file line number Diff line number Diff line change @@ -7,10 +7,11 @@ plugins {
77}
88
99group = " dev.elide"
10- version = " 1.0-SNAPSHOT"
10+ version = " 1.0.0 -SNAPSHOT"
1111
1212repositories {
1313 mavenCentral()
14+ mavenLocal()
1415}
1516
1617java {
Original file line number Diff line number Diff line change 1+ target /
Original file line number Diff line number Diff line change 1+ # Licensed to the Apache Software Foundation (ASF) under one
2+ # or more contributor license agreements. See the NOTICE file
3+ # distributed with this work for additional information
4+ # regarding copyright ownership. The ASF licenses this file
5+ # to you under the Apache License, Version 2.0 (the
6+ # "License"); you may not use this file except in compliance
7+ # with the License. You may obtain a copy of the License at
8+ #
9+ # http://www.apache.org/licenses/LICENSE-2.0
10+ #
11+ # Unless required by applicable law or agreed to in writing,
12+ # software distributed under the License is distributed on an
13+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+ # KIND, either express or implied. See the License for the
15+ # specific language governing permissions and limitations
16+ # under the License.
17+ wrapperVersion =3.3.2
18+ distributionType =only-script
19+ distributionUrl =https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip
Original file line number Diff line number Diff line change 1+ ## Elide Maven Plugin: Sample Project
2+
3+ This project demonstrates use of Elide as a replacement for ` javac ` within a Maven project. There is some Java source
4+ code to build, and the ` pom.xml ` is configured to use Elide.
5+
6+ ** ` pom.xml ` **
7+ ``` xml
8+ <build >
9+ <plugins >
10+ <plugin >
11+ <artifactId >maven-compiler-plugin</artifactId >
12+ <version >3.13.0</version >
13+ <dependencies >
14+ <dependency >
15+ <groupId >dev.elide</groupId >
16+ <artifactId >elide-plexus-compilers</artifactId >
17+ <version >1.0.0-SNAPSHOT</version >
18+ </dependency >
19+ </dependencies >
20+ <configuration >
21+ <compilerId >elide</compilerId >
22+ </configuration >
23+ </plugin >
24+ </plugins >
25+ </build >
26+ ```
27+
28+ Properties needed:
29+ ``` xml
30+ <properties >
31+ <maven .compiler.executable>/path/to/elide</maven .compiler.executable>
32+ <maven .compiler.source>24</maven .compiler.source>
33+ <maven .compiler.target>24</maven .compiler.target>
34+ <project .build.sourceEncoding>UTF-8</project .build.sourceEncoding>
35+ </properties >
36+ ```
You can’t perform that action at this time.
0 commit comments