Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cf-dev] Problem for building californium following pom.xml changes

Matthias,

the problem with defining all profiles in the parent POM is that if you now run a build on e.g. Scandium and run "mvn -DcreateJavadoc install" JavaDocs will not only be created for Scandium Core (which makes sense) but also for Scandium Examples (which does not make any sense and is only a waste of time during build). That is the reason why I originally placed the profile definitions into POM files selectively only.

Now that you have pulled up the profile definitions I figured out an alternative way to prevent unnecessary execution of profiles in sub-modules.
We can put an additional check for the absence of a file into the profile activation of e.g. the "javadoc" profile:

		<profile>
			<!-- this profile generates javadoc to check integrity -->
			<id>javadoc</id>
			<activation>
				<activeByDefault>false</activeByDefault>
				<property>
					<name>createJavadoc</name>
				</property>
				<file>
					<missing>noJavadoc</missing>
				</file>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
					</plugin>
				</plugins>
			</build>
		</profile>

This way, the profile will be executed if the "createJavadoc" system property is defined (e.g. using mvn -DcreateJavadoc) AND the file "noJavadoc" is NOT present in the submodule.
We can then selectively disable execution of a profile by simply putting such a file (may be empty or contain some explanatory text) into e.g. the Scandium Examples module.

This is not ideal but I think it is a practical (and not too ugly) way of having the best of both worlds: 
1) single point of profile definition AND
2) preventing unnecessary (and time consuming) execution of plugins

What do you think?

Mit freundlichen Grüßen / Best regards

Kai Hudalla

Chief Software Architect
Technology Strategy

Bosch Software Innovations GmbH
Schöneberger Ufer 89-91
10785 Berlin
GERMANY
www.bosch-si.com

Phone +49 (30) 726112-159
Mobile +49 (151) 54336335
kai.hudalla@xxxxxxxxxxxx

Registered office: Berlin, Register court: Amtsgericht Charlottenburg, HRB 148411 B;
Executives: Dr.-Ing. Rainer Kallenbach, Michael Hahn

________________________________________
Von: cf-dev-bounces@xxxxxxxxxxx [cf-dev-bounces@xxxxxxxxxxx]&quot; im Auftrag von &quot;Kovatsch  Matthias [kovatsch@xxxxxxxxxxx]
Gesendet: Donnerstag, 1. Oktober 2015 18:49
An: Californium (Cf) developer discussions
Betreff: Re: [cf-dev] Problem for building californium following pom.xml changes

Okay, I threw the signing profiles in the same pot without looking... I assume eclipse_jar_signing was added for Hudson, so we can generate the sandbox JAR.

Furthermore, I will pick create_gpg_signature and release_to_maven. I will put them into the parent together with Javadoc.

Please just double-check if these are the right profiles.

> -----Original Message-----
> From: cf-dev-bounces@xxxxxxxxxxx [mailto:cf-dev-bounces@xxxxxxxxxxx] On
> Behalf Of Kovatsch Matthias
> Sent: Donnerstag, 1. Oktober 2015 18:37
> To: Californium (Cf) developer discussions <cf-dev@xxxxxxxxxxx>
> Subject: Re: [cf-dev] Problem for building californium following pom.xml
> changes
>
> While working on the POMs, I noticed that the profiles are still distributed,
> sometimes duplicated, and slightly inconsistent:
>
> javadoc (all but parent)
>
> eclipse_jar_signing (element-connector, scandium-parent, californium-
> parent, tools)
> create_gpg_signature (scandium)
>
> release_to_maven (scandium)
> release (parent, actinium)
> maven_central (element-connector)
>
> I will move the profiles also to the overall parent POM.
> Which is the latest or proper profile for signing? Or are they for different
> purposes?
> Which is the proper release profile?
>
> Ciao
> Matthias
> _______________________________________________
> cf-dev mailing list
> cf-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe
> from this list, visit https://dev.eclipse.org/mailman/listinfo/cf-dev
_______________________________________________
cf-dev mailing list
cf-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/cf-dev


Back to the top