You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "ddd (JIRA)" <ji...@codehaus.org> on 2007/12/30 16:24:57 UTC

[jira] Commented: (MPECLIPSE-70) Make it possible to add linked resources

    [ http://jira.codehaus.org/browse/MPECLIPSE-70?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_118204 ] 

ddd commented on MPECLIPSE-70:
------------------------------

Felipe that is exactly my case. I have multiple projects in workspace that should be built into single war and target directory should be same for all projects so I can point tomcat to it. Currently I do that manualy by adding following in .project file:

<linkedResources>
		<link>
			<name>TARGET_DIR</name>
			<type>2</type>
			<locationURI>TARGET_DIR</locationURI>
		</link>
		<link>
			<name>TARGET_DIR_TEST</name>
			<type>2</type>
			<locationURI>TARGET_DIR_TEST</locationURI>
		</link>
	</linkedResources>

> Make it possible to add linked resources
> ----------------------------------------
>
>                 Key: MPECLIPSE-70
>                 URL: http://jira.codehaus.org/browse/MPECLIPSE-70
>             Project: Maven 1.x Eclipse Plugin
>          Issue Type: Improvement
>    Affects Versions: 1.9
>            Reporter: Felipe Leme
>            Priority: Minor
>   Original Estimate: 1 hour
>  Remaining Estimate: 1 hour
>
> I have some projects that share some common Java files (in a ../common directory) and I need to access that directory as a source tree (I know that having multiple source directory is not the maven way of doing things, but sometimes that's a need).
> So, one way to do this is creating a folder on the project as a link to an existing one in the filesystem (or to an Eclipse variable). If I do so on Eclipse, it generates an entry like the following in .project:
> <linkedResources>
>   <link>
>     <name>folder_A</name>
>     <type>2</type>
>     <location>FOLDER_VARIABLE_NAME</location>
>   </link>
>   <link>
>     <name>file_B</name>
>     <type>1</type>
>     <location>/folder/location/on/filesystem</location>
>   </link>
> </linkedResources>
> So, I think it would be nice to have a property (similar to what we have on the natures element) to add such links. Something like this:
> maven.eclipse.links=folderA, fileB
> maven.eclipse.links.folderA.name=folder_A
> maven.eclipse.links.folderA.type=2
> maven.eclipse.links.folderA.location=FOLDER_VARIABLE_NAME
> maven.eclipse.links.fileB.name=file_B
> maven.eclipse.links.fileB.type=1
> maven.eclipse.links.fileB.location=/folder/location/on/filesystem
> Optional, we could eliminate the need for a type variable by using variable or path:
> maven.eclipse.links.folderA.name=folder_A
> maven.eclipse.links.folderA.variable=FOLDER_VARIABLE_NAME
> maven.eclipse.links.fileB.name=file_B
> maven.eclipse.links.fileB.path=/folder/location/on/filesystem
> <j:if test="${context.getVariable('maven.eclipse.links') != null}">
>   <linkedResources>
>     <util:tokenize var="links" delim=",">
>       ${maven.eclipse.links}
>     </util:tokenize>
>     <j:forEach var="link" items="${links}" trim="true">
>     <link>
>       <j:set var="name" value="maven.eclipse.links.${link}.name"/>
>       <j:set var="type" value="maven.eclipse.links.${link}.type"/>
>       <j:set var="location" value="maven.eclipse.links.${link}.location"/>
>       <name>${context.getVariable(name)}</name>
>       <type>${context.getVariable(link)}</type>
>       <location>${context.getVariable(location)}</location>
>     </link>
>   </linkedResources>
> </j:if>
> -- Felipe

-- 
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