Is it possible to use annotation processor in the same project where it is defined?

Example:

* src/

	+ MyAnnotation.java
	+ path\_to\_MyAnnotationProcessor.MyAnnotationProcessor.java
	+ other classes
* resources
	+ META-INF/services/javax.annotation.processing.Processor
* pom

when I will run `mvn clean install`, I will expect that my processor will process classes annotated with MyAnnotation. 

I don`t want to import already compiled processor from another lib, I just want to use it once I defined it in my src.

For now, I get error:
`[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.1:compile (default-compile) on project my-project: Compilation failure
[ERROR] Annotation processor 'path_to_MyAnnotationProcessor' not found`

part of pom.xml, where I ref. to my processors:

```
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>${maven.plugin.compiler}</version>
            <configuration>
                <source>${version.java}</source>
                <target>${version.java}</target>
                    <annotationProcessors>
                       <proc>path_to_MyAnnotationProcessor.MyAnnotationProcessor</proc>
                    </annotationProcessors>
            </configuration>
        </plugin>

```

Thanks to everybody, especially to @Stefan Ferstl and @yegodm. The solution came from yegodm is:
"One way is two have two modules in the same project. One module would define annotations and processor. Another would have it as a dependency to establish build order."