Skip to content
This repository has been archived by the owner on Apr 5, 2020. It is now read-only.

mxp: Paths configurable #3

Open
kiesel opened this issue Jan 6, 2012 · 5 comments
Open

mxp: Paths configurable #3

kiesel opened this issue Jan 6, 2012 · 5 comments
Assignees

Comments

@kiesel
Copy link
Member

kiesel commented Jan 6, 2012

The paths should be configureable in pom.xml. Currently, eg. the PHP source src/main/php is hardcoded. There should also be a document describing what can be configured.

@ghost ghost assigned mrosoiu Jan 6, 2012
@mrosoiu
Copy link
Member

mrosoiu commented Jan 9, 2012

src/main/php is the default value; it can be configured via phpSourceRoots @parameter as follow:

<project..>
...
<build>
  <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-xpframework-plugin</artifactId>
        <version>1.1</version>
        <extensions>true</extensions>
        <configuration>
          <phpSourceRoots>
            <phpSourceRoot>new/src/path</phpSourceRoot>
          </phpSourceRoots>
        </configuration>
      </plugin>
...
</project>

Same for testPhpSourceRoots.

There is one limitation though: testPhpSourceRoots must not be contained within testSourceRoots so it looks like we cannot compile legacy apps (main=/src, test=/src/com/company/unittest) with this plugin.

@kiesel
Copy link
Member Author

kiesel commented Jan 10, 2012

Hrm, so this would be a parameter to the build plugin? In Java projects, I would configure the the <sourceDirectory> or <testSourceDirectory> settings inside the <build> node - isn't it possible to reconfigure these settings through the plugin, if they haven't been deliberately changed by the pom's author?

@mrosoiu
Copy link
Member

mrosoiu commented Jan 10, 2012

<project/build/sourceDirectory> and <project/build/testSourceDirectory> can also be set, but this is where mxp will look for .xp sources to be sent to xcc

PHP "raw" .class.php files path can be defined only as shown above, and, if missing, will default to src/main/php and src/test/php

@mrosoiu
Copy link
Member

mrosoiu commented Jan 10, 2012

If you run mvn clean site (using Maven2 as I am unable to run it using Maven3), the documentation is generated in the target/site directory. This contains all goals and all configurable parameters that can be set either in pom.xml in the <configuration> section or via mvn -D...

@kiesel
Copy link
Member Author

kiesel commented Feb 1, 2012

That should be fine, then. What about this case: I'd like to manage an PHP-only XP project (no xcc) with mxp - I could configure <sourceDirectory> to point to src/main/php, so other maven plugins will be able to process sources in any way. Will the mxp still work then?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants