Skip to content

Commit

Permalink
Issue #273: enabled fileExtension option for template generation (#274)
Browse files Browse the repository at this point in the history
* Issue #273: added more complex template generation test

* Issue #273: honored file extension when processing templates

* Issue #273: removed additional Maven step
  • Loading branch information
raner authored Jan 22, 2024
1 parent bfd45a4 commit 20a14df
Show file tree
Hide file tree
Showing 27 changed files with 626 additions and 21 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- -->
<!-- Copyright 2016 - 2023 Mirko Raner -->
<!-- Copyright 2016 - 2024 Mirko Raner -->
<!-- -->
<!-- Licensed under the Apache License, Version 2.0 (the "License"); -->
<!-- you may not use this file except in compliance with the License. -->
Expand All @@ -22,7 +22,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>pro.projo</groupId>
<artifactId>projo-parent</artifactId>
<version>1.5.3</version>
<version>1.5.4-SNAPSHOT</version>
<name>Projo Parent POM</name>
<url>https://github.com/raner/projo</url>
<packaging>pom</packaging>
Expand Down
4 changes: 2 additions & 2 deletions projo-jackson/pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- -->
<!-- Copyright 2019 - 2023 Mirko Raner -->
<!-- Copyright 2019 - 2024 Mirko Raner -->
<!-- -->
<!-- Licensed under the Apache License, Version 2.0 (the "License"); -->
<!-- you may not use this file except in compliance with the License. -->
Expand All @@ -24,7 +24,7 @@
<parent>
<groupId>pro.projo</groupId>
<artifactId>projo-parent</artifactId>
<version>1.5.3</version>
<version>1.5.4-SNAPSHOT</version>
</parent>

<artifactId>projo-jackson</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions projo-jax-rs/pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- -->
<!-- Copyright 2016 - 2023 Mirko Raner -->
<!-- Copyright 2016 - 2024 Mirko Raner -->
<!-- -->
<!-- Licensed under the Apache License, Version 2.0 (the "License"); -->
<!-- you may not use this file except in compliance with the License. -->
Expand All @@ -23,7 +23,7 @@
<parent>
<groupId>pro.projo</groupId>
<artifactId>projo-parent</artifactId>
<version>1.5.3</version>
<version>1.5.4-SNAPSHOT</version>
</parent>
<name>Projo JAX-RS Integration for Jersey</name>
<artifactId>projo-jax-rs</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions projo-runtime-code-generation/pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- -->
<!-- Copyright 2017 - 2023 Mirko Raner -->
<!-- Copyright 2017 - 2024 Mirko Raner -->
<!-- -->
<!-- Licensed under the Apache License, Version 2.0 (the "License"); -->
<!-- you may not use this file except in compliance with the License. -->
Expand All @@ -26,7 +26,7 @@
<parent>
<groupId>pro.projo</groupId>
<artifactId>projo-parent</artifactId>
<version>1.5.3</version>
<version>1.5.4-SNAPSHOT</version>
</parent>

<dependencies>
Expand Down
4 changes: 2 additions & 2 deletions projo-template-annotation/pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- -->
<!-- Copyright 2016 - 2023 Mirko Raner -->
<!-- Copyright 2016 - 2024 Mirko Raner -->
<!-- -->
<!-- Licensed under the Apache License, Version 2.0 (the "License"); -->
<!-- you may not use this file except in compliance with the License. -->
Expand All @@ -25,7 +25,7 @@
<parent>
<groupId>pro.projo</groupId>
<artifactId>projo-parent</artifactId>
<version>1.5.3</version>
<version>1.5.4-SNAPSHOT</version>
</parent>

</project>
4 changes: 2 additions & 2 deletions projo-template-configuration/pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- -->
<!-- Copyright 2016 - 2023 Mirko Raner -->
<!-- Copyright 2016 - 2024 Mirko Raner -->
<!-- -->
<!-- Licensed under the Apache License, Version 2.0 (the "License"); -->
<!-- you may not use this file except in compliance with the License. -->
Expand All @@ -25,7 +25,7 @@
<parent>
<groupId>pro.projo</groupId>
<artifactId>projo-parent</artifactId>
<version>1.5.3</version>
<version>1.5.4-SNAPSHOT</version>
</parent>

