Thank you for that interesting reply. I did nearly what you said for our module, especially adding a dependency to our module on the root pom.xml !
I'm waiting for that famous cookbook anyway ;-)
   Anthony

Philipp Bracher a écrit :
Actually, I don't really understand the <version/> stuff ...


why for example, the maven-bundle-plugin/pom.xml still includes a ref to magnolia-core v 3.0-rc4 ?

The plugin is independent of magnolia in its life-cycle. To make this more obvious I moved the plugins to svn/maven-plugins/..

The bundle plugin has a dependency to magnolia core since this plugin starts the bootstrapping and manipulates the data bootstrapped (setting activation flag for example).

The dependency is marked as provided and the replacing of the class loader garantees that the core jar in the project is used. This means that the version noted in the plugins pom is irrelevant as long the core API is still the same.

Future solution: we plan to make a pure API module (no implementation) which the modules, plugins can relay on instead of the implementing core jar.

Or the editors pom.xml refs to version 3.0-rc5-SNAPSHOT ... (after the revision 7006)

Each submodule (gui, editors, ...) needs to note a version by itself (remove it and maven complains). I thought that we can put this into the dependencyManagement of the parent pom but this came out to be a not supported solution.

I just wanted an explanation because I'm writing a module, so I must integrate it to magnolia pom.xml each time ... is there a better way to do that ?

Yes and no. But not changing the magnolia project would be better in this case. I will write a cookbook about module and project developing based on magnolia using maven. In short:
- make your own webapp project (maven pom, packaging war)
- add a dependency to the magnolia war (you need to add dependency to the magnolia pom too since the war dependency is not properly used to resolve the dependencies) - add your module as a submodule to this pom (for easy reactor building) or just refer to it as a normal dependency

Now you can use the jetty plugin or the eclipse plugin to make a full project setup. If you use myeclipse you can call mvn war:inplace to overlay your war project with the content of the magnolia war artifact. You may like to check into svn first before overlaying.

An extract of our enterprise webapp pom:

<project xmlns="http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd ">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <artifactId>magnolia-enterprise</artifactId>
    <groupId>info.magnolia</groupId>
    <version>3.0</version>
    <relativePath>../pom.xml</relativePath>
  </parent>

  <artifactId>magnolia-enterprise-webapp</artifactId>
  <version>3.0.1-SNAPSHOT</version>
  <packaging>war</packaging>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-war-plugin</artifactId>
        <configuration>
          <dependentWarExcludes>WEB-INF/lib/*.jar</dependentWarExcludes>
        </configuration>
       </plugin>
    </plugins>
  </build>

  <dependencies>
    <dependency>
      <groupId>info.magnolia</groupId>
      <artifactId>magnolia</artifactId>
      <type>war</type>
      <scope>runtime</scope>
    </dependency>

    <!-- used to resolve dependencies -->
    <dependency>
      <groupId>info.magnolia</groupId>
      <artifactId>magnolia</artifactId>
      <type>pom</type>
      <exclusions>
        <!-- exclude community samples -->
        <exclusion>
          <groupId>info.magnolia</groupId>
          <artifactId>magnolia-module-samples</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <dependency>
      <groupId>info.magnolia</groupId>
      <artifactId>magnolia-module-enterprise</artifactId>
      <version>3.0</version>
    </dependency>

    <dependency>
      <groupId>info.magnolia</groupId>
      <artifactId>magnolia-module-enterprise-samples</artifactId>
      <version>3.0</version>
    </dependency>

    <!-- redefine scope, exclution was not helping -->
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>servlet-api</artifactId>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>jsp-api</artifactId>
      <scope>provided</scope>
    </dependency>

  </dependencies>
</project>



Thanks,
   Anthony

Anthony Ogier a écrit :
Philipp Bracher a écrit :
On Oct 28, 2006, at 3:26 PM, Fabrizio Giustina wrote:
and there is a good reason to not to use
${version}, see http://jira.codehaus.org/browse/MNG-2486
OK, I will revert it.

The pom.xml of magnolia-editor-fckeditor and magnolia-editor-kupu have still the <version>3.0-rc5-SNAPSHOT</version> of commit 6960 ... shouldn't it be updated to <version>3.0-rc4</version> ?

Regards,
   Anthony

----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------


----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------


----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------


----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------

Reply via email to