Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Buckminster » Getting other kind of files using maven, maven2 provider
Getting other kind of files using maven, maven2 provider [message #654254] Mon, 14 February 2011 18:58 Go to next message
Fabian Baboschi is currently offline Fabian BaboschiFriend
Messages: 41
Registered: December 2009
Member
Hello,

I'm trying to get a zip using the buckminster maven provider. My purpose is to unpack it in a folder inside the plugin. This way, the users get the thing into their workspace and the build creates a bundle during the build In the materialization phase, I see the pom file is brought to the
./buckminster/maven2/groupid/version/artifactid-version.pom
but the file ./buckminster/maven2/groupid/version/artifactid-version.zip is not.

Is there any way to specify that the file type should be zip instead of jar or is the file extension retrieval (the artifact type) hardcoded and I have to extend the buckminster maven plugin for that?

Note that If I have a jar everything works perfectly.

Thank you.
Re: Getting other kind of files using maven, maven2 provider [message #654273 is a reply to message #654254] Mon, 14 February 2011 20:45 Go to previous messageGo to next message
Thomas Hallgren is currently offline Thomas HallgrenFriend
Messages: 3240
Registered: July 2009
Senior Member
Hi Fabian,

Buckminster should be able to handle other extensions than .jar. If it
doesn't then that's a bug.

- thomas

On 2011-02-14 19:58, Fabian Baboschi wrote:
> Hello,
>
> I'm trying to get a zip using the buckminster maven provider. My purpose
> is to unpack it in a folder inside the plugin. This way, the users get
> the thing into their workspace and the build creates a bundle during the
> build In the materialization phase, I see the pom file is brought to the
> /buckminster/maven2/groupid/version/artifactid-version.pom
> but the file ./buckminster/maven2/groupid/version/artifactid-version.zip
> is not.
>
> Is there any way to specify that the file type should be zip instead of
> jar or is the file extension retrieval (the artifact type) hardcoded and
> I have to extend the buckminster maven plugin for that?
>
> Note that If I have a jar everything works perfectly.
>
> Thank you.
Re: Getting other kind of files using maven, maven2 provider [message #654329 is a reply to message #654254] Tue, 15 February 2011 08:52 Go to previous message
Fabian Baboschi is currently offline Fabian BaboschiFriend
Messages: 41
Registered: December 2009
Member
I read in the documentation that the maven and maven2 tasks are able to get jar files (it doesn't say anything about other types) so that's why I wondered if there is some support for other file extensions.

My question is actually: how do I specify that I want a .zip file named xxx.zip?

This is what I did:
In the rmap I have:

<provider xsi:type="mp:MavenProvider" componentTypes="maven" readerType="maven2" source="false" mutable="false">
	<uri format="http://server/artifactory/repo/" />
	<mp:mappings>
		<mp:entry artifactId="JarFile" groupId="com.company.group1" name="JarFile" />
		<mp:entry artifactId="ZipFile" groupId="com.company.group2" name="ZipFile" />
	<mp:mappings>

and in the buckminster.cspex I have:

	<cs:dependencies>
		<cs:dependency componentType="maven" name="ZipFile" versionDesignator="[1.2.1,1.2.1]" versionType="Triplet"/>
		<cs:dependency componentType="maven" name="JarFile" versionDesignator="[3.4.0,3.4.0]" versionType="Triplet"/>
	</cs:dependencies>
	<cs:actions>
		<cs:public
			name="buckminster.prebind"
			actor="ant">
			<cs:actorProperties>
				<cs:property
					key="buildFile"
					value="build/prebind.xml" />
			</cs:actorProperties>
			<cs:prerequisites>
				<cs:attribute
					component="ZipFile"
					alias="ZipFile.zip"
					name="java.binary.archives" />
				<cs:attribute
					component="JarFile"
					alias="JarFile.jar"
					name="java.binary.archives" />
			</cs:prerequisites>
			<cs:products
				alias="output"
				base="${buckminster.home}">
				<cs:path
					path="." />
			</cs:products>
		</cs:public>
	</cs:actions>


So, when I materialize, instead of getting the .zip file, I get only the pom file corresponding to that ZipFile.

I have 2 questions from this:

1. Should I be able to specify that the type of the maven artifact that I want is a zip file or should buckminster find automatically that it's a zip by reading the pom file corresponding to ZipFile?

2. If the answer to the first question is that buckminster parses the pom, what should the pom contain at the minimum and could a complex pom mess it up?

As a note, I'm trying to get it to behave like the maven-ant-tasks dependency task which works on another build (called from ant).
One more note, the server is an artifactory server (don't know if this matters).
If you want, I can also add the content of the pom file.
Previous Topic:Publishing p2 site via svn
Next Topic:Buckminster reports error when assembling fragment
Goto Forum:
  


Current Time: Thu Mar 28 23:13:16 GMT 2024

Powered by FUDForum. Page generated in 0.02750 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top