I just created a sample Java program.
My source tree looks like below
[sathish@oc3855733574 java_tools]$ tree
.
├── pom.xml
├── src1
│ └── FirstProg.java
I have created a simple pom.xml file as shown below
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>src1</groupId>
<artifactId>first-prog</artifactId>
<version>1.0</version>
<packaging>jar</packaging>
<build>
<resources>
<resource>
<directory>src1</directory>
</resource>
</resources>
</build>
</project>
When I try to do mvn package
, maven throws the error message as follows.
I understand it looks out for src/main/resources
but can't I compile using 'my own' directory structure?
INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ first-prog ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ first-prog ---
[INFO] No sources to compile