maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dennis Lundberg (JIRA)" <j...@codehaus.org>
Subject [jira] Closed: (MEAR-136) <ejbSourceIncludes> does not honor directory navigation
Date Tue, 04 Jan 2011 19:13:57 GMT

     [ http://jira.codehaus.org/browse/MEAR-136?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Dennis Lundberg closed MEAR-136.
--------------------------------

    Resolution: Not A Bug

You can not use a relative path to shared resources between different Maven projects, even
if they inherit from one another. The correct way to do this is to bundle up the resources
into an artifact, a ZIP archive, that you install into the repository. Then you add a dependency
on that artifact in each of the projects that need that resource.

Brian blogged about it:
http://www.sonatype.com/people/2008/04/how-to-share-resources-across-projects-in-maven/

> <ejbSourceIncludes> does not honor directory navigation
> -------------------------------------------------------
>
>                 Key: MEAR-136
>                 URL: http://jira.codehaus.org/browse/MEAR-136
>             Project: Maven 2.x Ear Plugin
>          Issue Type: Bug
>    Affects Versions: 2.4.2
>         Environment: Linux
>            Reporter: Frank Griffin
>            Priority: Minor
>
> Background:
> {noformat}
> [ftg@ftgme2 application]$ pwd
> /home/ftg/PSS/PSSEJBEARProject/src/main/application
> [ftg@ftgme2 application]$ ls
> derby-ds.xml
> ...
> [ftg@ftgme2 application]$ pwd
> /home/ftg/dvd/dvd-ear/src/main/application
> [ftg@ftgme2 application]$ ls
> derby-ds.x
> {noformat}
> "dvd-ear" inherits from "PSSEJBEARProject".  PSSEJBEARProject contains:
> {code:xml}
>       <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-ear-plugin</artifactId>
>         <version>2.4.2</version>
>         <configuration>
>           <!--
>             Generate an application.xml file.
>           -->
>           <generateApplicationXml>true</generateApplicationXml>
>           <!--
>             JARs which should be included in this EAR.  Everyone
>             gets common-java, and ejb-ejb.
>           -->
>           <modules>
>             <jarModule>
>               <groupId>org.profsoftsvcs</groupId>
>               <artifactId>ejb-ejb</artifactId>
>               <includeInApplicationXml>false</includeInApplicationXml>
>             </jarModule>
>             <jarModule>
>               <groupId>org.profsoftsvcs</groupId>
>               <artifactId>common-java</artifactId>
>               <includeInApplicationXml>false</includeInApplicationXml>
>             </jarModule>
>           </modules>
>           <!--
>             We want to keep the JBoss DataSource descriptors in one
>             place, and include them here.  Since the paths below will
>             be interpreted relative to our child's basedir, we must
>             play games with parent directories.
>           -->
>           <earSourceIncludes>../../../../../PSS/PSSEJBEARProject/src/main/application/**,**</earSourceIncludes>
>           <!--
>             The JBoss-specific configuration.  Including this for
>             other application servers won't hurt.
>           -->
>           <jboss>
>             <version>5</version>
>             <!--
>               The DataSources that should be specific to this EAR.
>               These will not be visible to other applications in the
>               container, and prevent any dependency on our EAR's part
>               on global DataSources configured for the entire container.
>             -->
>             <data-sources>
>               <data-source>derby-ds.xml</data-source>
>             </data-sources>
>           </jboss>
>         </configuration>
>       </plugin>
> {code}
> dvd-ear contains:
> {code:xml}
>       <!--
>         Additions and overrides for the generation of the EAR file.
>       -->
>       <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-ear-plugin</artifactId>
>         <configuration>
>           <!--
>             Specify our EJB JARFile.
>           -->
>           <modules>
>             <ejbModule>
>               <groupId>org.profsoftsvcs</groupId>
>               <artifactId>dvd-ejb</artifactId>
>             </ejbModule>
>           </modules>
>         </configuration>
>       </plugin>
> {code}
> The problem is that in the resulting EAR file, the root contains derby-ds.x (from the
default ejbSourceDirectory - /home/ftg/dvd/dvd-ear/src/main/application) but not derby-ds.xml
from /home/ftg/PSS/PSSEJBEARProject/src/main/application.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message