mirror of
https://github.com/ethauvin/version-processor.git
synced 2025-04-24 23:47:11 -07:00
Change package name.
This commit is contained in:
parent
465d145f1d
commit
135bd465e1
6 changed files with 28 additions and 33 deletions
|
@ -1,29 +0,0 @@
|
|||
package com.beust.apt.example;
|
||||
|
||||
import com.beust.apt.processor.Version;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
@Version(fileName = "example/src/main/properties/version.properties", propertyName = "example.version")
|
||||
class Example {
|
||||
public Example() {
|
||||
System.out.println("Instantiating Example");
|
||||
}
|
||||
|
||||
public static void main(String[] argv) throws Exception {
|
||||
String root = "/Users/cbeust/java/java-apt-example/";
|
||||
String[] args = new String[] {
|
||||
"-classpath",
|
||||
root + "processor/kobaltBuild/libs/processor-0.1.jar",
|
||||
"-processor", "com.beust.apt.processor.VersionProcessor",
|
||||
root + "example/src/main/java/com/beust/apt/example/Example.java"
|
||||
};
|
||||
// Uncomment this line and launch this class to debug the annotation processor.
|
||||
// You need $JDK_HOME/lib/tools.jar for this
|
||||
// com.sun.tools.javac.Main.main(args);
|
||||
|
||||
File file = new File(".");
|
||||
System.out.println("Version generated: " + GeneratedVersion.VERSION);
|
||||
// new Example();
|
||||
}
|
||||
}
|
24
example/src/main/java/com/beust/version/example/Example.java
Normal file
24
example/src/main/java/com/beust/version/example/Example.java
Normal file
|
@ -0,0 +1,24 @@
|
|||
package com.beust.version.example;
|
||||
|
||||
import com.beust.version.Version;
|
||||
|
||||
@Version(fileName = "example/src/main/properties/version.properties", propertyName = "example.version")
|
||||
class Example {
|
||||
public static void main(String[] argv) throws Exception {
|
||||
// Set this to true and launch this class if you want to debug the annotation processor.
|
||||
boolean debug = false;
|
||||
if (debug) {
|
||||
String root = "/Users/cbeust/java/java-apt-example/";
|
||||
String[] args = new String[]{
|
||||
"-classpath",
|
||||
root + "processor/kobaltBuild/libs/processor-0.1.jar",
|
||||
"-processor", "com.beust.version.VersionProcessor",
|
||||
root + "example/src/main/java/com/beust/apt/example/Example.java"
|
||||
};
|
||||
// You need $JDK_HOME/lib/tools.jar for this
|
||||
// com.sun.tools.javac.Main.main(args);
|
||||
}
|
||||
|
||||
System.out.println("Version generated: " + GeneratedVersion.VERSION);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue