Re: Packaging m2e-wtp

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02/27/2015 10:38 AM, Mat Booth wrote:
> In other fedora packages we just remove the jgit dependencies, for
> example see eclipse-mylyn.spec lines 243-246:
>
> http://pkgs.fedoraproject.org/cgit/eclipse-mylyn.git/tree/eclipse-mylyn.spec#n243
>
> I think this is an acceptible workaround

That works great! Thanks a lot. Now I'm running into the next problem. 
The output I get now is:
[ERROR] Failed to execute goal 
org.eclipse.tycho:tycho-compiler-plugin:0.21.0:compile (default-compile) 
on project org.eclipse.m2e.wtp: Compilation failure: Compilation failure:
[ERROR] 
/home/vagrant/rpmbuild/BUILD/m2e.wtp-releases-1.1.0-1.1.0.20140611-1646/org.eclipse.m2e.wtp/src/org/eclipse/m2e/wtp/namemapping/PatternBasedFileNameMapping.java:[12]
[ERROR] import org.apache.maven.plugin.war.util.MappingUtils;
[ERROR] ^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ERROR] The import org.apache.maven.plugin.war cannot be resolved
[ERROR] 
/home/vagrant/rpmbuild/BUILD/m2e.wtp-releases-1.1.0-1.1.0.20140611-1646/org.eclipse.m2e.wtp/src/org/eclipse/m2e/wtp/namemapping/PatternBasedFileNameMapping.java:[37]
[ERROR] return MappingUtils.evaluateFileNameMapping(pattern, artifact);
[ERROR] ^^^^^^^^^^^^
[ERROR] MappingUtils cannot be resolved


However I have added a "BuildRequires: 
mvn(org.apache.maven.plugins:maven-war-plugin:pom:)" and the JAR from 
this package (maven-war-plugin) does include this package & class.

The only thing I see is that the POM refers to version 2.2 but Fedora 
has 2.4, but I understood that that would be fixed automatically (like 
with the Tycho version differences). The class structure hasn't changed 
either. I suspect I'm missing something silly. I've attached my spec 
file. What could be going wrong?

Thanks,
Julius
Name:           eclipse-m2e-wtp
Version:        1.1.0
Release:        0.1.git%{shortcommit}%{?dist}
Summary:        M2E-WTP
License:        EPL
URL:            https://github.com/eclipse/m2e.wtp/
BuildArch:      noarch

#Source0:        https://github.com/eclipse/m2e.wtp/archive/releases/1.1.0/1.1.0.20140611-1646.tar.gz
Source0:        https://github.com/eclipse/m2e.wtp/archive/releases/1.1.0/m2e.wtp-releases-1.1.0-1.1.0.20140611-1646.tar.gz

Patch0:         m2e.wtp-releases-1.1.0-1.1.0.20140611-1646-tycho_v0.21.0.patch

BuildRequires:  eclipse-license
BuildRequires:  eclipse-m2e-mavenarchiver
BuildRequires:  eclipse-webtools-jsf
BuildRequires:  maven-local
BuildRequires:  mvn(io.tesla.tycho:tycho-support:pom:)
BuildRequires:  mvn(org.apache.maven.plugins:maven-war-plugin:pom:)
BuildRequires:  osgi(org.eclipse.core.resources)
BuildRequires:  osgi(org.eclipse.core.runtime)
BuildRequires:  osgi(org.eclipse.m2e.core)
BuildRequires:  osgi(org.eclipse.m2e.jdt)
BuildRequires:  osgi(org.eclipse.m2e.maven.runtime)
BuildRequires:  osgi(slf4j.api)
BuildRequires:  tycho

%description
This package provides WTP support for Eclipse M2E.

%prep
%setup -q -n m2e.wtp-releases-1.1.0-1.1.0.20140611-1646
find -name *.jar -delete

# Fedora has newer version of M2E.  Relax bundle version requirements.
sed -i 's/\[1.0.0,1.2.0)/[1.0.0,2.0.0)/' $(find -name *.MF)
# SLF4J in Fedora uses a different BSN
sed -i s/org.slf4j.api/slf4j.api/ $(find -name *.MF)

# Use default buildtimestamp source
%pom_remove_dep :tycho-sourceref-jgit .
sed -i -e "/<sourceReferences>/,+2d" pom.xml

%build
%mvn_build -j

%install
%mvn_install

%files -f .mfiles
%doc org.sonatype.m2e.wtp/about.html

%changelog
* Fri Feb 20 2015 Julius Schwartzenberg <julius.schwartzenberg@xxxxxxxxx> - 1.1.0-0.1.
- Initial commit
--
java-devel mailing list
java-devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/java-devel

[Index of Archives]     [Red Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux