SHAILJA schrieb:
 Hi,

Hi,

 I have  directory strucute like this
a/b
            a/c
            a/d.java
            a/e.java

Understood.

I have one pom.xml  under "a" directory .. Having code for compilation and
redirecting directories from there Like

m
4.0.0
a
1.0
pom     

b
c



${TOPDIR}/${JAVA_CLASSES_SRC}/${CUR_DIR} -- all properties are defined ${TOPDIR}/${JAVA_CLASSES_DEST}

${basedir}/test
${TOPDIR}/${JAVA_CLASSES_DEST}

------- code for compilation----->
maven-compiler-plugin ----------------


If this should somehow represent the contents of your a/pom.xml it's just plainly unreadable. The chances that someone on this list will help you are much higher if you post the pom in some more readable format, like just pasting the actual xml content.




What  happen when I do  mvn compile ,under "a " directory .. Directories b
and c get compiled  but not all .java files under a
  means a/d.java and a/e.java is not getting compild .  WHY ? Plz help me


As far as I can guess from the crippled pom information above, the root of your problem is that you want to compile code in the aggregation pom (which has its packaging element set to pom and a modules tag for your modules b and c). This will not work out of the box and (and in my opinion) is bad style.

Each packaging type has an associated build lifecycle [1]. The default lifecycle for pom packagings just doesn't compile any code or does any other useful stuff for projects containing java code. What you should do is move the java code contained directly under a/ to its own module and use the a/pom.xml just for aggregation of the submodules.

If that's not an option for you, you will have to configure each step of the build pocess by yourself (bind the compiler plugin to the compile phase, bind the jar plugin to the package phase, ...) To make this clear: I discourage you from doing this. I strongly recommed you reconsider your current project structure and move the top level java code to its own module. And while you're at it, it might be worth to also refactor the directory layout to the standard layout [2] proposed by maven.

-Tim

[1] http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html

[2] http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to