mirror of https://github.com/apache/nifi.git
Addressing the issue of controlling the name of the top-level directory by allowing artifactId to be something like "nifi-XXX-bundle" and artifactBaseName to be "XXX". Also refactored the archetype to allow the package to be specified, which updates the appropriate files and directories.
This commit is contained in:
parent
db2072ed8a
commit
27f6918445
|
@ -22,5 +22,28 @@
|
||||||
<artifactId>nifi-maven-archetypes</artifactId>
|
<artifactId>nifi-maven-archetypes</artifactId>
|
||||||
<version>0.0.1-incubating-SNAPSHOT</version>
|
<version>0.0.1-incubating-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>nifi-processor-bundle-archetype</artifactId>
|
<artifactId>nifi-processor-bundle-archetype</artifactId>
|
||||||
|
<packaging>maven-archetype</packaging>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<extensions>
|
||||||
|
<extension>
|
||||||
|
<groupId>org.apache.maven.archetype</groupId>
|
||||||
|
<artifactId>archetype-packaging</artifactId>
|
||||||
|
<version>2.2</version>
|
||||||
|
</extension>
|
||||||
|
</extensions>
|
||||||
|
|
||||||
|
<pluginManagement>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-archetype-plugin</artifactId>
|
||||||
|
<version>2.2</version>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</pluginManagement>
|
||||||
|
</build>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -13,42 +13,28 @@
|
||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
<archetype-descriptor name="nifi-${artifactId}-bundle">
|
<archetype-descriptor name="${artifactId}">
|
||||||
<requiredProperties>
|
<requiredProperties>
|
||||||
|
<requiredProperty key="artifactBaseName" />
|
||||||
<requiredProperty key="nifiVersion" >
|
<requiredProperty key="nifiVersion" >
|
||||||
<defaultValue>0.0.1-incubating-SNAPSHOT</defaultValue>
|
<defaultValue>0.0.1-incubating-SNAPSHOT</defaultValue>
|
||||||
</requiredProperty>
|
</requiredProperty>
|
||||||
</requiredProperties>
|
</requiredProperties>
|
||||||
<modules>
|
|
||||||
<module id="nifi-${rootArtifactId}-processors" dir="nifi-__rootArtifactId__-processors" name="nifi-${rootArtifactId}-processors">
|
|
||||||
<fileSets>
|
<fileSets>
|
||||||
<fileSet filtered="true" packaged="false" encoding="UTF-8">
|
<fileSet filtered="true" packaged="false" encoding="UTF-8">
|
||||||
<directory>src/main/java</directory>
|
<directory>nifi-__artifactBaseName__-processors</directory>
|
||||||
<includes>
|
<excludes>
|
||||||
<include>**/*.java</include>
|
<exclude>**/*.java</exclude>
|
||||||
</includes>
|
</excludes>
|
||||||
</fileSet>
|
</fileSet>
|
||||||
<fileSet encoding="UTF-8">
|
<fileSet filtered="true" packaged="true" encoding="UTF-8">
|
||||||
<directory>src/main/resources</directory>
|
<directory>nifi-__artifactBaseName__-processors/src/main/java</directory>
|
||||||
<includes>
|
</fileSet>
|
||||||
<include>**/*.Processor</include>
|
<fileSet filtered="true" packaged="true" encoding="UTF-8">
|
||||||
<include>**/index.html</include>
|
<directory>nifi-__artifactBaseName__-processors/src/test/java</directory>
|
||||||
</includes>
|
|
||||||
</fileSet>
|
</fileSet>
|
||||||
<fileSet filtered="true" packaged="false" encoding="UTF-8">
|
<fileSet filtered="true" packaged="false" encoding="UTF-8">
|
||||||
<directory>src/test/java</directory>
|
<directory>nifi-__artifactBaseName__-nar</directory>
|
||||||
<includes>
|
|
||||||
<include>**/*.java</include>
|
|
||||||
</includes>
|
|
||||||
</fileSet>
|
</fileSet>
|
||||||
</fileSets>
|
</fileSets>
|
||||||
</module>
|
|
||||||
<module id="nifi-${rootArtifactId}-nar" dir="nifi-__rootArtifactId__-nar" name="nifi-${rootArtifactId}-nar">
|
|
||||||
<fileSets>
|
|
||||||
<fileSet encoding="UTF-8">
|
|
||||||
<directory></directory>
|
|
||||||
</fileSet>
|
|
||||||
</fileSets>
|
|
||||||
</module>
|
|
||||||
</modules>
|
|
||||||
</archetype-descriptor>
|
</archetype-descriptor>
|
|
@ -18,20 +18,20 @@
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>${groupId}</groupId>
|
<groupId>${groupId}</groupId>
|
||||||
<artifactId>nifi-${rootArtifactId}-bundle</artifactId>
|
<artifactId>${rootArtifactId}</artifactId>
|
||||||
<version>${version}</version>
|
<version>${version}</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>${artifactId}</artifactId>
|
<artifactId>nifi-${artifactBaseName}-nar</artifactId>
|
||||||
<version>${version}</version>
|
<version>${version}</version>
|
||||||
<packaging>nar</packaging>
|
<packaging>nar</packaging>
|
||||||
|
|
||||||
<name>${artifactId}</name>
|
<name>nifi-${artifactBaseName}-nar</name>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>${groupId}</groupId>
|
<groupId>${groupId}</groupId>
|
||||||
<artifactId>nifi-${rootArtifactId}-processors</artifactId>
|
<artifactId>nifi-${artifactBaseName}-processors</artifactId>
|
||||||
<version>${version}</version>
|
<version>${version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
|
@ -18,14 +18,14 @@
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>${groupId}</groupId>
|
<groupId>${groupId}</groupId>
|
||||||
<artifactId>nifi-${rootArtifactId}-bundle</artifactId>
|
<artifactId>${rootArtifactId}</artifactId>
|
||||||
<version>${version}</version>
|
<version>${version}</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>${artifactId}</artifactId>
|
<artifactId>nifi-${artifactBaseName}-processors</artifactId>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>${artifactId}</name>
|
<name>nifi-${artifactBaseName}-processors</name>
|
||||||
<url>http://maven.apache.org</url>
|
<url>http://maven.apache.org</url>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
|
@ -14,7 +14,7 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package org.apache.nifi.processors;
|
package ${package};
|
||||||
|
|
||||||
import org.apache.nifi.components.PropertyDescriptor;
|
import org.apache.nifi.components.PropertyDescriptor;
|
||||||
import org.apache.nifi.components.PropertyValue;
|
import org.apache.nifi.components.PropertyValue;
|
|
@ -12,4 +12,4 @@
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
org.apache.nifi.processors.MyProcessor
|
${package}.MyProcessor
|
|
@ -14,7 +14,7 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package org.apache.nifi.processors;
|
package ${package};
|
||||||
|
|
||||||
import org.apache.nifi.util.TestRunner;
|
import org.apache.nifi.util.TestRunner;
|
||||||
import org.apache.nifi.util.TestRunners;
|
import org.apache.nifi.util.TestRunners;
|
|
@ -23,11 +23,11 @@
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<groupId>${groupId}</groupId>
|
<groupId>${groupId}</groupId>
|
||||||
<artifactId>nifi-${artifactId}-bundle</artifactId>
|
<artifactId>${artifactId}</artifactId>
|
||||||
<version>${version}</version>
|
<version>${version}</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
<name>nifi-${artifactId}-bundle</name>
|
<name>${artifactId}</name>
|
||||||
<url>http://maven.apache.org</url>
|
<url>http://maven.apache.org</url>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
@ -35,8 +35,8 @@
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
<module>nifi-${rootArtifactId}-processors</module>
|
<module>nifi-${artifactBaseName}-processors</module>
|
||||||
<module>nifi-${rootArtifactId}-nar</module>
|
<module>nifi-${artifactBaseName}-nar</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
Loading…
Reference in New Issue