Sudden NoFileAssignedException during karaf distro build.

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Sudden NoFileAssignedException during karaf distro build.

Erwin Hogeweg
Hi -

All of a sudden we are getting a maven build this error when building a karaf distribution. This started late yesterday and happens on multiple developer machines but not all. I have nuked my entire .m2 repo and rolled back to a version well before the issue started but I still get the same error.

We’re kinda scratching our heads here… Has anyone an idea what is going on?

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:3.0.0-M1:install (default-install) on project my-distributionNoFileAssignedException: The packaging plugin for this project did not assign a main file to the project but it has attachments. Change packaging to 'pom'. -> [Help 1]

Karaf-4.2.0
Java-1.8.0_92
Maven-3.5.0


Thanks,

Erwin

Reply | Threaded
Open this post in threaded view
|

Re: Sudden NoFileAssignedException during karaf distro build.

Oleg Cohen
Hi Erwin,

I ran into the same last night. I guess 3.0.0-M1 is new and has issues/incompatibilities with the Karaf plugin. 

The way I fixed it was to define the following in the pluginManagement in the pom.xml or a parent pom.xml to force versions 2.5.2 and 2.8.2 for the install and deploy plugins respectively:

<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin>
<plugin>
<groupId>org.apache.karaf.tooling</groupId>
<artifactId>karaf-maven-plugin</artifactId>
<version>${org.apache.karaf.version}</version>
<extensions>true</extensions>
</plugin>
</plugins>
</pluginManagement>
</build>

Hope this helps.

Thank you,
Oleg


On Oct 1, 2018, at 9:49 AM, Erwin Hogeweg <[hidden email]> wrote:

Hi -

All of a sudden we are getting a maven build this error when building a karaf distribution. This started late yesterday and happens on multiple developer machines but not all. I have nuked my entire .m2 repo and rolled back to a version well before the issue started but I still get the same error.

We’re kinda scratching our heads here… Has anyone an idea what is going on?

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:3.0.0-M1:install (default-install) on project my-distributionNoFileAssignedException: The packaging plugin for this project did not assign a main file to the project but it has attachments. Change packaging to 'pom'. -> [Help 1]

Karaf-4.2.0
Java-1.8.0_92
Maven-3.5.0


Thanks,

Erwin


Reply | Threaded
Open this post in threaded view
|

Re: Sudden NoFileAssignedException during karaf distro build.

jbonofre
In reply to this post by Erwin Hogeweg
Hi Erwin,

ouch, that's a little bit old version of the plugin ;)

Anyway, you should define the Maven dependencies for this version of the
plugin.

Any change to update to Karaf 4.x at least for Maven plugin ?

Regards
JB

On 01/10/2018 15:49, Erwin Hogeweg wrote:

> Hi -
>
> All of a sudden we are getting a maven build this error when building a
> karaf distribution. This started late yesterday and happens on multiple
> developer machines but not all. I have nuked my entire .m2 repo and
> rolled back to a version well before the issue started but I still get
> the same error.
>
> We’re kinda scratching our heads here… Has anyone an idea what is going on?
>
> [*ERROR*] Failed to execute goal
> org.apache.maven.plugins:maven-install-plugin:3.0.0-M1:install*(default-install)*
> on project my-distribution: *NoFileAssignedException*: The packaging
> plugin for this project did not assign a main file to the project but it
> has attachments. Change packaging to 'pom'. -> *[Help 1]*
>
> Karaf-4.2.0
> Java-1.8.0_92
> Maven-3.5.0
>
>
> Thanks,
>
> Erwin
>

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: Sudden NoFileAssignedException during karaf distro build.

Erwin Hogeweg
Hi JB,

> ouch, that's a little bit old version of the plugin ;)
Not sure which plugin you are talking about. As far as I can see 3.0.0-M1 is the latest available maven-install-plugin.

