You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Thomas Trepper <th...@blueclaim.com> on 2010/08/26 16:20:18 UTC

[Solved] Re: Question to: "No primary artifact to install..."

  Hi all,

I got the error, it was something inside the old pom, I accidently 
forgot to save before testing.  Sorry for the inconvenience und thank 
you all very much for your help.

Thomas




Am 26.08.2010 16:12, schrieb Thomas Trepper:
>  Hi Mathus,
>
> thanks a lot for your help. I have updated my pom as you told me and I 
> executed mvn install, which works. Thanks a lot.  But it produces only 
> the main jar. But I want to have javadoc, sources, etc also as jars, 
> therefore I executed
> mvn clean source:jar source:test-jar jar:test-jar javadoc:jar install
> which now works also fine, it produces all jars as wanted, BUT source, 
> doc, test and test-source are ALSO included in the main-jar, which is 
> *not*, what I want.
>
> How can I produce main artifact-jar and additionally (NOT included) 
> javadoc, sources, test and test-sources-jars?
>
> Thanks everybody till now,
>
> Thomas
>
>
>
>
> Am 26.08.2010 16:03, schrieb Baptiste MATHUS:
>> First, I've simplified the pom your provided.
>> http://pastebin.com/64XC39VS is totally equivalent for what you put.
>>
>> Could you run mvn install and show us the output?
>>
>> Thanks
>>
>> 2010/8/26 Baptiste MATHUS<ml...@batmat.net>
>>
>>> Specifying that many plugins as you did is just a mean of getting in
>>> trouble soon.
>>> Launching a specific plugin, particularly some, with maven is 
>>> something one
>>> almost never does.
>>>
>>> You'd better post here what's the problem running mvn package. This 
>>> should
>>> work this way, simply.
>>>
>>> Using maven the way you show is ant'ish, and it's not getting to the 
>>> point
>>> where a classical mvn package just package the project, even when not
>>> knowing anything about your project.
>>>
>>> Cheers
>>>
>>> 2010/8/26 Thomas Trepper<th...@blueclaim.com>
>>>
>>>   Yes, I tried that first, but it did not work and during the 
>>> experiments to
>>>> solve the issue the long commandline arised. Sorry for that, but 
>>>> the simple
>>>> mvn install did not do it either. I will get the same error...
>>>>
>>>>
>>>> Am 26.08.2010 15:12, schrieb Anders Hammar:
>>>>
>>>>   Why the extremely troublesome mvn command line? Why not just "mvn
>>>>> install"?
>>>>>
>>>>> /Anders
>>>>>
>>>>> On Thu, Aug 26, 2010 at 14:20, Thomas Trepper
>>>>> <th...@blueclaim.com>wrote:
>>>>>
>>>>>    Hi all,
>>>>>> this is a snippet from my build, which says, that I have an 
>>>>>> artifact and
>>>>>> attached artifacts, but, whatever I am doing, I always get the 
>>>>>> message:
>>>>>> No
>>>>>> primary artifact to install, installing attached artifacts instead.
>>>>>>
>>>>>> Can anybody point me to the right direction please?
>>>>>>
>>>>>> Thanks a lot and best regards,
>>>>>>
>>>>>> Thomas
>>>>>>
>>>>>> P.S: I start my build from eclipse with the following targets:
>>>>>>     clean validate initialize  resources:resources compiler:compile
>>>>>>   jar:jar
>>>>>> source:jar source:test-jar jar:test-jar javadoc:jar test 
>>>>>> install:install
>>>>>>
>>>>>>
>>>>>>
>>>>>> [INFO]
>>>>>> [INFO] --- maven-install-plugin:2.3:install (default-cli) @ 
>>>>>> logging-api
>>>>>> ---
>>>>>> [DEBUG] Created new class realm
>>>>>> plugin>org.apache.maven.plugins:maven-install-plugin:2.3
>>>>>> [DEBUG] Populating class realm
>>>>>> plugin>org.apache.maven.plugins:maven-install-plugin:2.3
>>>>>> [DEBUG]   Included:
>>>>>> org.apache.maven.plugins:maven-install-plugin:maven-plugin:2.3
>>>>>> [DEBUG]   Included: org.codehaus.plexus:plexus-utils:jar:1.5.6
>>>>>> [DEBUG]   Included: junit:junit:jar:3.8.1
>>>>>> [DEBUG]   Included: org.codehaus.plexus:plexus-digest:jar:1.0
>>>>>> [DEBUG]   Excluded: org.apache.maven:maven-plugin-api:jar:2.0.6
>>>>>> [DEBUG]   Excluded: org.apache.maven:maven-project:jar:2.0.6
>>>>>> [DEBUG]   Excluded: org.apache.maven:maven-settings:jar:2.0.6
>>>>>> [DEBUG]   Excluded: org.apache.maven:maven-model:jar:2.0.6
>>>>>> [DEBUG]   Excluded:
>>>>>> org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1 
>>>>>>
>>>>>> [DEBUG]   Excluded: classworlds:classworlds:jar:1.1-alpha-2
>>>>>> [DEBUG]   Excluded: org.apache.maven:maven-profile:jar:2.0.6
>>>>>> [DEBUG]   Excluded: 
>>>>>> org.apache.maven:maven-artifact-manager:jar:2.0.6
>>>>>> [DEBUG]   Excluded: 
>>>>>> org.apache.maven:maven-repository-metadata:jar:2.0.6
>>>>>> [DEBUG]   Excluded: org.apache.maven:maven-artifact:jar:2.0.6
>>>>>> [DEBUG]   Excluded: org.apache.maven:maven-plugin-registry:jar:2.0.6
>>>>>> [DEBUG] Configuring mojo
>>>>>> 'org.apache.maven.plugins:maven-install-plugin:2.3:install' with 
>>>>>> basic
>>>>>> configurator -->
>>>>>> [DEBUG]   (f) artifact = 
>>>>>> com.blueclaim:logging-api:jar:0.0.4-SNAPSHOT
>>>>>> [DEBUG]   (f) attachedArtifacts =
>>>>>> [com.blueclaim:logging-api:java-source:sources:0.0.4-SNAPSHOT,
>>>>>> com.blueclaim:logging-api:java-source:test-sources:0.0.4-SNAPSHOT,
>>>>>> com.blueclaim:logging-api:test-jar:tests:0.0.4-SNAPSHOT,
>>>>>> com.blueclaim:logging-api:javadoc:javadoc:0.0.4-SNAPSHOT]
>>>>>> [DEBUG]   (f) createChecksum = false
>>>>>> [DEBUG]   (f) localRepository =        id: local
>>>>>>       url: file:///C:/eclipse-SDK-3.6/maven-repository/
>>>>>>    layout: none
>>>>>>
>>>>>> [DEBUG]   (f) packaging = jar
>>>>>> [DEBUG]   (f) pomFile = E:\workspace.utils\logging-api\pom.xml
>>>>>> [DEBUG]   (f) updateReleaseInfo = false
>>>>>> [DEBUG] -- end configuration --
>>>>>> [INFO] No primary artifact to install, installing attached artifacts
>>>>>> instead.
>>>>>> [INFO] Installing E:\workspace.utils\logging-api\pom.xml to
>>>>>>
>>>>>> C:\eclipse-SDK-3.6\maven-repository\com\blueclaim\logging-api\0.0.4-SNAPSHOT\logging-api-0.0.4-SNAPSHOT.pom 
>>>>>>
>>>>>> [INFO] Installing
>>>>>>
>>>>>> E:\workspace.utils\logging-api\target\logging-api-0.0.4-SNAPSHOT-sources.jar 
>>>>>>
>>>>>> to
>>>>>>
>>>>>> C:\eclipse-SDK-3.6\maven-repository\com\blueclaim\logging-api\0.0.4-SNAPSHOT\logging-api-0.0.4-SNAPSHOT-sources.jar 
>>>>>>
>>>>>> [INFO] Installing
>>>>>>
>>>>>> E:\workspace.utils\logging-api\target\logging-api-0.0.4-SNAPSHOT-test-sources.jar 
>>>>>>
>>>>>> to
>>>>>>
>>>>>> C:\eclipse-SDK-3.6\maven-repository\com\blueclaim\logging-api\0.0.4-SNAPSHOT\logging-api-0.0.4-SNAPSHOT-test-sources.jar 
>>>>>>
>>>>>> [INFO] Installing
>>>>>>
>>>>>> E:\workspace.utils\logging-api\target\logging-api-0.0.4-SNAPSHOT-tests.jar 
>>>>>>
>>>>>> to
>>>>>>
>>>>>> C:\eclipse-SDK-3.6\maven-repository\com\blueclaim\logging-api\0.0.4-SNAPSHOT\logging-api-0.0.4-SNAPSHOT-tests.jar 
>>>>>>
>>>>>> [INFO] Installing
>>>>>>
>>>>>> E:\workspace.utils\logging-api\target\logging-api-0.0.4-SNAPSHOT-javadoc.jar 
>>>>>>
>>>>>> to
>>>>>>
>>>>>> C:\eclipse-SDK-3.6\maven-repository\com\blueclaim\logging-api\0.0.4-SNAPSHOT\logging-api-0.0.4-SNAPSHOT-javadoc.jar 
>>>>>>
>>>>>> [INFO]
>>>>>> ------------------------------------------------------------------------ 
>>>>>>
>>>>>> [INFO] BUILD SUCCESS
>>>>>> [INFO]
>>>>>> ------------------------------------------------------------------------ 
>>>>>>
>>>>>>
>>>>>>
>>>>>> --------------------------------------------------------------------- 
>>>>>>
>>>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>>>
>>>>>>
>>>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>
>>>>
>>>
>>> -- 
>>> Baptiste<Batmat>  MATHUS - http://batmat.net
>>> Sauvez un arbre,
>>> Mangez un castor !
>>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Executing ant, but only once

