-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Some (but not all) code had DOS-encoded line endings (CR+LF). Run the following command: dos2unix $(find src -type f)
- Loading branch information
1 parent
0285d58
commit 7502a6a
Showing
37 changed files
with
1,623 additions
and
1,623 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
def buildLog = new File(basedir, 'build.log') | ||
assert buildLog.exists() | ||
assert buildLog.text.contains("BUILD SUCCESS") | ||
|
||
assert new File(basedir, 'target').exists() | ||
assert new File(basedir, 'target/generated-sources/java-templates/org/codehaus/mojo/templating/it/Colors.java').exists() | ||
|
||
def javaClass = new File(basedir, 'target/generated-sources/java-templates/org/codehaus/mojo/templating/it/Colors.java') | ||
|
||
assert javaClass.text.contains('public static final String FIRST_COLOR = "red"') | ||
assert javaClass.text.contains('public static final String SECOND_COLOR = "green"') | ||
assert javaClass.text.contains('public static final String THIRD_COLOR = "blue"') | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
def buildLog = new File(basedir, 'build.log') | ||
assert buildLog.exists() | ||
assert buildLog.text.contains("BUILD SUCCESS") | ||
|
||
assert new File(basedir, 'target').exists() | ||
assert new File(basedir, 'target/generated-sources/java-templates/org/codehaus/mojo/templating/it/Colors.java').exists() | ||
|
||
def javaClass = new File(basedir, 'target/generated-sources/java-templates/org/codehaus/mojo/templating/it/Colors.java') | ||
|
||
assert javaClass.text.contains('public static final String FIRST_COLOR = "red"') | ||
assert javaClass.text.contains('public static final String SECOND_COLOR = "green"') | ||
assert javaClass.text.contains('public static final String THIRD_COLOR = "blue"') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
# | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
# | ||
|
||
invoker.goals=clean test | ||
invoker.buildResult = success | ||
# | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
# | ||
|
||
invoker.goals=clean test | ||
invoker.buildResult = success |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,43 @@ | ||
<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"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>org.codehaus.mojo.templating.it</groupId> | ||
<artifactId>simple</artifactId> | ||
<version>1.0-specialversion</version> | ||
|
||
<properties> | ||
<someprop>coquinou</someprop> | ||
</properties> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>3.11.0</version> | ||
<configuration> | ||
<source>8</source> | ||
<target>8</target> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>templating-maven-plugin</artifactId> | ||
<version>@project.version@</version> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>filter-sources</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
<dependencies> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>4.13.2</version> | ||
</dependency> | ||
</dependencies> | ||
</project> | ||
<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"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>org.codehaus.mojo.templating.it</groupId> | ||
<artifactId>simple</artifactId> | ||
<version>1.0-specialversion</version> | ||
|
||
<properties> | ||
<someprop>coquinou</someprop> | ||
</properties> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>3.11.0</version> | ||
<configuration> | ||
<source>8</source> | ||
<target>8</target> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>templating-maven-plugin</artifactId> | ||
<version>@project.version@</version> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>filter-sources</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
<dependencies> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>4.13.2</version> | ||
</dependency> | ||
</dependencies> | ||
</project> |
14 changes: 7 additions & 7 deletions
14
src/it/filter-main-annotation/src/main/java-templates/pkg/A.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
package pkg; | ||
import org.junit.Ignore; | ||
|
||
@Ignore("${someprop}") | ||
public class A { | ||
public static final String FILTER_A="${someprop}"; | ||
public static final String FILTER_B="@someprop@"; | ||
package pkg; | ||
import org.junit.Ignore; | ||
|
||
@Ignore("${someprop}") | ||
public class A { | ||
public static final String FILTER_A="${someprop}"; | ||
public static final String FILTER_B="@someprop@"; | ||
} |
16 changes: 8 additions & 8 deletions
16
src/it/filter-main-annotation/src/main/java-templates/pkg/B.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
package pkg; | ||
import org.junit.Ignore; | ||
|
||
@Ignore( "@someprop@") | ||
public class B { | ||
public static final String FILTER_A="${someprop}"; | ||
public static final String FILTER_B="@someprop@"; | ||
} | ||
package pkg; | ||
import org.junit.Ignore; | ||
|
||
@Ignore( "@someprop@") | ||
public class B { | ||
public static final String FILTER_A="${someprop}"; | ||
public static final String FILTER_B="@someprop@"; | ||
} |
20 changes: 10 additions & 10 deletions
20
src/it/filter-main-annotation/src/main/java-templates/pkg/C.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
package pkg; | ||
import org.junit.Ignore; | ||
|
||
@Ignore( | ||
"${someprop}" + | ||
"@someprop@" + | ||
"${someprop}@someprop@ @someprop@${someprop}" | ||
) | ||
|
||
public class C { | ||
package pkg; | ||
import org.junit.Ignore; | ||
|
||
@Ignore( | ||
"${someprop}" + | ||
"@someprop@" + | ||
"${someprop}@someprop@ @someprop@${someprop}" | ||
) | ||
|
||
public class C { | ||
} |
28 changes: 14 additions & 14 deletions
28
src/it/filter-main-annotation/src/main/java-templates/pkg/SomeClass.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
package pkg; | ||
import org.junit.Ignore; | ||
|
||
/* some stupid doc | ||
* basedir=${basedir} | ||
* | ||
* some new code | ||
* et bim | ||
*/ | ||
@Ignore("${someprop}") | ||
public class SomeClass | ||
{ | ||
public static final String VERSION = "<${project.version}>"; | ||
} | ||
package pkg; | ||
import org.junit.Ignore; | ||
|
||
/* some stupid doc | ||
* basedir=${basedir} | ||
* | ||
* some new code | ||
* et bim | ||
*/ | ||
@Ignore("${someprop}") | ||
public class SomeClass | ||
{ | ||
public static final String VERSION = "<${project.version}>"; | ||
} |
10 changes: 5 additions & 5 deletions
10
src/it/filter-main-annotation/src/main/java-templates/pkg/some/SomeOtherClass.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
package pkg.some; | ||
|
||
public class SomeOtherClass | ||
{ | ||
public static final String POUET="${project.build.sourceEncoding}"; | ||
package pkg.some; | ||
|
||
public class SomeOtherClass | ||
{ | ||
public static final String POUET="${project.build.sourceEncoding}"; | ||
} |
32 changes: 16 additions & 16 deletions
32
src/it/filter-main-annotation/src/main/java/net/batmat/maven/App.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
package net.batmat.maven; | ||
|
||
import pkg.some.SomeOtherClass; | ||
|
||
// That one is impossible to do using a .properties file | ||
// which you load for example in a static code block. | ||
// So this is the kind of use where it comes useful. | ||
@SuppressWarnings("for some "+pkg.SomeClass.VERSION) | ||
public class App | ||
{ | ||
public static void main(String[] args ) | ||
{ | ||
System.out.println("Hello World!" + pkg.some.SomeOtherClass.POUET); | ||
System.out.println("Version:" + pkg.SomeClass.VERSION); | ||
} | ||
} | ||
package net.batmat.maven; | ||
|
||
import pkg.some.SomeOtherClass; | ||
|
||
// That one is impossible to do using a .properties file | ||
// which you load for example in a static code block. | ||
// So this is the kind of use where it comes useful. | ||
@SuppressWarnings("for some "+pkg.SomeClass.VERSION) | ||
public class App | ||
{ | ||
public static void main(String[] args ) | ||
{ | ||
System.out.println("Hello World!" + pkg.some.SomeOtherClass.POUET); | ||
System.out.println("Version:" + pkg.SomeClass.VERSION); | ||
} | ||
} |
Oops, something went wrong.