> Anyway, you should define the Maven dependencies for this version of the plugin.
>
> Any change to update to Karaf 4.x at least for Maven plugin?
I am on Karaf-4.2.0… for the karaf-maven-plugin.

Erwin


>
> Regards
> JB
>
> On 01/10/2018 15:49, Erwin Hogeweg wrote:
>> Hi -
>>
>> All of a sudden we are getting a maven build this error when building a
>> karaf distribution. This started late yesterday and happens on multiple
>> developer machines but not all. I have nuked my entire .m2 repo and
>> rolled back to a version well before the issue started but I still get
>> the same error.
>>
>> We’re kinda scratching our heads here… Has anyone an idea what is going on?
>>
>> [*ERROR*] Failed to execute goal
>> org.apache.maven.plugins:maven-install-plugin:3.0.0-M1:install*(default-install)*
>> on project my-distribution: *NoFileAssignedException*: The packaging
>> plugin for this project did not assign a main file to the project but it
>> has attachments. Change packaging to 'pom'. -> *[Help 1]*
>>
>> Karaf-4.2.0
>> Java-1.8.0_92
>> Maven-3.5.0
>>
>>
>> Thanks,
>>
>> Erwin
>>
>
> --
> Jean-Baptiste Onofré
> [hidden email]
> http://blog.nanthrax.net
> Talend - http://www.talend.com

Reply | Threaded
Open this post in threaded view
|

Re: Sudden NoFileAssignedException during karaf distro build.

jbonofre
Sorry, I thought you used both 3.x for Karaf and maven-install-plugin.

The maven-install-plugin 3.0.0.M1 (released couple of days ago) changed
the way to deal with project packaging. I have to change the way of
attaching the artifact by the Karaf maven plugin.

As workaround, you have to use maven-install-plugin 2.5.2 by explicitly
defining the version in your pom.xml.

Regards
JB

On 01/10/2018 17:32, Erwin Hogeweg wrote:

> Hi JB,
>
>> ouch, that's a little bit old version of the plugin ;)
> Not sure which plugin you are talking about. As far as I can see 3.0.0-M1 is the latest available maven-install-plugin.
>
>> Anyway, you should define the Maven dependencies for this version of the plugin.
>>
>> Any change to update to Karaf 4.x at least for Maven plugin?
> I am on Karaf-4.2.0… for the karaf-maven-plugin.
>
> Erwin
>
>
>>
>> Regards
>> JB
>>
>> On 01/10/2018 15:49, Erwin Hogeweg wrote:
>>> Hi -
>>>
>>> All of a sudden we are getting a maven build this error when building a
>>> karaf distribution. This started late yesterday and happens on multiple
>>> developer machines but not all. I have nuked my entire .m2 repo and
>>> rolled back to a version well before the issue started but I still get
>>> the same error.
>>>
>>> We’re kinda scratching our heads here… Has anyone an idea what is going on?
>>>
>>> [*ERROR*] Failed to execute goal
>>> org.apache.maven.plugins:maven-install-plugin:3.0.0-M1:install*(default-install)*
>>> on project my-distribution: *NoFileAssignedException*: The packaging
>>> plugin for this project did not assign a main file to the project but it
>>> has attachments. Change packaging to 'pom'. -> *[Help 1]*
>>>
>>> Karaf-4.2.0
>>> Java-1.8.0_92
>>> Maven-3.5.0
>>>
>>>
>>> Thanks,
>>>
>>> Erwin
>>>
>>
>> --
>> Jean-Baptiste Onofré
>> [hidden email]
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: Sudden NoFileAssignedException during karaf distro build.

Erwin Hogeweg
Thanks guys.

Erwin