Posted by Baptiste MATHUS <ml...@batmat.net>.
You're using ant to replace variables or so? This is a standard maven
feature: you want to have a look here
http://maven.apache.org/plugins/maven-resources-plugin/examples/filter.html

<http://maven.apache.org/plugins/maven-resources-plugin/examples/filter.html>
Cheers

2010/8/26 Thomas Trepper <th...@blueclaim.com>

>  Hi all,
>
> I have now the following part in the pom:
>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-antrun-plugin</artifactId>
> <executions>
> <execution>
> <id>generate-version-info</id>
> <goals>
> <goal>run</goal>
> </goals>
> <phase>process-sources</phase>
> <configuration>
> <tasks>
> <ant antfile="${basedir}/build-version-info.xml" target="buildInfo" />
> </tasks>
> </configuration>
> </execution>
> </executions>
> </plugin>
>
>
> which should execute an ant-task, which modifies and replaces some entries
> in the sources.  I want this be executed only ONCE and before any artifacts
> are build?
>
> Can anybody point me into the right direction please?
>
> Thanks a lot and best regards,
>
> Thomas
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Baptiste <Batmat> MATHUS - http://batmat.net
Sauvez un arbre,
Mangez un castor !

Executing ant, but only once

Posted by Thomas Trepper <th...@blueclaim.com>.
  Hi all,

I have now the following part in the pom:

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>generate-version-info</id>
<goals>
<goal>run</goal>
</goals>
<phase>process-sources</phase>
<configuration>
<tasks>
<ant antfile="${basedir}/build-version-info.xml" target="buildInfo" />
</tasks>
</configuration>
</execution>
</executions>
</plugin>


which should execute an ant-task, which modifies and replaces some 
entries in the sources.  I want this be executed only ONCE and before 
any artifacts are build?

Can anybody point me into the right direction please?

Thanks a lot and best regards,

Thomas



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org