<dependencies>
Expand Down
4 changes: 2 additions & 2 deletions projo-template-generation-test/pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- -->
<!-- Copyright 2018 - 2023 Mirko Raner -->
<!-- Copyright 2018 - 2024 Mirko Raner -->
<!-- -->
<!-- Licensed under the Apache License, Version 2.0 (the "License"); -->
<!-- you may not use this file except in compliance with the License. -->
Expand All @@ -24,7 +24,7 @@
<parent>
<groupId>pro.projo</groupId>
<artifactId>projo-parent</artifactId>
<version>1.5.3</version>
<version>1.5.4-SNAPSHOT</version>
</parent>
<artifactId>projo-template-generation-test</artifactId>
<name>Projo Template Generation Tests</name>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
// //
// Copyright 2024 Mirko Raner //
// //
// Licensed 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. //
// //
package pro.projo.generation.template.$test;

/* *#* The following imports will only appear in generated files: *#/
import pro.projo.generation.template.exponents.Exponent;
import pro.projo.generation.template.exponents.Minus4;
import pro.projo.generation.template.exponents.Minus3;
import pro.projo.generation.template.exponents.Minus2;
import pro.projo.generation.template.exponents.Minus1;
import pro.projo.generation.template.exponents.Zero;
import pro.projo.generation.template.exponents.Plus1;
import pro.projo.generation.template.exponents.Plus2;
import pro.projo.generation.template.exponents.Plus3;
import pro.projo.generation.template.exponents.Plus4;
/* */
/*#*/ // The following imports are only part of the template file:
import pro.projo.template.annotation.Template;
import pro.projo.test.TestDimensionTemplateConfiguration;
/*#*/
/**
*#*
* The {@link Dimension$Dimension} interface is a test type.
*#
* This interface defines a Dimension type.
*
* THIS IS A GENERATED INTERFACE.
*
* @author Mirko Raner
**/
/*#*/@Template(input=TestDimensionTemplateConfiguration.class)/*#*/
public interface Dimension$Dimension
{
/* *#**#/
#foreach ($method in $methods)
$method
#end
/* */
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// //
// Copyright 2024 Mirko Raner //
// //
// Licensed 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. //
// //
package pro.projo.generation.template.exponents;

public interface Exponent {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// //
// Copyright 2024 Mirko Raner //
// //
// Licensed 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. //
// //
package pro.projo.generation.template.exponents;

public interface Minus1 extends Exponent {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// //
// Copyright 2024 Mirko Raner //
// //
// Licensed 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. //
// //
package pro.projo.generation.template.exponents;

public interface Minus2 extends Exponent {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// //
// Copyright 2024 Mirko Raner //
// //
// Licensed 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. //
// //
package pro.projo.generation.template.exponents;

public interface Minus3 extends Exponent {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// //
// Copyright 2024 Mirko Raner //
// //
// Licensed 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. //
// //
package pro.projo.generation.template.exponents;

public interface Minus4 extends Exponent {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// //
// Copyright 2024 Mirko Raner //
// //
// Licensed 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. //
// //
package pro.projo.generation.template.exponents;

public interface Plus1 extends Exponent {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// //
// Copyright 2024 Mirko Raner //
// //
// Licensed 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. //
// //
package pro.projo.generation.template.exponents;

public interface Plus2 extends Exponent {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// //
// Copyright 2024 Mirko Raner //
// //
// Licensed 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. //
// //
package pro.projo.generation.template.exponents;

public interface Plus3 extends Exponent {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// //
// Copyright 2024 Mirko Raner //
// //
// Licensed 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. //
// //
package pro.projo.generation.template.exponents;

public interface Plus4 extends Exponent {}
Loading

0 comments on commit 20a14df

Please sign in to comment.