> On Oct 1, 2018, at 11:38, Jean-Baptiste Onofré <[hidden email]> wrote:
>
> Sorry, I thought you used both 3.x for Karaf and maven-install-plugin.
>
> The maven-install-plugin 3.0.0.M1 (released couple of days ago) changed
> the way to deal with project packaging. I have to change the way of
> attaching the artifact by the Karaf maven plugin.
>
> As workaround, you have to use maven-install-plugin 2.5.2 by explicitly
> defining the version in your pom.xml.
>
> Regards
> JB
>
> On 01/10/2018 17:32, Erwin Hogeweg wrote:
>> Hi JB,
>>
>>> ouch, that's a little bit old version of the plugin ;)
>> Not sure which plugin you are talking about. As far as I can see 3.0.0-M1 is the latest available maven-install-plugin.
>>
>>> Anyway, you should define the Maven dependencies for this version of the plugin.
>>>
>>> Any change to update to Karaf 4.x at least for Maven plugin?
>> I am on Karaf-4.2.0… for the karaf-maven-plugin.
>>
>> Erwin
>>
>>
>>>
>>> Regards
>>> JB
>>>
>>> On 01/10/2018 15:49, Erwin Hogeweg wrote:
>>>> Hi -
>>>>
>>>> All of a sudden we are getting a maven build this error when building a
>>>> karaf distribution. This started late yesterday and happens on multiple
>>>> developer machines but not all. I have nuked my entire .m2 repo and
>>>> rolled back to a version well before the issue started but I still get
>>>> the same error.
>>>>
>>>> We’re kinda scratching our heads here… Has anyone an idea what is going on?
>>>>
>>>> [*ERROR*] Failed to execute goal
>>>> org.apache.maven.plugins:maven-install-plugin:3.0.0-M1:install*(default-install)*
>>>> on project my-distribution: *NoFileAssignedException*: The packaging
>>>> plugin for this project did not assign a main file to the project but it
>>>> has attachments. Change packaging to 'pom'. -> *[Help 1]*
>>>>
>>>> Karaf-4.2.0
>>>> Java-1.8.0_92
>>>> Maven-3.5.0
>>>>
>>>>
>>>> Thanks,
>>>>
>>>> Erwin
>>>>
>>>
>>> --
>>> Jean-Baptiste Onofré
>>> [hidden email]
>>> http://blog.nanthrax.net
>>> Talend - http://www.talend.com
>>
>
> --
> Jean-Baptiste Onofré
> [hidden email]
> http://blog.nanthrax.net
> Talend - http://www.talend.com

Reply | Threaded
Open this post in threaded view
|

Re: Sudden NoFileAssignedException during karaf distro build.

Erwin Hogeweg
In reply to this post by Oleg Cohen
Thanks Oleg,

Erwin


On Oct 1, 2018, at 09:58, Oleg Cohen <[hidden email]> wrote:

Hi Erwin,

I ran into the same last night. I guess 3.0.0-M1 is new and has issues/incompatibilities with the Karaf plugin. 

The way I fixed it was to define the following in the pluginManagement in the pom.xml or a parent pom.xml to force versions 2.5.2 and 2.8.2 for the install and deploy plugins respectively:

<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin>
<plugin>
<groupId>org.apache.karaf.tooling</groupId>
<artifactId>karaf-maven-plugin</artifactId>
<version>${org.apache.karaf.version}</version>
<extensions>true</extensions>
</plugin>
</plugins>
</pluginManagement>
</build>

Hope this helps.

Thank you,
Oleg


On Oct 1, 2018, at 9:49 AM, Erwin Hogeweg <[hidden email]> wrote:

Hi -

All of a sudden we are getting a maven build this error when building a karaf distribution. This started late yesterday and happens on multiple developer machines but not all. I have nuked my entire .m2 repo and rolled back to a version well before the issue started but I still get the same error.

We’re kinda scratching our heads here… Has anyone an idea what is going on?

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:3.0.0-M1:install (default-install) on project my-distributionNoFileAssignedException: The packaging plugin for this project did not assign a main file to the project but it has attachments. Change packaging to 'pom'. -> [Help 1]

Karaf-4.2.0
Java-1.8.0_92
Maven-3.5.0


Thanks,

Erwin