directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pierre-Arnaud Marcelot ...@marcelot.net>
Subject Re: Adding a new profile to the 'project' pom.xml to ease the import of the same project twice in Eclipse
Date Fri, 25 Feb 2011 08:30:01 GMT
Done!

http://svn.apache.org/viewvc?rev=1074434&view=rev

I noticed we have a few other profiles in the 'project' pom.xml, 'release' and 'full' profiles.
Here they are:

> <profile>
> <id>release</id>
> <build>
> <plugins>
> 
> <!-- We want do the rat check 
> <plugin>
> <groupId>org.apache.rat</groupId>
> <artifactId>apache-rat-plugin</artifactId>
> <configuration>
> <excludes> 
> <exclude>**/target/**/*</exclude>
> <exclude>**/cobertura.ser</exclude>
> <exclude>**/.classpath</exclude>
> <exclude>**/.project</exclude>
> <exclude>**/.settings/**/*</exclude>
> <exclude>**/*.iml</exclude>
> <exclude>**/*.ipr</exclude>
> <exclude>**/*.iws</exclude>
> <exclude>**/MANIFEST.MF</exclude>
> </excludes>
> </configuration>
> <executions>
> <execution>
> <phase>verify</phase>
> <goals>
> <goal>check</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
>  -->
> 
> 
> <plugin> 
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-release-plugin</artifactId>
> <configuration>
> <useReleaseProfile>false</useReleaseProfile>
> <goals>deploy</goals>
> <arguments>-Prelease ${release.altDeploymentRepository}</arguments>
> </configuration>
> </plugin>
> 
> <!-- We want a source jar -->
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-source-plugin</artifactId>
> <executions>
> <execution>
> <goals>
> <goal>jar</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
> 
> <!-- We want to sign the artifact, the POM, and all attached artifacts --> 
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-gpg-plugin</artifactId>
> <inherited>true</inherited>
> <configuration>
> <passphrase>${gpg.passphrase}</passphrase>
> </configuration>
> <executions>
> <execution>
> <goals>
> <goal>sign</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
> 
> <!-- In the future... --> 
> <!-- We want to deploy the artifact to a staging location for perusal -->
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-deploy-plugin</artifactId>
> <inherited>true</inherited>
> <configuration>
> <!-- uncomment to enable "staged" release process -->
> <!--<altDeploymentRepository>${deploy.altRepository}</altDeploymentRepository>-->
> <updateReleaseInfo>true</updateReleaseInfo>
> </configuration>
> </plugin>
> 
> <!-- We want the JavaDoc JAR published with the release --> 
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-javadoc-plugin</artifactId>
> <inherited>true</inherited>
> <configuration>
> <source>1.5</source>
> </configuration>
> <executions>
> <execution>
> <id>attach-javadocs</id>
> <goals>
> <goal>jar</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
> </plugins>
> </build>
> </profile>
> 
> <profile> 
> <id>full</id>
> <build>
> <plugins>
> 
> <!-- We want a source jar --> 
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-source-plugin</artifactId>
> <executions>
> <execution>
> <goals>
> <goal>jar</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
> 
> <!-- We want the JavaDoc JAR published with the release --> 
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-javadoc-plugin</artifactId>
> <inherited>true</inherited>
> <configuration>
> <source>1.5</source>
> </configuration>
> <executions>
> <execution>
> <id>attach-javadocs</id>
> <goals>
> <goal>jar</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
> </plugins>
> </build>
> </profile>




Does anyone know if these profiles are still used and not deprecated?
I'm really wondering...
Maybe we should remove if they are not used anymore.

Should I schedule a new release of the 'project' pom.xml for later today? 
Regards,
Pierre-Arnaud
On vendredi 25 février 2011 at 02:13, Emmanuel Lecharny wrote: 
> On 2/23/11 1:54 PM, Pierre-Arnaud Marcelot wrote:
> > Hi Dev,
> > 
> > Eclipse is great but it has one major drawback for me (and others too I believe),
that's it's inability to import the same project twice in the workspace.
> > 
> > Now, by "the same project" I don't mean the exact same project (which would not
make much sense) but I mean the same project but from various SVN branches (e.g. one version
from trunk and another from a branch).
> > 
> > Considering that we're now working in two different places ('trunks' and 'milestones'
branches), I would rather have all the projects in a common workspace than having two workspaces
(one for each branch).
> > 
> > The basic problem is that 'mvn eclipse:eclipse' generates the same project names
for both branches and that Eclipse only allows one project with a given name at a time in
the workspace (and I can understand that).
> > 
> > Recently, while looking at the Maven Eclipse plugin documentation I found out an
interesting configuration option that we could leverage to solve this issue.
> > 
> > I built a specific profile that will be activated if we specify a string we want
to be appended to the name of the project when creating eclipse descriptors using 'mvn eclipse:eclipse
-Dappend.to.project.name=[string]'.
> > 
> > Here it is:
> > 
> > > <profile>
> > > <id>append-to-project-name</id>
> > > <activation>
> > > <property>
> > > <name>append.to.project.name</name>
> > > </property>
> > > </activation>
> > > <build>
> > > <plugins>
> > > <plugin>
> > > <artifactId>maven-eclipse-plugin</artifactId>
> > > <configuration>
> > > <projectNameTemplate>[artifactId]-${append.to.project.name}</projectNameTemplate>
> > > </configuration>
> > > </plugin>
> > > </plugins>
> > > </build>
> > > </profile>
> > 
> > 
> > 
> > Using this profile it is now possible to import the same project twice (and more)
by providing for example the name of the branch, which will be appended to the name of the
project.
> > 
> > I'd like to include this new profile in the 'project' pom to be able to reuse it
across all our projects.
> > 
> > Thoughts?
> > 
> > Regards,
> > Pierre-Arnaud
> +1. Go for it !
> 
> -- 
> Regards,
> Cordialement,
> Emmanuel Lécharny
> www.iktek.com
> 

Mime
View raw message